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] Size
- [x] Point
- [ ] Ellipse
- [x] Ellipse
- Resampling algorithms. (Performance improvements?)
- [x] Box
- [x] Bicubic
@ -78,8 +78,8 @@ git clone https://github.com/JimBobSquarePants/ImageProcessor
- [ ] Elliptical Crop
- [x] Entropy Crop
- Rotation
- [x] Flip (90, 270, FlipType etc. Need help)
- [ ] Rotate by angle (Need help with Paeth approach) [#258](https://github.com/JimBobSquarePants/ImageProcessor/issues/258)
- [x] Flip (90, 270, FlipType etc)
- [x] Rotate by angle
- ColorMatrix operations (Uses Matrix4x4)
- [x] BlackWhite
- [x] Greyscale BT709
@ -113,6 +113,8 @@ git clone https://github.com/JimBobSquarePants/ImageProcessor
- [x] Hue
- [x] Blend
- [ ] Mask
- [x] Vignette
- [x] Glow
- Effects
- [ ] Path 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.
/// </summary>
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>
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/gamma_dalai_lama_gray.jpg", //Perf: Enable for local testing only
"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/Gif/rings.gif",
//"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() },
{ "Triangle", new TriangleResampler() },
{ "Box", new BoxResampler() },
{ "Lanczos3", new Lanczos3Resampler() },
{ "Lanczos5", new Lanczos5Resampler() },
{ "Lanczos8", new Lanczos8Resampler() },
{ "MitchellNetravali", new MitchellNetravaliResampler() },
{ "NearestNeighbor", new NearestNeighborResampler() },
{ "Hermite", new HermiteResampler() },
{ "Spline", new SplineResampler() },
{ "Robidoux", new RobidouxResampler() },
{ "RobidouxSharp", new RobidouxSharpResampler() },
{ "RobidouxSoft", new RobidouxSoftResampler() },
{ "Welch", new WelchResampler() }
//{ "Box", new BoxResampler() },
//{ "Lanczos3", new Lanczos3Resampler() },
//{ "Lanczos5", new Lanczos5Resampler() },
//{ "Lanczos8", new Lanczos8Resampler() },
//{ "MitchellNetravali", new MitchellNetravaliResampler() },
//{ "NearestNeighbor", new NearestNeighborResampler() },
//{ "Hermite", new HermiteResampler() },
//{ "Spline", new SplineResampler() },
//{ "Robidoux", new RobidouxResampler() },
//{ "RobidouxSharp", new RobidouxSharpResampler() },
//{ "RobidouxSoft", new RobidouxSoftResampler() },
//{ "Welch", new WelchResampler() }
};
public static readonly TheoryData<RotateType, FlipType> RotateFlips = new TheoryData<RotateType, FlipType>
@ -167,7 +167,7 @@
using (FileStream output = File.OpenWrite($"TestOutput/Rotate/{filename}"))
{
image.Rotate(45, sampler)
.BackgroundColor(Color.Aqua)
//.BackgroundColor(Color.Aqua)
.Save(output);
}

Loading…
Cancel
Save