cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % M M TTTTT V V % |
| 7 | % MM MM T V V % |
| 8 | % M M M T V V % |
| 9 | % M M T V V % |
| 10 | % M M T V % |
| 11 | % % |
| 12 | % % |
| 13 | % Read/Write MTV Raytracer Image Format % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % July 1992 % |
| 18 | % % |
| 19 | % % |
cristy | 1454be7 | 2011-12-19 01:52:48 +0000 | [diff] [blame] | 20 | % Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 21 | % dedicated to making software imaging solutions freely available. % |
| 22 | % % |
| 23 | % You may not use this file except in compliance with the License. You may % |
| 24 | % obtain a copy of the License at % |
| 25 | % % |
| 26 | % http://www.imagemagick.org/script/license.php % |
| 27 | % % |
| 28 | % Unless required by applicable law or agreed to in writing, software % |
| 29 | % distributed under the License is distributed on an "AS IS" BASIS, % |
| 30 | % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % |
| 31 | % See the License for the specific language governing permissions and % |
| 32 | % limitations under the License. % |
| 33 | % % |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | % |
| 36 | % |
| 37 | */ |
| 38 | |
| 39 | /* |
| 40 | Include declarations. |
| 41 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 42 | #include "MagickCore/studio.h" |
| 43 | #include "MagickCore/blob.h" |
| 44 | #include "MagickCore/blob-private.h" |
| 45 | #include "MagickCore/cache.h" |
| 46 | #include "MagickCore/colorspace.h" |
cristy | 510d06a | 2011-07-06 23:43:54 +0000 | [diff] [blame] | 47 | #include "MagickCore/colorspace-private.h" |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 48 | #include "MagickCore/exception.h" |
| 49 | #include "MagickCore/exception-private.h" |
| 50 | #include "MagickCore/image.h" |
| 51 | #include "MagickCore/image-private.h" |
| 52 | #include "MagickCore/list.h" |
| 53 | #include "MagickCore/magick.h" |
| 54 | #include "MagickCore/memory_.h" |
| 55 | #include "MagickCore/monitor.h" |
| 56 | #include "MagickCore/monitor-private.h" |
| 57 | #include "MagickCore/pixel-accessor.h" |
| 58 | #include "MagickCore/quantum-private.h" |
| 59 | #include "MagickCore/static.h" |
| 60 | #include "MagickCore/string_.h" |
| 61 | #include "MagickCore/module.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 62 | |
| 63 | /* |
| 64 | Forward declarations. |
| 65 | */ |
| 66 | static MagickBooleanType |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 67 | WriteMTVImage(const ImageInfo *,Image *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 68 | |
| 69 | /* |
| 70 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 71 | % % |
| 72 | % % |
| 73 | % % |
| 74 | % R e a d M T V I m a g e % |
| 75 | % % |
| 76 | % % |
| 77 | % % |
| 78 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 79 | % |
| 80 | % ReadMTVImage() reads a MTV image file and returns it. It allocates |
| 81 | % the memory necessary for the new Image structure and returns a pointer to |
| 82 | % the new image. |
| 83 | % |
| 84 | % The format of the ReadMTVImage method is: |
| 85 | % |
| 86 | % Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception) |
| 87 | % |
| 88 | % A description of each parameter follows: |
| 89 | % |
| 90 | % o image_info: the image info. |
| 91 | % |
| 92 | % o exception: return any errors or warnings in this structure. |
| 93 | % |
| 94 | */ |
| 95 | static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception) |
| 96 | { |
| 97 | char |
| 98 | buffer[MaxTextExtent]; |
| 99 | |
| 100 | Image |
| 101 | *image; |
| 102 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 103 | MagickBooleanType |
| 104 | status; |
| 105 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 106 | register ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 107 | x; |
| 108 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 109 | register Quantum |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 110 | *q; |
| 111 | |
| 112 | register unsigned char |
| 113 | *p; |
| 114 | |
| 115 | ssize_t |
cristy | aff6d80 | 2011-04-26 01:46:31 +0000 | [diff] [blame] | 116 | count, |
| 117 | y; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 118 | |
| 119 | unsigned char |
| 120 | *pixels; |
| 121 | |
cristy | f2faecf | 2010-05-28 19:19:36 +0000 | [diff] [blame] | 122 | unsigned long |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 123 | columns, |
| 124 | rows; |
| 125 | |
| 126 | /* |
| 127 | Open image file. |
| 128 | */ |
| 129 | assert(image_info != (const ImageInfo *) NULL); |
| 130 | assert(image_info->signature == MagickSignature); |
| 131 | if (image_info->debug != MagickFalse) |
| 132 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 133 | image_info->filename); |
| 134 | assert(exception != (ExceptionInfo *) NULL); |
| 135 | assert(exception->signature == MagickSignature); |
cristy | 9950d57 | 2011-10-01 18:22:35 +0000 | [diff] [blame] | 136 | image=AcquireImage(image_info,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 137 | status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); |
| 138 | if (status == MagickFalse) |
| 139 | { |
| 140 | image=DestroyImageList(image); |
| 141 | return((Image *) NULL); |
| 142 | } |
| 143 | /* |
| 144 | Read MTV image. |
| 145 | */ |
| 146 | (void) ReadBlobString(image,buffer); |
| 147 | count=(ssize_t) sscanf(buffer,"%lu %lu\n",&columns,&rows); |
| 148 | if (count <= 0) |
| 149 | ThrowReaderException(CorruptImageError,"ImproperImageHeader"); |
| 150 | do |
| 151 | { |
| 152 | /* |
| 153 | Initialize image structure. |
| 154 | */ |
| 155 | image->columns=columns; |
| 156 | image->rows=rows; |
| 157 | image->depth=8; |
| 158 | if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) |
| 159 | if (image->scene >= (image_info->scene+image_info->number_scenes-1)) |
| 160 | break; |
| 161 | /* |
| 162 | Convert MTV raster image to pixel packets. |
| 163 | */ |
| 164 | pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns, |
| 165 | 3UL*sizeof(*pixels)); |
| 166 | if (pixels == (unsigned char *) NULL) |
| 167 | ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 168 | for (y=0; y < (ssize_t) image->rows; y++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 169 | { |
| 170 | count=(ssize_t) ReadBlob(image,(size_t) (3*image->columns),pixels); |
| 171 | if (count != (ssize_t) (3*image->columns)) |
| 172 | ThrowReaderException(CorruptImageError,"UnableToReadImageData"); |
| 173 | p=pixels; |
| 174 | q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); |
cristy | acd2ed2 | 2011-08-30 01:44:23 +0000 | [diff] [blame] | 175 | if (q == (Quantum *) NULL) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 176 | break; |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 177 | for (x=0; x < (ssize_t) image->columns; x++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 178 | { |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 179 | SetPixelRed(image,ScaleCharToQuantum(*p++),q); |
| 180 | SetPixelGreen(image,ScaleCharToQuantum(*p++),q); |
| 181 | SetPixelBlue(image,ScaleCharToQuantum(*p++),q); |
| 182 | SetPixelAlpha(image,OpaqueAlpha,q); |
cristy | ed23157 | 2011-07-14 02:18:59 +0000 | [diff] [blame] | 183 | q+=GetPixelChannels(image); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 184 | } |
| 185 | if (SyncAuthenticPixels(image,exception) == MagickFalse) |
| 186 | break; |
| 187 | if (image->previous == (Image *) NULL) |
| 188 | { |
cristy | cee9711 | 2010-05-28 00:44:52 +0000 | [diff] [blame] | 189 | status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, |
cristy | aff6d80 | 2011-04-26 01:46:31 +0000 | [diff] [blame] | 190 | image->rows); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 191 | if (status == MagickFalse) |
| 192 | break; |
| 193 | } |
| 194 | } |
| 195 | pixels=(unsigned char *) RelinquishMagickMemory(pixels); |
| 196 | if (EOFBlob(image) != MagickFalse) |
| 197 | { |
| 198 | ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", |
| 199 | image->filename); |
| 200 | break; |
| 201 | } |
| 202 | /* |
| 203 | Proceed to next image. |
| 204 | */ |
| 205 | if (image_info->number_scenes != 0) |
| 206 | if (image->scene >= (image_info->scene+image_info->number_scenes-1)) |
| 207 | break; |
| 208 | *buffer='\0'; |
| 209 | (void) ReadBlobString(image,buffer); |
| 210 | count=(ssize_t) sscanf(buffer,"%lu %lu\n",&columns,&rows); |
| 211 | if (count > 0) |
| 212 | { |
| 213 | /* |
| 214 | Allocate next image structure. |
| 215 | */ |
cristy | 9950d57 | 2011-10-01 18:22:35 +0000 | [diff] [blame] | 216 | AcquireNextImage(image_info,image,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 217 | if (GetNextImageInList(image) == (Image *) NULL) |
| 218 | { |
| 219 | image=DestroyImageList(image); |
| 220 | return((Image *) NULL); |
| 221 | } |
| 222 | image=SyncNextImageInList(image); |
| 223 | status=SetImageProgress(image,LoadImagesTag,TellBlob(image), |
| 224 | GetBlobSize(image)); |
| 225 | if (status == MagickFalse) |
| 226 | break; |
| 227 | } |
| 228 | } while (count > 0); |
| 229 | (void) CloseBlob(image); |
| 230 | return(GetFirstImageInList(image)); |
| 231 | } |
| 232 | |
| 233 | /* |
| 234 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 235 | % % |
| 236 | % % |
| 237 | % % |
| 238 | % R e g i s t e r M T V I m a g e % |
| 239 | % % |
| 240 | % % |
| 241 | % % |
| 242 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 243 | % |
| 244 | % RegisterMTVImage() adds attributes for the MTV image format to |
| 245 | % the list of supported formats. The attributes include the image format |
| 246 | % tag, a method to read and/or write the format, whether the format |
| 247 | % supports the saving of more than one frame to the same file or blob, |
| 248 | % whether the format supports native in-memory I/O, and a brief |
| 249 | % description of the format. |
| 250 | % |
| 251 | % The format of the RegisterMTVImage method is: |
| 252 | % |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 253 | % size_t RegisterMTVImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 254 | % |
| 255 | */ |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 256 | ModuleExport size_t RegisterMTVImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 257 | { |
| 258 | MagickInfo |
| 259 | *entry; |
| 260 | |
| 261 | entry=SetMagickInfo("MTV"); |
| 262 | entry->decoder=(DecodeImageHandler *) ReadMTVImage; |
| 263 | entry->encoder=(EncodeImageHandler *) WriteMTVImage; |
| 264 | entry->description=ConstantString("MTV Raytracing image format"); |
| 265 | entry->module=ConstantString("MTV"); |
| 266 | (void) RegisterMagickInfo(entry); |
| 267 | return(MagickImageCoderSignature); |
| 268 | } |
| 269 | |
| 270 | /* |
| 271 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 272 | % % |
| 273 | % % |
| 274 | % % |
| 275 | % U n r e g i s t e r M T V I m a g e % |
| 276 | % % |
| 277 | % % |
| 278 | % % |
| 279 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 280 | % |
| 281 | % UnregisterMTVImage() removes format registrations made by the |
| 282 | % MTV module from the list of supported formats. |
| 283 | % |
| 284 | % The format of the UnregisterMTVImage method is: |
| 285 | % |
| 286 | % UnregisterMTVImage(void) |
| 287 | % |
| 288 | */ |
| 289 | ModuleExport void UnregisterMTVImage(void) |
| 290 | { |
| 291 | (void) UnregisterMagickInfo("MTV"); |
| 292 | } |
| 293 | |
| 294 | /* |
| 295 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 296 | % % |
| 297 | % % |
| 298 | % % |
| 299 | % W r i t e M T V I m a g e % |
| 300 | % % |
| 301 | % % |
| 302 | % % |
| 303 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 304 | % |
cristy | aff6d80 | 2011-04-26 01:46:31 +0000 | [diff] [blame] | 305 | % WriteMTVImage() writes an image to a file in red, green, and blue MTV |
| 306 | % rasterfile format. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 307 | % |
| 308 | % The format of the WriteMTVImage method is: |
| 309 | % |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 310 | % MagickBooleanType WriteMTVImage(const ImageInfo *image_info, |
| 311 | % Image *image,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 312 | % |
| 313 | % A description of each parameter follows. |
| 314 | % |
| 315 | % o image_info: the image info. |
| 316 | % |
| 317 | % o image: The image. |
| 318 | % |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 319 | % o exception: return any errors or warnings in this structure. |
| 320 | % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 321 | */ |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 322 | static MagickBooleanType WriteMTVImage(const ImageInfo *image_info,Image *image, |
| 323 | ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 324 | { |
| 325 | char |
| 326 | buffer[MaxTextExtent]; |
| 327 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 328 | MagickBooleanType |
| 329 | status; |
| 330 | |
| 331 | MagickOffsetType |
| 332 | scene; |
| 333 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 334 | register const Quantum |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 335 | *p; |
| 336 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 337 | register ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 338 | x; |
| 339 | |
| 340 | register unsigned char |
| 341 | *q; |
| 342 | |
cristy | aff6d80 | 2011-04-26 01:46:31 +0000 | [diff] [blame] | 343 | ssize_t |
| 344 | y; |
| 345 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 346 | unsigned char |
| 347 | *pixels; |
| 348 | |
| 349 | /* |
| 350 | Open output image file. |
| 351 | */ |
| 352 | assert(image_info != (const ImageInfo *) NULL); |
| 353 | assert(image_info->signature == MagickSignature); |
| 354 | assert(image != (Image *) NULL); |
| 355 | assert(image->signature == MagickSignature); |
| 356 | if (image->debug != MagickFalse) |
| 357 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); |
cristy | 3a37efd | 2011-08-28 20:31:03 +0000 | [diff] [blame] | 358 | assert(exception != (ExceptionInfo *) NULL); |
| 359 | assert(exception->signature == MagickSignature); |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 360 | status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 361 | if (status == MagickFalse) |
| 362 | return(status); |
| 363 | scene=0; |
| 364 | do |
| 365 | { |
| 366 | /* |
| 367 | Allocate memory for pixels. |
| 368 | */ |
cristy | 510d06a | 2011-07-06 23:43:54 +0000 | [diff] [blame] | 369 | if (IsRGBColorspace(image->colorspace) == MagickFalse) |
cristy | 8d95109 | 2012-02-08 18:54:56 +0000 | [diff] [blame^] | 370 | (void) TransformImageColorspace(image,sRGBColorspace,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 371 | pixels=(unsigned char *) AcquireQuantumMemory((size_t) image->columns, |
| 372 | 3UL*sizeof(*pixels)); |
| 373 | if (pixels == (unsigned char *) NULL) |
| 374 | ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); |
| 375 | /* |
| 376 | Initialize raster file header. |
| 377 | */ |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 378 | (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n",(double) |
cristy | e8c25f9 | 2010-06-03 00:53:06 +0000 | [diff] [blame] | 379 | image->columns,(double) image->rows); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 380 | (void) WriteBlobString(image,buffer); |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 381 | for (y=0; y < (ssize_t) image->rows; y++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 382 | { |
cristy | 1e178e7 | 2011-08-28 19:44:34 +0000 | [diff] [blame] | 383 | p=GetVirtualPixels(image,0,y,image->columns,1,exception); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 384 | if (p == (const Quantum *) NULL) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 385 | break; |
| 386 | q=pixels; |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 387 | for (x=0; x < (ssize_t) image->columns; x++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 388 | { |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 389 | *q++=ScaleQuantumToChar(GetPixelRed(image,p)); |
| 390 | *q++=ScaleQuantumToChar(GetPixelGreen(image,p)); |
| 391 | *q++=ScaleQuantumToChar(GetPixelBlue(image,p)); |
cristy | ed23157 | 2011-07-14 02:18:59 +0000 | [diff] [blame] | 392 | p+=GetPixelChannels(image); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 393 | } |
| 394 | (void) WriteBlob(image,(size_t) (q-pixels),pixels); |
| 395 | if (image->previous == (Image *) NULL) |
| 396 | { |
cristy | cee9711 | 2010-05-28 00:44:52 +0000 | [diff] [blame] | 397 | status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 398 | image->rows); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 399 | if (status == MagickFalse) |
| 400 | break; |
| 401 | } |
| 402 | } |
| 403 | pixels=(unsigned char *) RelinquishMagickMemory(pixels); |
| 404 | if (GetNextImageInList(image) == (Image *) NULL) |
| 405 | break; |
| 406 | image=SyncNextImageInList(image); |
| 407 | status=SetImageProgress(image,SaveImagesTag,scene, |
| 408 | GetImageListLength(image)); |
| 409 | if (status == MagickFalse) |
| 410 | break; |
| 411 | scene++; |
| 412 | } while (image_info->adjoin != MagickFalse); |
| 413 | (void) CloseBlob(image); |
| 414 | return(MagickTrue); |
| 415 | } |