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

New Post: Convert PDF to a set of PJPEG files

$
0
0
You should not write an jpeg and then open it to modify it, you will lose image information. With the following example I am able to create the page with a white background:
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(144, 144);
settings.ColorSpace = ColorSpace.sRGB;

using (MagickImageCollection images = new MagickImageCollection())
{
  images.Read("29_6a Farmout Flyer April 2012.pdf", settings);
  
  MagickImage coverPage = images.First();
  coverPage.Resize(0, 500);
  coverPage.ColorAlpha(new MagickColor("#fff"));
  coverPage.Quality = 80;
  coverPage.Write("PJPEG:29_6a Farmout Flyer April 2012.jpg");
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles