% July 1992 %
% %
% %
-% Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
case 4:
{
if (bits_per_pixel > 0)
- return((double) ((int) ReadBlobLong(image)));
+ return((double) ReadBlobSignedLong(image));
return((double) ReadBlobFloat(image));
}
case 8:
Open image file.
*/
assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickSignature);
+ assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickSignature);
+ assert(exception->signature == MagickCoreSignature);
image=AcquireImage(image_info,exception);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
(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
entry->encoder=(EncodeImageHandler *) WriteFITSImage;
entry->magick=(IsImageFormatHandler *) IsFITS;
entry->flags^=CoderAdjoinFlag;
- entry->flags|=CoderSeekableStreamFlag;
+ entry->flags|=CoderDecoderSeekableStreamFlag;
(void) RegisterMagickInfo(entry);
entry=AcquireMagickInfo("FITS","FTS","Flexible Image Transport System");
entry->decoder=(DecodeImageHandler *) ReadFITSImage;
entry->encoder=(EncodeImageHandler *) WriteFITSImage;
entry->magick=(IsImageFormatHandler *) IsFITS;
entry->flags^=CoderAdjoinFlag;
- entry->flags|=CoderSeekableStreamFlag;
+ entry->flags|=CoderDecoderSeekableStreamFlag;
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
Image *image,ExceptionInfo *exception)
{
char
+ *fits_info,
header[FITSBlocksize],
- *fits_info;
+ *url;
MagickBooleanType
status;
Open output image file.
*/
assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickSignature);
+ assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
- assert(image->signature == MagickSignature);
+ assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickSignature);
+ assert(exception->signature == MagickCoreSignature);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
(void) strncpy(fits_info+offset,header,strlen(header));
offset+=80;
}
- (void) FormatLocaleString(header,FITSBlocksize,"HISTORY %.72s",
- GetMagickVersion((size_t *) NULL));
+ url=GetMagickHomeURL();
+ (void) FormatLocaleString(header,FITSBlocksize,"HISTORY %.72s",url);
+ url=DestroyString(url);
(void) strncpy(fits_info+offset,header,strlen(header));
offset+=80;
(void) strncpy(header,"END",FITSBlocksize);