% July 1992 %
% %
% %
-% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 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 %
/*
Include declarations.
*/
-#include "magick/studio.h"
-#include "magick/property.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/constitute.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/geometry.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/log.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/monitor.h"
-#include "magick/monitor-private.h"
-#include "magick/montage.h"
-#include "magick/quantum-private.h"
-#include "magick/resize.h"
-#include "magick/static.h"
-#include "magick/string_.h"
-#include "magick/module.h"
-#include "magick/utility.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/property.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/geometry.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/log.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/monitor.h"
+#include "MagickCore/monitor-private.h"
+#include "MagickCore/montage.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/resize.h"
+#include "MagickCore/static.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
+#include "MagickCore/utility.h"
\f
/*
Forward declarations.
*/
static MagickBooleanType
- WriteVIDImage(const ImageInfo *,Image *);
+ WriteVIDImage(const ImageInfo *,Image *,ExceptionInfo *);
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RectangleInfo
geometry;
- register long
+ register ssize_t
i;
/*
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- image=AcquireImage(image_info);
- filelist=(char **) AcquireAlignedMemory(1,sizeof(*filelist));
+ image=AcquireImage(image_info,exception);
+ filelist=(char **) AcquireMagickMemory(sizeof(*filelist));
if (filelist == (char **) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
filelist[0]=ConstantString(image_info->filename);
(void *) NULL);
if (read_info->size == (char *) NULL)
(void) CloneString(&read_info->size,DefaultTileGeometry);
- for (i=0; i < (long) number_files; i++)
+ for (i=0; i < (ssize_t) number_files; i++)
{
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"name: %s",
CatchException(exception);
if (next_image == (Image *) NULL)
break;
- label=InterpretImageProperties(image_info,next_image,DefaultTileLabel);
- (void) SetImageProperty(next_image,"label",label);
+ label=InterpretImageProperties(image_info,next_image,DefaultTileLabel,
+ exception);
+ (void) SetImageProperty(next_image,"label",label,exception);
label=DestroyString(label);
if (image_info->debug != MagickFalse)
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"geometry: %ldx%ld",
- next_image->columns,next_image->rows);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "geometry: %.20gx%.20g",(double) next_image->columns,(double)
+ next_image->rows);
SetGeometry(next_image,&geometry);
(void) ParseMetaGeometry(read_info->size,&geometry.x,&geometry.y,
&geometry.width,&geometry.height);
}
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "thumbnail geometry: %ldx%ld",next_image->columns,next_image->rows);
+ "thumbnail geometry: %.20gx%.20g",(double) next_image->columns,(double)
+ next_image->rows);
AppendImageToList(&images,next_image);
status=SetImageProgress(images,LoadImagesTag,i,number_files);
if (status == MagickFalse)
%
% The format of the RegisterVIDImage method is:
%
-% unsigned long RegisterVIDImage(void)
+% size_t RegisterVIDImage(void)
%
*/
-ModuleExport unsigned long RegisterVIDImage(void)
+ModuleExport size_t RegisterVIDImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("VID");
entry->decoder=(DecodeImageHandler *) ReadVIDImage;
entry->encoder=(EncodeImageHandler *) WriteVIDImage;
- entry->format_type=ExplicitFormatType;
+ entry->format_type=ImplicitFormatType;
entry->description=ConstantString("Visual Image Directory");
entry->module=ConstantString("VID");
(void) RegisterMagickInfo(entry);
%
% The format of the WriteVIDImage method is:
%
-% MagickBooleanType WriteVIDImage(const ImageInfo *image_info,Image *image)
+% MagickBooleanType WriteVIDImage(const ImageInfo *image_info,
+% Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows.
%
%
% o image: The image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-static MagickBooleanType WriteVIDImage(const ImageInfo *image_info,Image *image)
+static MagickBooleanType WriteVIDImage(const ImageInfo *image_info,Image *image,
+ ExceptionInfo *exception)
{
Image
*montage_image;
Create the visual image directory.
*/
for (p=image; p != (Image *) NULL; p=GetNextImageInList(p))
- (void) SetImageProperty(p,"label",DefaultTileLabel);
+ (void) SetImageProperty(p,"label",DefaultTileLabel,exception);
montage_info=CloneMontageInfo(image_info,(MontageInfo *) NULL);
- montage_image=MontageImageList(image_info,montage_info,image,
- &image->exception);
+ montage_image=MontageImageList(image_info,montage_info,image,exception);
montage_info=DestroyMontageInfo(montage_info);
if (montage_image == (Image *) NULL)
- ThrowWriterException(CorruptImageError,image->exception.reason);
+ return(MagickFalse);
(void) CopyMagickString(montage_image->filename,image_info->filename,
MaxTextExtent);
write_info=CloneImageInfo(image_info);
- (void) SetImageInfo(write_info,MagickTrue,&image->exception);
+ (void) SetImageInfo(write_info,1,exception);
if (LocaleCompare(write_info->magick,"VID") == 0)
- (void) FormatMagickString(montage_image->filename,MaxTextExtent,
+ (void) FormatLocaleString(montage_image->filename,MaxTextExtent,
"miff:%s",write_info->filename);
- status=WriteImage(write_info,montage_image);
+ status=WriteImage(write_info,montage_image,exception);
montage_image=DestroyImage(montage_image);
write_info=DestroyImageInfo(write_info);
return(status);