PCX to PDF conversion inverts some colors to black
Posted: 2016-01-25T15:26:41-07:00
I am trying to convert a PCX image to PDF. The colors are sort of inverted. I says "sort of" because I tried purposely inverting the colors using Negate() and the output was different.
Here is a screenshot of what I am seeing with native PCX image on left and ImageMagick PDF on the right:
My code is very, very simple:
Any ideas why the colors are being swapped / inverted?
Thank you.
Here is a screenshot of what I am seeing with native PCX image on left and ImageMagick PDF on the right:
My code is very, very simple:
Code: Select all
using (MagickImageCollection imgcoll = new MagickImageCollection(inpath))
{
using (MagickImageCollection pdfcoll = new MagickImageCollection())
{
foreach (MagickImage img in imgcoll)
{
pdfcoll.Add(img);
}
if (!Directory.Exists(new FileInfo(outpath).DirectoryName))
{ Directory.CreateDirectory(new FileInfo(outpath).DirectoryName); }
pdfcoll.Write(outpath);
}
}
Thank you.