From: cristy Date: Thu, 19 Nov 2009 02:04:10 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~10372 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=acee8124b94b14727dbc96d8450390bbb8ee03e4;p=imagemagick --- diff --git a/ChangeLog b/ChangeLog index 6b898cb38..5c90e05e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-11-18 6.5.7-9 Cristy + * Read / write 32-bit SUN raster images with a odd width. + 2009-11-12 6.5.7-8 Cristy * Thumb::URI file URI now has the correct number of forward slashes. diff --git a/coders/sun.c b/coders/sun.c index cec671285..a43267575 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -311,7 +311,8 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) image->rows=sun_info.height; if ((sun_info.depth == 0) || (sun_info.depth > 32)) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); - image->depth=sun_info.depth <= 8 ? sun_info.depth : MAGICKCORE_QUANTUM_DEPTH; + image->depth=sun_info.depth <= 8 ? sun_info.depth : + MAGICKCORE_QUANTUM_DEPTH; if (sun_info.depth < 24) { image->storage_class=PseudoClass; @@ -495,8 +496,14 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) } else { - length=image->rows*((image->columns*(image->matte != MagickFalse ? 4 : - 3))+image->columns % 2); + size_t + bytes_per_pixel; + + bytes_per_pixel=3; + if (image->matte != MagickFalse) + bytes_per_pixel++; + length=image->rows*((bytes_per_line*image->columns)+ + image->columns % 2); if (((sun_info.type == RT_ENCODED) && (length > (bytes_per_line*image->rows))) || ((sun_info.type != RT_ENCODED) && (length > sun_info.length))) @@ -530,7 +537,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) } q++; } - if ((image->columns % 2) != 0) + if (((bytes_per_pixel*image->columns) % 2) != 0) p++; if (SyncAuthenticPixels(image,exception) == MagickFalse) break; @@ -759,9 +766,9 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image) /* Full color SUN raster. */ - sun_info.depth=(image->matte ? 32U : 24U); + sun_info.depth=image->matte ? 32U : 24U; sun_info.length=(unsigned int) ((image->matte ? 4 : 3)*number_pixels); - sun_info.length+=image->columns & 0x01 ? image->rows : 0; + sun_info.length+=sun_info.length & 0x01 ? image->rows : 0; } else if (IsMonochromeImage(image,&image->exception)) @@ -808,6 +815,7 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image) *q; size_t + bytes_per_pixel, length; unsigned char @@ -816,6 +824,9 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image) /* Allocate memory for pixels. */ + bytes_per_pixel=3; + if (image->matte != MagickFalse) + bytes_per_pixel++; length=image->columns; pixels=(unsigned char *) AcquireQuantumMemory(length,4*sizeof(*pixels)); if (pixels == (unsigned char *) NULL) @@ -838,8 +849,8 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image) *q++=ScaleQuantumToChar(p->blue); p++; } - if (image->columns & 0x01) - *q++=0; /* pad scanline */ + if (((bytes_per_pixel*image->columns) & 0x01) != 0) + *q++='\0'; /* pad scanline */ (void) WriteBlob(image,(size_t) (q-pixels),pixels); if (image->previous == (Image *) NULL) { @@ -924,7 +935,7 @@ static MagickBooleanType WriteSUNImage(const ImageInfo *image_info,Image *image) (void) WriteBlobByte(image,(unsigned char) indexes[x]); p++; } - if ((image->columns & 0x01) != 0) + if (image->columns & 0x01) (void) WriteBlobByte(image,0); /* pad scanline */ if (image->previous == (Image *) NULL) { diff --git a/index.html b/index.html index e43979d99..a8c8fd1a5 100644 --- a/index.html +++ b/index.html @@ -124,7 +124,7 @@
diff --git a/www/advanced-unix-installation.html b/www/advanced-unix-installation.html index d8f6b3a45..7bcf18500 100644 --- a/www/advanced-unix-installation.html +++ b/www/advanced-unix-installation.html @@ -123,9 +123,6 @@ Sponsors:
- @@ -602,7 +599,7 @@ Options used to compile and link: Discourse ServerMailing Lists • - Studio + Studio  
diff --git a/www/animate.html b/www/animate.html index b4f2884c9..8e7e64820 100644 --- a/www/animate.html +++ b/www/animate.html @@ -125,7 +125,7 @@
diff --git a/www/api.html b/www/api.html index 6dc3171ec..7988fc897 100644 --- a/www/api.html +++ b/www/api.html @@ -163,7 +163,7 @@

Ada

-

G2F implements an Ada 95 binding to a subset of the low-level MagickCore library.

+

G2F implements an Ada 95 binding to a subset of the low-level MagickCore library.

C

@@ -175,7 +175,7 @@

Ch

-

ChMagick is a Ch binding to the MagickCore and MagickWand API. Ch is an embeddable C/C++ interpreter for cross-platform scripting.

+

ChMagick is a Ch binding to the MagickCore and MagickWand API. Ch is an embeddable C/C++ interpreter for cross-platform scripting.

COM+

@@ -187,31 +187,31 @@

C++

-

Magick++ provides an object-oriented C++ interface to ImageMagick. See A Gentle Introduction to Magick++ for an introductory tutorial to Magick++. We include the source if you want to correct, enhance, or expand the tutorial.

+

Magick++ provides an object-oriented C++ interface to ImageMagick. See A Gentle Introduction to Magick++ for an introductory tutorial to Magick++. We include the source if you want to correct, enhance, or expand the tutorial.

Java

-

JMagick provides an object-oriented Java interface to ImageMagick. Im4java is a pure-java interface to the ImageMagick command-line.

+

JMagick provides an object-oriented Java interface to ImageMagick. Im4java is a pure-java interface to the ImageMagick command-line.

LabVIEW

-

LVOOP ImageMagick is an object-oriented LabVIEW interface to ImageMagick.

+

LVOOP ImageMagick is an object-oriented LabVIEW interface to ImageMagick.

Lisp

-

CL-Magick provides a Common Lisp interface to the ImageMagick library.

+

CL-Magick provides a Common Lisp interface to the ImageMagick library.

Neko

-

NMagick is a port of the ImageMagick library to the haXe and Neko platforms. It provides image manipulation capabilities to both web and desktop applications using Neko.

+

NMagick is a port of the ImageMagick library to the haXe and Neko platforms. It provides image manipulation capabilities to both web and desktop applications using Neko.

.NET

@@ -225,7 +225,7 @@

Pascal

-

PascalMagick a Pascal binding for the MagickWand API and also the low-level MagickCore library. It works with Free Pascal / Lazarus and Delphi.

+

PascalMagick a Pascal binding for the MagickWand API and also the low-level MagickCore library. It works with Free Pascal / Lazarus and Delphi.

Perl

@@ -237,50 +237,50 @@

PHP

-

MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.

+

MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.

-

IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.

+

IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.

-

phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.

+

phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.

Python

-

PythonMagick an object-oriented Python interface to ImageMagick.

+

PythonMagick an object-oriented Python interface to ImageMagick.

-

PythonMagickWand an object-oriented Python interface to MagickWand based on ctypes.

+

PythonMagickWand an object-oriented Python interface to MagickWand based on ctypes.

REALbasic

-

The MBS Realbasic ImageMagick is a plugin that utilizes the power of ImageMagick from within the RealBasic environment.

+

The MBS Realbasic ImageMagick is a plugin that utilizes the power of ImageMagick from within the RealBasic environment.

Ruby

-

RMagick is an interface between the Ruby programming language and the MagickCore image processing libraries. Get started with RMagick by perusing the documentation.

+

RMagick is an interface between the Ruby programming language and the MagickCore image processing libraries. Get started with RMagick by perusing the documentation.

-

MagickWand for Ruby is an interface between the Ruby programming language and the MagickWand image processing libraries. Get started with MagickWand for PHP by perusing the documentation.

+

MagickWand for Ruby is an interface between the Ruby programming language and the MagickWand image processing libraries. Get started with MagickWand for PHP by perusing the documentation.

-

MiniMagick is a Ruby wrapper for ImageMagick command line. MiniMagick gives you convenient access to all the command line options ImageMagick supports.

+

MiniMagick is a Ruby wrapper for ImageMagick command line. MiniMagick gives you convenient access to all the command line options ImageMagick supports.

-

QuickMagick is a gem for easily accessing ImageMagick command line tools from Ruby programs.

+

QuickMagick is a gem for easily accessing ImageMagick command line tools from Ruby programs.

Tcl/Tk

-

TclMagick a native Tcl-extension to the ImageMagick MagickWand API.

+

TclMagick a native Tcl-extension to the ImageMagick MagickWand API.

XML RPC

-

RemoteMagick is an XML-RPC web service that creates image thumbnails.

+

RemoteMagick is an XML-RPC web service that creates image thumbnails.

diff --git a/www/api/animate.html b/www/api/animate.html index a8979fe04..93b22af67 100644 --- a/www/api/animate.html +++ b/www/api/animate.html @@ -124,7 +124,7 @@
diff --git a/www/api/cache-view.html b/www/api/cache-view.html index 586b6bbef..55dac8b5b 100644 --- a/www/api/cache-view.html +++ b/www/api/cache-view.html @@ -124,7 +124,7 @@
diff --git a/www/api/cache.html b/www/api/cache.html index 49ead85d7..3e6e9769d 100644 --- a/www/api/cache.html +++ b/www/api/cache.html @@ -124,7 +124,7 @@
diff --git a/www/api/cipher.html b/www/api/cipher.html index 4d0c8ba44..36ae33ef0 100644 --- a/www/api/cipher.html +++ b/www/api/cipher.html @@ -124,7 +124,7 @@
diff --git a/www/api/deprecate.html b/www/api/deprecate.html index 88c29cb73..702f415ab 100644 --- a/www/api/deprecate.html +++ b/www/api/deprecate.html @@ -124,7 +124,7 @@