% July 1992 %
% %
% %
-% Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2018 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 %
% obtain a copy of the License at %
% %
-% http://www.imagemagick.org/script/license.php %
+% https://www.imagemagick.org/script/license.php %
% %
% Unless required by applicable law or agreed to in writing, software %
% distributed under the License is distributed on an "AS IS" BASIS, %
#include "MagickCore/memory_.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
+#include "MagickCore/option.h"
#include "MagickCore/pixel.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/property.h"
*/
static Image *ReadFPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
+ const char
+ *option;
+
FPXColorspace
colorspace;
Open image.
*/
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)
FPX_ClearSystem();
ThrowReaderException(CorruptImageError,"ImageTypeNotSupported");
}
- if (image_info->view == (char *) NULL)
+ option=GetImageOption(image_info,"fpx:view");
+ if (option == (const char *) NULL)
{
float
aspect_ratio;
Note image label.
*/
label=(char *) NULL;
- if (~summary_info.title.length >= (MaxTextExtent-1))
+ if (~summary_info.title.length >= (MagickPathExtent-1))
label=(char *) AcquireQuantumMemory(summary_info.title.length+
- MaxTextExtent,sizeof(*label));
+ MagickPathExtent,sizeof(*label));
if (label == (char *) NULL)
{
FPX_ClearSystem();
Note image comment.
*/
comments=(char *) NULL;
- if (~summary_info.comments.length >= (MaxTextExtent-1))
+ if (~summary_info.comments.length >= (MagickPathExtent-1))
comments=(char *) AcquireQuantumMemory(summary_info.comments.length+
- MaxTextExtent,sizeof(*comments));
+ MagickPathExtent,sizeof(*comments));
if (comments == (char *) NULL)
{
FPX_ClearSystem();
/*
Read FPX image tile (with or without viewing affine)..
*/
- if (image_info->view != (char *) NULL)
+ if (option != (const char *) NULL)
fpx_status=FPX_ReadImageRectangle(flashpix,0,y,image->columns,y+
tile_height-1,scene,&fpx_info);
else
entry->encoder=(EncodeImageHandler *) WriteFPXImage;
#endif
entry->flags^=CoderAdjoinFlag;
- entry->flags|=CoderSeekableStreamFlag;
entry->flags^=CoderBlobSupportFlag;
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
const char
*comment,
- *label;
+ *label,
+ *option;
FPXCompressionOption
compression;
Open input 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);
summary_info.title_valid=MagickTrue;
length=strlen(label);
summary_info.title.length=length;
- if (~length >= (MaxTextExtent-1))
+ if (~length >= (MagickPathExtent-1))
summary_info.title.ptr=(unsigned char *) AcquireQuantumMemory(
- length+MaxTextExtent,sizeof(*summary_info.title.ptr));
+ length+MagickPathExtent,sizeof(*summary_info.title.ptr));
if (summary_info.title.ptr == (unsigned char *) NULL)
ThrowWriterException(DelegateError,"UnableToSetImageTitle");
(void) CopyMagickString((char *) summary_info.title.ptr,label,
- MaxTextExtent);
+ MagickPathExtent);
}
comment=GetImageProperty(image,"comment",exception);
if (comment != (const char *) NULL)
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
- pixels=GetQuantumPixels(quantum_info);
+ pixels=(unsigned char *) GetQuantumPixels(quantum_info);
fpx_info.numberOfComponents=colorspace.numberOfComponents;
for (i=0; i < (ssize_t) fpx_info.numberOfComponents; i++)
{
break;
}
quantum_info=DestroyQuantumInfo(quantum_info);
- if (image_info->view != (char *) NULL)
+ option=GetImageOption(image_info,"fpx:view");
+ if (option != (const char *) NULL)
{
FPXAffineMatrix
affine;