Browse Source

Add Color.Transparent

Former-commit-id: d18d0ef6b152c19270e54157e1026490040a6cab
Former-commit-id: 1d1d7bda80c783f9cb1e8c8b1ebfeca2de750d53
Former-commit-id: 421d0caa589e3609c75e01d21b48e15c54fe7aae
af/merge-core
James Jackson-South 10 years ago
parent
commit
b027133503
  1. 8
      README.md
  2. 5
      src/ImageProcessor/Colors/ColorDefinitions.cs
  3. 4
      tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
  4. 26
      tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs

8
README.md

@ -58,7 +58,7 @@ git clone https://github.com/JimBobSquarePants/ImageProcessor
- [x] Rectangle - [x] Rectangle
- [x] Size - [x] Size
- [x] Point - [x] Point
- [ ] Ellipse - [x] Ellipse
- Resampling algorithms. (Performance improvements?) - Resampling algorithms. (Performance improvements?)
- [x] Box - [x] Box
- [x] Bicubic - [x] Bicubic
@ -78,8 +78,8 @@ git clone https://github.com/JimBobSquarePants/ImageProcessor
- [ ] Elliptical Crop - [ ] Elliptical Crop
- [x] Entropy Crop - [x] Entropy Crop
- Rotation - Rotation
- [x] Flip (90, 270, FlipType etc. Need help) - [x] Flip (90, 270, FlipType etc)
- [ ] Rotate by angle (Need help with Paeth approach) [#258](https://github.com/JimBobSquarePants/ImageProcessor/issues/258) - [x] Rotate by angle
- ColorMatrix operations (Uses Matrix4x4) - ColorMatrix operations (Uses Matrix4x4)
- [x] BlackWhite - [x] BlackWhite
- [x] Greyscale BT709 - [x] Greyscale BT709
@ -113,6 +113,8 @@ git clone https://github.com/JimBobSquarePants/ImageProcessor
- [x] Hue - [x] Hue
- [x] Blend - [x] Blend
- [ ] Mask - [ ] Mask
- [x] Vignette
- [x] Glow
- Effects - Effects
- [ ] Path brush (Need help) [#264](https://github.com/JimBobSquarePants/ImageProcessor/issues/264) - [ ] Path brush (Need help) [#264](https://github.com/JimBobSquarePants/ImageProcessor/issues/264)
- [ ] Pattern brush (Need help) [#264](https://github.com/JimBobSquarePants/ImageProcessor/issues/264) - [ ] Pattern brush (Need help) [#264](https://github.com/JimBobSquarePants/ImageProcessor/issues/264)

5
src/ImageProcessor/Colors/ColorDefinitions.cs

@ -719,5 +719,10 @@ namespace ImageProcessor
/// Represents a <see cref="Color"/> matching the W3C definition that has a hex triplet value of #9ACD32. /// Represents a <see cref="Color"/> matching the W3C definition that has a hex triplet value of #9ACD32.
/// </summary> /// </summary>
public static readonly Color YellowGreen = new Color(154 / 255f, 205 / 255f, 50 / 255f); public static readonly Color YellowGreen = new Color(154 / 255f, 205 / 255f, 50 / 255f);
/// <summary>
/// Represents a system-defined <see cref="Color"/> that has an ARGB value of #00FFFFFF.
/// </summary>
public static readonly Color Transparent = new Color(1, 1, 1, 0);
} }
} }

4
tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs

@ -19,11 +19,11 @@ namespace ImageProcessor.Tests
/// </summary> /// </summary>
public static readonly List<string> Files = new List<string> public static readonly List<string> Files = new List<string>
{ {
"TestImages/Formats/Jpg/Floorplan.jpeg", //"TestImages/Formats/Jpg/Floorplan.jpeg", //Perf: Enable for local testing only
"TestImages/Formats/Jpg/Calliphora.jpg", "TestImages/Formats/Jpg/Calliphora.jpg",
//"TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg", //Perf: Enable for local testing only //"TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg", //Perf: Enable for local testing only
"TestImages/Formats/Bmp/Car.bmp", "TestImages/Formats/Bmp/Car.bmp",
"TestImages/Formats/Png/blur.png", //Perf: Enable for local testing only //"TestImages/Formats/Png/blur.png", //Perf: Enable for local testing only
"TestImages/Formats/Png/splash.png", "TestImages/Formats/Png/splash.png",
"TestImages/Formats/Gif/rings.gif", "TestImages/Formats/Gif/rings.gif",
//"TestImages/Formats/Gif/giphy.gif" //Perf: Enable for local testing only //"TestImages/Formats/Gif/giphy.gif" //Perf: Enable for local testing only

26
tests/ImageProcessor.Tests/Processors/Samplers/SamplerTests.cs

@ -15,18 +15,18 @@
{ {
{ "Bicubic", new BicubicResampler() }, { "Bicubic", new BicubicResampler() },
{ "Triangle", new TriangleResampler() }, { "Triangle", new TriangleResampler() },
{ "Box", new BoxResampler() }, //{ "Box", new BoxResampler() },
{ "Lanczos3", new Lanczos3Resampler() }, //{ "Lanczos3", new Lanczos3Resampler() },
{ "Lanczos5", new Lanczos5Resampler() }, //{ "Lanczos5", new Lanczos5Resampler() },
{ "Lanczos8", new Lanczos8Resampler() }, //{ "Lanczos8", new Lanczos8Resampler() },
{ "MitchellNetravali", new MitchellNetravaliResampler() }, //{ "MitchellNetravali", new MitchellNetravaliResampler() },
{ "NearestNeighbor", new NearestNeighborResampler() }, //{ "NearestNeighbor", new NearestNeighborResampler() },
{ "Hermite", new HermiteResampler() }, //{ "Hermite", new HermiteResampler() },
{ "Spline", new SplineResampler() }, //{ "Spline", new SplineResampler() },
{ "Robidoux", new RobidouxResampler() }, //{ "Robidoux", new RobidouxResampler() },
{ "RobidouxSharp", new RobidouxSharpResampler() }, //{ "RobidouxSharp", new RobidouxSharpResampler() },
{ "RobidouxSoft", new RobidouxSoftResampler() }, //{ "RobidouxSoft", new RobidouxSoftResampler() },
{ "Welch", new WelchResampler() } //{ "Welch", new WelchResampler() }
}; };
public static readonly TheoryData<RotateType, FlipType> RotateFlips = new TheoryData<RotateType, FlipType> public static readonly TheoryData<RotateType, FlipType> RotateFlips = new TheoryData<RotateType, FlipType>
@ -167,7 +167,7 @@
using (FileStream output = File.OpenWrite($"TestOutput/Rotate/{filename}")) using (FileStream output = File.OpenWrite($"TestOutput/Rotate/{filename}"))
{ {
image.Rotate(45, sampler) image.Rotate(45, sampler)
.BackgroundColor(Color.Aqua) //.BackgroundColor(Color.Aqua)
.Save(output); .Save(output);
} }

Loading…
Cancel
Save