]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 28 Feb 2015 22:57:28 +0000 (22:57 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 28 Feb 2015 22:57:28 +0000 (22:57 +0000)
MagickCore/nt-base.h
MagickCore/random.c
MagickCore/resource.c
MagickCore/version.h
MagickCore/xml-tree.c
MagickCore/xwindow.c
coders/uil.c
utilities/montage.1

index ed184e1f21bf929fedef87f1dae4715241d3b56f..c343b6e6a35a458080710a7a3019b3cf90b55487 100644 (file)
@@ -248,6 +248,9 @@ extern "C" {
 #if !defined(tempnam)
 #  define tempnam  _tempnam_s
 #endif
+#if !defined(umask)
+#  define umask  _umask
+#endif
 #if !defined(unlink)
 #  define unlink  _unlink
 #endif
index 9f7223fff290d9e2f2383008f72f302445dd954d..830d2d0ae16a92d74c1e42bbfe2d88a35a08e0ad 100644 (file)
@@ -451,11 +451,14 @@ static StringInfo *GenerateEntropicChaos(RandomInfo *random_info)
 
     (void) GetPathTemplate(path);
     file=mkstemp(path);
+    if (file != -1)
+      {
+        (void) fchmod(file,0600);
 #if defined(__OS2__)
-    setmode(file,O_BINARY);
+        setmode(file,O_BINARY);
 #endif
-    if (file != -1)
-      (void) close(file);
+        (void) close(file);
+      }
     (void) remove_utf8(path);
     SetStringInfoLength(chaos,strlen(path));
     SetStringInfoDatum(chaos,(unsigned char *) path);
index 330d79a481211dc1e979713110468cb6f2bb0797..1031dad69d07bd3245f7a87faa6e4e9784ed2d20 100644 (file)
@@ -524,11 +524,14 @@ MagickExport int AcquireUniqueFileResource(char *path)
     key=DestroyStringInfo(key);
 #if defined(MAGICKCORE_HAVE_MKSTEMP)
     file=mkstemp(path);
+    if (file != -1)
+      {
+        (void) fchmod(file,0600);
 #if defined(__OS2__)
-    setmode(file,O_BINARY);
+        setmode(file,O_BINARY);
 #endif
-    if (file != -1)
-      break;
+        break;
+      }
 #endif
     key=GetRandomKey(random_info,12);
     p=path+strlen(path)-12;
index 83ccf80976b4c26cf40d6df09aa9f231c81bcb68..a94ebb42cbbb0c5f164803ddbe84d45f3ef46356 100644 (file)
@@ -48,7 +48,7 @@ extern "C" {
 #define MagickppLibAddendum  "-0"
 #define MagickppLibInterface  1
 #define MagickppLibMinInterface  1
-#define MagickReleaseDate  "2015-02-18"
+#define MagickReleaseDate  "2015-02-28"
 #define MagickChangeDate   "20120427"
 #define MagickAuthoritativeLicense  \
   "http://www.imagemagick.org/script/license.php"
index 5b71e31fc51db102f3a289b826f3fb714c64007e..ece5c568d4f05bfc0422c7f41fe5b5a2629cd87b 100644 (file)
@@ -1648,7 +1648,7 @@ static void ParseProcessingInstructions(XMLTreeRoot *root,char *xml,
       if (root->processing_instructions == (char ***) NULL)
         ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
       root->processing_instructions[i]=(char **) AcquireQuantumMemory(3,
-        sizeof(**root->processing_instructions));
+        sizeof(*root->processing_instructions));
       if (root->processing_instructions[i] == (char **) NULL)
         ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
       root->processing_instructions[i+1]=(char **) NULL;
@@ -1663,7 +1663,7 @@ static void ParseProcessingInstructions(XMLTreeRoot *root,char *xml,
     j++;
   root->processing_instructions[i]=(char **) ResizeQuantumMemory(
     root->processing_instructions[i],(size_t) (j+3),
-    sizeof(**root->processing_instructions));
+    sizeof(*root->processing_instructions));
   if (root->processing_instructions[i] == (char **) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   root->processing_instructions[i][j+2]=(char *) ResizeQuantumMemory(
index 56bc5b40ff2ce5a4fab0faf6e984cd58c11cf67d..250989323a82c2b279fa2a92de70973a87e62cb6 100644 (file)
@@ -3064,7 +3064,7 @@ MagickPrivate void XGetPixelInfo(Display *display,
   if (pixel->pixels != (unsigned long *) NULL)
     pixel->pixels=(unsigned long *) RelinquishMagickMemory(pixel->pixels);
   pixel->pixels=(unsigned long *) AcquireQuantumMemory(packets,
-    sizeof(pixel->pixels));
+    sizeof(*pixel->pixels));
   if (pixel->pixels == (unsigned long *) NULL)
     ThrowXWindowFatalException(ResourceLimitFatalError,"UnableToGetPixelInfo",
       image->filename);
@@ -5954,7 +5954,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
         (XPixelIntensity(&window->pixel_info->background_color) <
          XPixelIntensity(&window->pixel_info->foreground_color) ? 0x80 : 0x00);
       polarity=(unsigned short) ((GetPixelInfoIntensity(image,
-        &canvas->colormap[0])) < (QuantumRange/2) ? 1 : 0);
+        &canvas->colormap[0])) < (QuantumRange/2.0) ? 1 : 0);
       if (canvas->colors == 2)
         polarity=GetPixelInfoIntensity(image,&canvas->colormap[0]) <
           GetPixelInfoIntensity(image,&canvas->colormap[1]);
@@ -6571,7 +6571,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
         (XPixelIntensity(&window->pixel_info->background_color) <
          XPixelIntensity(&window->pixel_info->foreground_color) ?  0x01 : 0x00);
       polarity=(unsigned short) ((GetPixelInfoIntensity(image,
-        &canvas->colormap[0])) < (QuantumRange/2) ? 1 : 0);
+        &canvas->colormap[0])) < (QuantumRange/2.0) ? 1 : 0);
       if (canvas->colors == 2)
         polarity=GetPixelInfoIntensity(image,&canvas->colormap[0]) <
           GetPixelInfoIntensity(image,&canvas->colormap[1]);
index b0fd8601d767709a6d963e01b5c6cfd0652e77b2..555b531d37a6120c7cdc27c57108dd03af45e3d3 100644 (file)
@@ -329,7 +329,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
       (void) FormatLocaleString(buffer,MaxTextExtent,
         "    color('%s',%s) = '%s'",name,
         GetPixelInfoIntensity(image,image->colormap+i) <
-        (QuantumRange/2) ? "background" : "foreground",symbol);
+        (QuantumRange/2.0) ? "background" : "foreground",symbol);
     (void) WriteBlobString(image,buffer);
     (void) FormatLocaleString(buffer,MaxTextExtent,"%s",
       (i == (ssize_t) (colors-1) ? ");\n" : ",\n"));
index a1985e5b72b19e466d8a875ddd227dbdb83cbde8..ea2099210591d6d051c1ca3644a62017c465c96b 100644 (file)
@@ -106,6 +106,7 @@ Image Operators:
   \-repage geometry     size and location of an image canvas (operator)
   \-resize geometry     resize the image
   \-rotate degrees      apply Paeth rotation to the image
+  \-scale geometry      scale the image
   \-strip               strip image of all profiles and comments
   \-transform           affine transform image
   \-transpose           flip image vertically and rotate 90 degrees