]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 6 Apr 2010 13:10:46 +0000 (13:10 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 6 Apr 2010 13:10:46 +0000 (13:10 +0000)
coders/cals.c
coders/wmf.c

index 25e48c538899ad6ae1a72afc3649700f94c922b5..91c72196a4a456a1cf1c6af5245031185d8b9cf9 100644 (file)
@@ -228,7 +228,7 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
             if (pel_path == 90)
               orientation=5;
             else
-              if (pel_path == 90)
+              if (pel_path == 180)
                 orientation=3;
               else
                 if (pel_path == 270)
index 96bdf3c71e3cfbbdef3fa71cb9b5923d66984ee1..7a36a1927ca840dd804c970fd8f999c736710839 100644 (file)
@@ -65,7 +65,7 @@
 
 #if defined(MAGICKCORE_WMF_DELEGATE)
 #include "libwmf/api.h"
-#include "libwmf/gd.h"
+#include "libwmf/eps.h"
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -138,8 +138,8 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   wmfD_Rect
     bounding_box;
 
-  wmf_gd_t
-   *gd_info;
+  wmf_eps_t
+   *eps_info;
 
   wmf_error_t
     status;
@@ -158,7 +158,7 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   flags=0;
   flags|=WMF_OPT_IGNORE_NONFATAL;
   flags|=WMF_OPT_FUNCTION;
-  options.function=wmf_gd_function;
+  options.function=wmf_eps_function;
   status=wmf_api_create(&wmf_info,flags,&options);
   if (status != wmf_E_None)
     {
@@ -182,7 +182,7 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       wmf_api_destroy(wmf_info);
       ThrowReaderException(DelegateError,"FailedToScanFile");
     }
-  gd_info=WMF_GD_GetData(wmf_info);
+  eps_info=WMF_EPS_GetData(wmf_info);
   file=(FILE *) NULL;
   unique_file=AcquireUniqueFileResource(filename);
   if (unique_file != -1)
@@ -192,11 +192,8 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       wmf_api_destroy(wmf_info);
       ThrowReaderException(FileOpenError,"UnableToCreateTemporaryFile");
     }
-  gd_info->flags|=WMF_GD_OUTPUT_FILE;
-  gd_info->file=file;
-  gd_info->bbox=bounding_box;
-  wmf_display_size(wmf_info,&gd_info->width,&gd_info->height,
-    ceil(image->x_resolution-0.5),ceil(image->y_resolution-0.5));
+  eps_info->out=wmf_stream_create(wmf_info,file);
+  eps_info->bbox=bounding_box;
   status=wmf_play(wmf_info,0,&bounding_box);
   if (status != wmf_E_None)
     {
@@ -208,10 +205,10 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   (void) CloseBlob(image);
   image=DestroyImage(image);
   /*
-    Read GD image.
+    Read EPS image.
   */
   read_info=CloneImageInfo(image_info);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"png:%.1024s",
+  (void) FormatMagickString(read_info->filename,MaxTextExtent,"eps:%.1024s",
     filename);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);