From a06d7ed70c80130be6503bbff865eb9c33a3d419 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 22 Jan 2013 19:15:42 +0000 Subject: [PATCH] --- coders/fits.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coders/fits.c b/coders/fits.c index 5872b16cc..c58b0a62a 100644 --- a/coders/fits.c +++ b/coders/fits.c @@ -445,6 +445,9 @@ static Image *ReadFITSImage(const ImageInfo *image_info, for (x=0; x < (ssize_t) image->columns; x++) { pixel=GetFITSPixel(image,fits_info.bits_per_pixel); + if ((image->depth == 16) || (image->depth == 32) || + (image->depth == 64)) + pixel-=pow(2.0,(double) image->depth-1); SetPixelGray(image,ClampToQuantum(scale*(fits_info.scale*(pixel- fits_info.min_data)+fits_info.zero)),q); q+=GetPixelChannels(image); -- 2.50.1