Page 1 of 1

6.7.7-2 FITS file conversion bug

Posted: 2012-06-11T03:06:23-07:00
by tvw
I'm trying to crop a FITS file 'wavefront.fits' using the command:

Code: Select all

convert wavefront.fits -depth 8 -crop 1024x768+0+128 wavefront-crop.fits
The source file is 1024x1024 pixels the data is stored as 32 bit floats (BITPIX = -32). I expect the output file to be 1024x768 stored as 8 bit ints (BITPIX = 8 ). With ImageMagick 6.5.7-8 2012-04-30 this worked fine, but with ImageMagick 6.7.7-2 2012-06-11 I suddenly get a data cube of 1024x768x3 stored as 8 bit ints. Somehow the data is duplicated three times in the output file, as if it was converted to RGB channels (or something similar because RGB is obviously not supported by the FITS standard).

When I inspect the files with

Code: Select all

convert wavefront.fits -verbose info:
I get:

[*]The input file gives: http://pastebin.com/QHifuQwf
[*]The cropped output file should give (6.5.7-8 2012-04-30): http://pastebin.com/xX2giYRZ
[*]The cropped output file instead gives (6.7.7-2 2012-06-11): http://pastebin.com/kEwjDU5t

Am I doing something wrong when converting? I think this might be a bug in the convert utility, as it used to work as expected. Does anyone know what's going wrong? Thanks in advance!