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

New Post: Converting a PDF to JPG and then scaling turns the image black

$
0
0
This is happening because the background of your PDF is transparent. When you save it as JPEG this will turn black for your PDF's. You should change the transparent pixels to a color with the ColorAlpha method:
foreach (MagickImage image in images)
{
  image.ColorAlpha(new MagickColor("#fff"));
  image.Write(fileName.Substring(0, fileName.Length - 4) + " Page " + page + ".jpg");
  page++;
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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