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

New Post: How to set ImageCollection (PSD) dpi?

$
0
0
How are you checking the DPI of your output image? The PSD writer use the Density of the first image in the collection. I am getting the correct output when I execute the following code:
using (MagickImageCollection psd = new MagickImageCollection())
{
  MagickImage logo = new MagickImage("logo:");
  logo.Density = new PointD(300);
  psd.Add(logo);

  byte[] data = psd.ToByteArray(MagickFormat.Psd);

  using (MagickImage result = new MagickImage(data))
  {
    Console.WriteLine(result.ToString());
    Console.WriteLine(result.Density.X + "x" + result.Density.Y);
  }
}
My output is below, are you using the latest version of Magick.NET?
Psd 640x480 8-bit sRGB 300.82kB
300x300

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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