32bit single channel tiffs?
Posted: 2008-04-04T08:29:33-07:00
I've been trying to use 'convert' to deal with some 32bit grayscale tiffs and the only thing I can get out is blank images (all 0 or 255 for example trying to convert to a .jpg for example).
I've tried more than a few variations, eg:
Probably missing something simple, so maybe somebody can give me a hint.
Trying say "identify -depth 32 -define quantum:format=floating-point image.tif" on IM Q16 gives:
Which doesn't make sense. Trying it on IM Q32 is a little better:
It get's the depth right, but the pixel values are all wrong. Some actual pixel statistics are in comment field in the header: min 21.0, max 6290.0 . Is this an endian-ness issue? Wrong rows/strip? Weird header? I'm a little out of my depth here...
Anyone have any ideas?
Is there anyway I can ignore the header? I looking at the raw binary data in Mathematica, and if you read in the last 256*256 32bit blocks I can plot those numbers (base 10) and reconstruct the image.
I've tried more than a few variations, eg:
Code: Select all
convert -depth 32 -define quantum:format=floating-point image.tif -equalize -depth 8 8bit.tif
convert -depth 32 -define quantum:format=floating-point image.tif -equalize image.jpg
etc
Probably missing something simple, so maybe somebody can give me a hint.
Trying say "identify -depth 32 -define quantum:format=floating-point image.tif" on IM Q16 gives:
Code: Select all
Image: image.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 256x256+0+0
Type: Bilevel
Endianess: MSB
Colorspace: Gray
Depth: 1-bit
Channel depth:
Gray: 1-bit
Channel statistics:
Gray:
Min: 1 (1)
Max: 1 (1)
Mean: 1 (1)
Standard deviation: 0 (0)
Histogram:
65536: (4294967295,4294967295,4294967295) #FFFFFFFFFFFFFFFFFFFFFFFF white
Rendering intent: Undefined
Resolution: 72x72
Units: PixelsPerInch
Filesize: 256.176kb
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 256x256+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Comment: ImageJ=1.38x
min=21.0
max=6290.0
Signature: 4927510809c83fb6af6d43e7a7d10e9c752e1c60febe566d490bdd72d9d37d36
Tiff:rows-per-strip: 8
Tainted: False
Version: ImageMagick 6.3.5 09/25/07 Q16 http://www.imagemagick.org
Code: Select all
Image: image.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 256x256+0+0
Resolution: 72x72
Print size: 3.55556x3.55556
Units: PixelsPerInch
Type: Bilevel
Endianess: MSB
Colorspace: Gray
Depth: 32-bit
Channel depth:
gray: 32-bit
Channel statistics:
gray:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: -0 (-0)
Histogram:
65536: ( 0, 0, 0) #000000000000000000000000 black
Rendering intent: Undefined
Interlace: None
Background color: rgb(255,255,255)
Border color: rgb(223,223,223)
Matte color: rgb(189,189,189)
Transparent color: rgb(1.16415e-08%,1.16415e-08%,1.16415e-08%)
Page geometry: 256x256+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
comment: ImageJ=1.38x
min=21.0
max=6290.0
create-date: 2008-04-03T13:42:21-04:00
modify-date: 2008-04-02T13:09:32-04:00
signature: 599c1bb5ffd4b87229a81958f33f1060821cd01cd7aa7ccafa0d862f4522f3f6
tiff:rows-per-strip: 8
Artifacts:
quantum:format: floating-point
verbose: true
Tainted: False
Filesize: 256.176kb
Number pixels: 64kb
Version: ImageMagick 6.4.0 04/03/08 Q32 http://www.imagemagick.org
Anyone have any ideas?
Is there anyway I can ignore the header? I looking at the raw binary data in Mathematica, and if you read in the last 256*256 32bit blocks I can plot those numbers (base 10) and reconstruct the image.