Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Index color and RGB color

$
0
0
It seems I misunderstood your problem. Can you post your code in a code block (```C#) next time? If you want your image to be indexed you should set the ClassType to Pseudo:
using (MagickImage image = new MagickImage(@"E:\Development\DOTNET\PCXEditor\RGBEditor\18975253ee.pcx"))
{
  MagickColor target = new MagickColor(128, 118, 118);
  MagickColor fill = new MagickColor(100, 105, 110);

  image.Opaque(target, fill);

  image.ClassType = ClassType.Pseudo; // Or use the 'Quantize' method if you want more control.

  image.Write(@"E:\Development\DOTNET\PCXEditor\RGBEditor\1897525311-changed.pcx");
} 

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>