Page 1 of 1
Covert 16-bit pgm to 16-bit JPEG
Posted: 2008-04-06T13:40:56-07:00
by jackhab
Is it possible to covert 16-bit pgm to 16-bit JPEG? I converted pgm to 16-bit tiff, but when I tried to converted to jpg ImageMagick creates 8-bit image.
I use 16-bit version 6.4.0.3.
Thanks.
Re: Covert 16-bit pgm to 16-bit JPEG
Posted: 2008-04-06T14:21:40-07:00
by fmw42
If it does not do it automatically, then try adding -depth 16
convert image.pgm -depth 16 image.jpg
See if that works.
Re: Covert 16-bit pgm to 16-bit JPEG
Posted: 2008-04-06T16:28:38-07:00
by magick
JPEG supports 8 and 12 bit images. However, you have to enable 12-bit support when you build the JPEG delegate library before 12-bit JPEG images can be written with ImageMagick.
Re: Covert 16-bit pgm to 16-bit JPEG
Posted: 2008-04-07T12:56:54-07:00
by jackhab
magick wrote:JPEG supports 8 and 12 bit images. However, you have to enable 12-bit support when you build the JPEG delegate library before 12-bit JPEG images can be written with ImageMagick.
I've never compiled ImageMagick. Would you, please, give me some details on that?
I managed to get 24-bit jpeg with
but it seems to simply ignore when I request the depth of 12.
Re: Covert 16-bit pgm to 16-bit JPEG
Posted: 2008-04-07T13:28:49-07:00
by magick
ImageMagick cannot create 12-bit JPEG images until the JPEG delegate library is first compiled with 12-bit support (the default is 8-bit). To compile ImageMagick from source see
http://www.imagemagick.org/script/install-source.php.