Image Density in jp2 format being lost

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Keith.Vinson
Posts: 22
Joined: 2017-08-30T12:59:12-07:00
Authentication code: 1151

Image Density in jp2 format being lost

Post by Keith.Vinson »

Hi all,
When I save an image in jp2 format the density info seems to get lost.
To test this I looked at the density info before saving the file, the using a MagickImageInfo class I reloaded the outputfile and looked at the density info, it was not populated. Am I missing something?
Thanks,

Keith
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Image Density in jp2 format being lost

Post by dlemstra »

The JP2 format currently does not support writing density. See viewtopic.php?t=10971#p35228 and http://studio.imagemagick.org/discourse ... 807#p56554. We now use OpenJPEG instead of jasper. If you can point me to documentation on the OpenJPEG site (http://www.openjpeg.org/) on how we should read/write the DPI I might be able to add support for this.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Keith.Vinson
Posts: 22
Joined: 2017-08-30T12:59:12-07:00
Authentication code: 1151

Re: Image Density in jp2 format being lost

Post by Keith.Vinson »

OK, thanks for the reply. I'll keeps your request in the back of my mind. I'll post if I come across a method to set the density in the OpenJPEG library...
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Image Density in jp2 format being lost

Post by dlemstra »

I asked one of the OpenJPEG developers on twitter if it possible to read/write dpi. I was told that it is currently not possible with the OpenJPEG library. I might be able to create a patch for this but I don't know when I will have time for that.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply