IM convert leads to loss of details on a 16-bit tif image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM convert leads to loss of details on a 16-bit tif image

Post by snibgo »

For some operations (and output types), IM will count the number of values in the image, and save as 8-bit if that doesn't discard data. For example:

Code: Select all

convert 1481059547.tiff x.png
x.png is only 8-bit/channel.

Perhaps when PS proceses 8-bit files, it processes in only 8 bits.
snibgo's IM pages: im.snibgo.com
swiss_knight
Posts: 14
Joined: 2013-05-01T08:12:46-07:00
Authentication code: 6789

Re: IM convert leads to loss of details on a 16-bit tif image

Post by swiss_knight »

Hi,

I confirm the image I uploaded was the original one (no IM command used before, it's a raw image).
So, by only doing:

Code: Select all

convert myimage.tif output2.tif 
the result is as seen before; there is some kind of compression -> quality loss.
Plus, there is some strange stripes at the right of the image. Here are the original and output image again, print screen from Photoshop:

Original:
Image
IM processed:
Image
(at this zoomed out level, the quality loss is not discernible, but it is really there as show on previous page).


Here are the differences between the two files (left=original, right=output) with the

Code: Select all

identify -verbose
command:
Image
No real infos here...


And here's the result from

Code: Select all

exiftool -all -G0
( http://www.sno.phy.queensu.ca/~phil/exiftool/ ):
Image
(lot of EXIF data are lost after using ImageMagick.....)

I was also wondering... this may be a Photoshop issue, but in that case, why does the images processed with gdal for example look exactly like the original and not the ones processed with IM?

I also tried to visualize input and output images on a raw processing software for Photographs (Darktable) on my Linux platform, I can also see the loss of detail on the output image...


Thanks a lot for your help! :)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM convert leads to loss of details on a 16-bit tif image

Post by snibgo »

Something strange is happening. For example, with IM v6.9.5-3:

Code: Select all

convert 1481059547.tiff a1.png
When viewed in Microsoft Photo Viewer, 1481059547.tiff looks almost black, but a1.png has clear "noise" in a strip down the right side.

I can't explain that. Perhaps a developer will take a look.
snibgo's IM pages: im.snibgo.com
Post Reply