Configure with HDRI and Quantum Depth >16?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Configure with HDRI and Quantum Depth >16?

Post by troy_s »

The following seems to repeatedly deliver a quantum depth of 16 when I check the output of configure:

Code: Select all

configure --enable-hdri --with-quantum-depth=32
Is this by design? Is it not possible to have a Q32 and HDRI enabled build?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

to help the IM developers, you should specify your IM version and platform.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

Apologies.

Linux amd64 SVN4656
Ubuntu 11.04
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

are you trying to install the current version of IM or some older version.

after your install what do you get from :

convert -version


might you have more than one version of IM installed?

type

which convert
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

From within the utilities directory of the compile using ./convert -version produces:

Code: Select all

Version: ImageMagick 6.7.0-10 2011-06-28 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP  HDRI
It seems the --with-quantum-depth=32 is ignored or overridden when using --enable-hdri.

When I disable the --enable-hdri, the Q32 is properly reported.

With both however, I get the "Sorry, can not handle images with 32-bit samples." error when attempting to load a 32 bpc tiff. Tried using the -define quantum:format, depth, etc. and the same sample error results every time.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

For the record, here are two sample files ImageMagick is struggling with, regardless of compilation and settings flags:

https://s3.amazonaws.com/sample-images/ ... bpc-00.tif
https://s3.amazonaws.com/sample-images/ ... bpc-01.tif

Both images contain 32 bit information.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

On my Mac OSX Tiger, IM 6.7.0.9 Q16 (non-hdri) I get a totally black image. What are you trying to do with such an image?


identify -verbose sample32bpc-00.tif
Image: sample32bpc-00.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 315x374+0+0
Resolution: 72x72
Print size: 4.375x5.19444
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: RGB
Depth: 32/1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: -0 (-0)
kurtosis: 0
skewness: 0

Colors: 1
Histogram:
117810: ( 0, 0, 0) #000000000000000000000000 black
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 315x374+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
date:create: 2011-06-28T16:26:30-07:00
date:modify: 2011-06-28T16:10:58-07:00
quantum:format: floating-point
signature: a1cd17a4013b03723fca6f7c4d567c8b87988b9205cc7ac02f0d51724ec815ac
tiff:endian: lsb
tiff:photometric: min-is-black
Artifacts:
verbose: true
Tainted: False
Filesize: 40.6KBB
Number pixels: 118KB
Pixels per second: 842KB
User time: 0.010u
Elapsed time: 0:01.140
Version: ImageMagick 6.7.0-9 2011-06-26 Q16 http://www.imagemagick.org

Then some warnings and one error:

identify: sample32bpc-00.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 34735 (0x87af) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 34736 (0x87b0) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 34737 (0x87b1) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: sample32bpc-00.tif: unknown field with tag 42113 (0xa481) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
identify: Sorry, can not handle images with 32-bit samples. `sample32bpc-00.tif' @ error/tiff.c/TIFFErrors/496.

This is to be expected as I am in Q16 non-hdri mode.
Last edited by fmw42 on 2011-06-28T16:32:55-07:00, edited 2 times in total.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

Yes. The image data handled by identify is incorrect.

That said, while identify can output information, convert and like tools will not handle the image, at any quantum depth.

The image has data saved as a 32 bit greyscale image. Trying to leverage that greyscale data into other areas is the goal. ImageMagick is unable to convert it or deal with it. I'd be interested in solving both the 32 sample error and figure out how to extract meaningful data from those TIFFs.

In summary, I cannot convert due to that sample error.
I am also unable to compile both HDRI with >Q16.
I am also unable to get any meaningful data out of those TIFFs even with a disabled HDRI and enabling Q32, as the sampling error always appears.
Last edited by troy_s on 2011-06-28T16:37:25-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

In principle, one should be able to use -depth 32 -define quantum:format=floating-point to process such an image. But perhaps only if in HDRI mode, though I don't think it needs to be Q32.

But your image appears to have no meaningful data as it is all black.

But I guess you need to wait to hear from Magick about the compile issue.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

Your image seems to open fine in ImageJ, but is still all black.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

Your image seems to open fine in ImageJ, but is still all black.
ImageJ reportedly threw an error about tiled TIFFs. I cannot confirm this, as it wasn't I that conducted the test.

It has also been reported that Photoshop handles the TIFFs and reveals the data correctly.
In principle, one should be able to use -depth 32 -define quantum:format=floating-point to process such an image.
And the above quantum settings always fails on the sample issue you revealed above. That problem persists even on Q32 builds, which was the starting point of this thread.

Thanks for your help Fred.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

In IM, this command does display the image, though I get the same messages.


display -depth 32 -define quantum:format=floating-point sample32bpc-00.tif
display: sample32bpc-00.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 34735 (0x87af) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 34736 (0x87b0) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 34737 (0x87b1) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: sample32bpc-00.tif: unknown field with tag 42113 (0xa481) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
display: Sorry, can not handle images with 32-bit samples. `sample32bpc-00.tif' @ error/tiff.c/TIFFErrors/496.

Again the image is totally black.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

Version: ImageMagick 6.7.0-10 2011-06-28 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP HDRI
This (6.7.0.10) has to be a beta as I don't see it available yet. Perhaps you should try with the last released version of IM and see if you can get Q32 HDRI. You might also try with openMP disabled.
troy_s
Posts: 23
Joined: 2010-11-28T01:57:31-07:00
Authentication code: 8675308

Re: Configure with HDRI and Quantum Depth >16?

Post by troy_s »

No precompiled Q32s available. And I can't compile it with both.

Configure doesn't output an error, but when you scroll and look to the --with-quantum-depth, it always reads 16 with HDRI enabled, despite offering up =32 on the configure line.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Configure with HDRI and Quantum Depth >16?

Post by fmw42 »

what happens if you compile manually with Q16 HDRI and then try to process your image using -depth 32 -define quantum:format=floating-point
Post Reply