#if !defined(tempnam)
# define tempnam _tempnam_s
#endif
+#if !defined(umask)
+# define umask _umask
+#endif
#if !defined(unlink)
# define unlink _unlink
#endif
(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);
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;
#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"
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;
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(
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);
(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]);
(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]);
(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"));
\-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