]> granicus.if.org Git - imagemagick/commitdiff
https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35082
authorCristy <urban-warrior@imagemagick.org>
Tue, 27 Nov 2018 00:36:14 +0000 (19:36 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 27 Nov 2018 00:36:14 +0000 (19:36 -0500)
coders/fits.c

index 40d6a84fbb19e390773100a39956166bba019094..4bc5a8ecd60ffe9d950e8746c799bf87a6529f5a 100644 (file)
@@ -723,7 +723,7 @@ static MagickBooleanType WriteFITSImage(const ImageInfo *image_info,
   CopyFitsRecord(fits_info,header,offset);
   offset+=80;
   (void) FormatLocaleString(header,FITSBlocksize,"BZERO   =         %E",
-    image->depth > 8 ? GetFITSPixelRange(image->depth)/2.0 : 0.0);
+    image->depth > 8 ? (GetFITSPixelRange(image->depth)+1)/2.0 : 0.0);
   CopyFitsRecord(fits_info,header,offset);
   offset+=80;
   (void) FormatLocaleString(header,FITSBlocksize,"DATAMAX =         %E",