]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31028
authorCristy <urban-warrior@imagemagick.org>
Sat, 10 Dec 2016 13:36:01 +0000 (08:36 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 10 Dec 2016 13:36:01 +0000 (08:36 -0500)
ChangeLog
coders/fits.c

index 8c080a0cfaac3f7d19e29ecd2a1d2017d4ce50dc..7fe28cfc8c0b929f28093dea46e017c4e05ff660 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@
     https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31016).
   * Return correct offset for negative index for -fx option (reference
     https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31019).
+  * Fixed improper scaling of certain FITS images (reference
+    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31028).
 
 2016-12-05  7.0.3-9 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.3-9, GIT revision 19139:6fed3f1:20161205.
index 24e71f57cf9bbe8c068dd1f774a319882417ff1c..d414fe3d4be08fcefe41ef009f97fb7abde6d76c 100644 (file)
@@ -435,7 +435,8 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
     (void) SetImageColorspace(image,GRAYColorspace,exception);
     if ((fits_info.min_data == 0.0) && (fits_info.max_data == 0.0))
       {
-        if (fits_info.zero == 0.0)
+        if ((fits_info.bits_per_pixel == -32) ||
+            (fits_info.bits_per_pixel == -64))
           (void) GetFITSPixelExtrema(image,fits_info.bits_per_pixel,
             &fits_info.min_data,&fits_info.max_data);
         else