cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % GGGG RRRR AAA Y Y % |
| 7 | % G R R A A Y Y % |
| 8 | % G GG RRRR AAAAA Y % |
| 9 | % G G R R A A Y % |
| 10 | % GGG R R A A Y % |
| 11 | % % |
| 12 | % % |
| 13 | % Read/Write RAW Gray Image Format % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % July 1992 % |
| 18 | % % |
| 19 | % % |
cristy | 7e41fe8 | 2010-12-04 23:12:08 +0000 | [diff] [blame] | 20 | % Copyright 1999-2011 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 | */ |
| 42 | #include "magick/studio.h" |
| 43 | #include "magick/blob.h" |
| 44 | #include "magick/blob-private.h" |
| 45 | #include "magick/cache.h" |
| 46 | #include "magick/colorspace.h" |
| 47 | #include "magick/constitute.h" |
| 48 | #include "magick/exception.h" |
| 49 | #include "magick/exception-private.h" |
| 50 | #include "magick/image.h" |
| 51 | #include "magick/image-private.h" |
| 52 | #include "magick/list.h" |
| 53 | #include "magick/magick.h" |
| 54 | #include "magick/memory_.h" |
| 55 | #include "magick/monitor.h" |
| 56 | #include "magick/monitor-private.h" |
| 57 | #include "magick/pixel.h" |
| 58 | #include "magick/pixel-private.h" |
| 59 | #include "magick/quantum-private.h" |
| 60 | #include "magick/static.h" |
| 61 | #include "magick/statistic.h" |
| 62 | #include "magick/string_.h" |
| 63 | #include "magick/module.h" |
| 64 | |
| 65 | /* |
| 66 | Forward declarations. |
| 67 | */ |
| 68 | static MagickBooleanType |
| 69 | WriteGRAYImage(const ImageInfo *,Image *); |
| 70 | |
| 71 | /* |
| 72 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 73 | % % |
| 74 | % % |
| 75 | % % |
| 76 | % R e a d G R A Y I m a g e % |
| 77 | % % |
| 78 | % % |
| 79 | % % |
| 80 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 81 | % |
| 82 | % ReadGRAYImage() reads an image of raw grayscale samples and returns |
| 83 | % it. It allocates the memory necessary for the new Image structure and |
cristy | bee0093 | 2011-01-15 20:28:27 +0000 | [diff] [blame] | 84 | % returns a pointer to the new image. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 85 | % |
| 86 | % The format of the ReadGRAYImage method is: |
| 87 | % |
| 88 | % Image *ReadGRAYImage(const ImageInfo *image_info, |
| 89 | % ExceptionInfo *exception) |
| 90 | % |
| 91 | % A description of each parameter follows: |
| 92 | % |
| 93 | % o image_info: the image info. |
| 94 | % |
| 95 | % o exception: return any errors or warnings in this structure. |
| 96 | % |
| 97 | */ |
| 98 | static Image *ReadGRAYImage(const ImageInfo *image_info, |
| 99 | ExceptionInfo *exception) |
| 100 | { |
| 101 | Image |
| 102 | *canvas_image, |
| 103 | *image; |
| 104 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 105 | ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | y; |
| 107 | |
| 108 | MagickBooleanType |
| 109 | status; |
| 110 | |
| 111 | MagickOffsetType |
| 112 | scene; |
| 113 | |
| 114 | QuantumInfo |
| 115 | *quantum_info; |
| 116 | |
| 117 | QuantumType |
| 118 | quantum_type; |
| 119 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 120 | size_t |
| 121 | length; |
| 122 | |
cristy | bee0093 | 2011-01-15 20:28:27 +0000 | [diff] [blame] | 123 | ssize_t |
| 124 | count; |
| 125 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 126 | unsigned char |
| 127 | *pixels; |
| 128 | |
| 129 | /* |
| 130 | Open image file. |
| 131 | */ |
| 132 | assert(image_info != (const ImageInfo *) NULL); |
| 133 | assert(image_info->signature == MagickSignature); |
| 134 | if (image_info->debug != MagickFalse) |
| 135 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 136 | image_info->filename); |
| 137 | assert(exception != (ExceptionInfo *) NULL); |
| 138 | assert(exception->signature == MagickSignature); |
| 139 | image=AcquireImage(image_info); |
| 140 | if ((image->columns == 0) || (image->rows == 0)) |
| 141 | ThrowReaderException(OptionError,"MustSpecifyImageSize"); |
| 142 | status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); |
| 143 | if (status == MagickFalse) |
| 144 | { |
| 145 | image=DestroyImageList(image); |
| 146 | return((Image *) NULL); |
| 147 | } |
cristy | 55a91cd | 2010-12-01 00:57:40 +0000 | [diff] [blame] | 148 | if (DiscardBlobBytes(image,(size_t) image->offset) == MagickFalse) |
cristy | d429702 | 2010-09-16 22:59:09 +0000 | [diff] [blame] | 149 | ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", |
| 150 | image->filename); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 151 | /* |
| 152 | Create virtual canvas to support cropping (i.e. image.gray[100x100+10+20]). |
| 153 | */ |
| 154 | canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse, |
| 155 | exception); |
| 156 | (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod); |
| 157 | quantum_type=GrayQuantum; |
| 158 | quantum_info=AcquireQuantumInfo(image_info,canvas_image); |
| 159 | if (quantum_info == (QuantumInfo *) NULL) |
| 160 | ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); |
| 161 | pixels=GetQuantumPixels(quantum_info); |
| 162 | if (image_info->number_scenes != 0) |
| 163 | while (image->scene < image_info->scene) |
| 164 | { |
| 165 | /* |
| 166 | Skip to next image. |
| 167 | */ |
| 168 | image->scene++; |
| 169 | length=GetQuantumExtent(canvas_image,quantum_info,quantum_type); |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 170 | for (y=0; y < (ssize_t) image->rows; y++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 171 | { |
| 172 | count=ReadBlob(image,length,pixels); |
| 173 | if (count != (ssize_t) length) |
| 174 | break; |
| 175 | } |
| 176 | } |
| 177 | scene=0; |
| 178 | count=0; |
| 179 | length=0; |
| 180 | do |
| 181 | { |
| 182 | /* |
| 183 | Read pixels to virtual canvas image then push to image. |
| 184 | */ |
| 185 | if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) |
| 186 | if (image->scene >= (image_info->scene+image_info->number_scenes-1)) |
| 187 | break; |
| 188 | if (scene == 0) |
| 189 | { |
| 190 | length=GetQuantumExtent(canvas_image,quantum_info,quantum_type); |
| 191 | count=ReadBlob(image,length,pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 192 | } |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 193 | for (y=0; y < (ssize_t) image->extract_info.height; y++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 194 | { |
| 195 | register const PixelPacket |
cristy | c47d1f8 | 2009-11-26 01:44:43 +0000 | [diff] [blame] | 196 | *restrict p; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 197 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 198 | register ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 199 | x; |
| 200 | |
| 201 | register PixelPacket |
cristy | c47d1f8 | 2009-11-26 01:44:43 +0000 | [diff] [blame] | 202 | *restrict q; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 203 | |
cristy | 93b13ba | 2009-09-12 04:01:09 +0000 | [diff] [blame] | 204 | if (count != (ssize_t) length) |
| 205 | { |
| 206 | ThrowFileException(exception,CorruptImageError, |
| 207 | "UnexpectedEndOfFile",image->filename); |
| 208 | break; |
| 209 | } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 210 | q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,exception); |
| 211 | if (q == (PixelPacket *) NULL) |
| 212 | break; |
| 213 | length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,quantum_info, |
| 214 | quantum_type,pixels,exception); |
| 215 | if (SyncAuthenticPixels(canvas_image,exception) == MagickFalse) |
| 216 | break; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 217 | if (((y-image->extract_info.y) >= 0) && |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 218 | ((y-image->extract_info.y) < (ssize_t) image->rows)) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 219 | { |
| 220 | p=GetVirtualPixels(canvas_image,canvas_image->extract_info.x,0, |
| 221 | image->columns,1,exception); |
| 222 | q=QueueAuthenticPixels(image,0,y-image->extract_info.y,image->columns, |
| 223 | 1,exception); |
| 224 | if ((p == (const PixelPacket *) NULL) || (q == (PixelPacket *) NULL)) |
| 225 | break; |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 226 | for (x=0; x < (ssize_t) image->columns; x++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 227 | { |
cristy | ce70c17 | 2010-01-07 17:15:30 +0000 | [diff] [blame] | 228 | SetRedPixelComponent(q,GetRedPixelComponent(p)); |
| 229 | SetGreenPixelComponent(q,GetGreenPixelComponent(p)); |
| 230 | SetBluePixelComponent(q,GetBluePixelComponent(p)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 231 | p++; |
| 232 | q++; |
| 233 | } |
| 234 | if (SyncAuthenticPixels(image,exception) == MagickFalse) |
| 235 | break; |
| 236 | } |
| 237 | if (image->previous == (Image *) NULL) |
| 238 | { |
cristy | cee9711 | 2010-05-28 00:44:52 +0000 | [diff] [blame] | 239 | status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, |
cristy | bee0093 | 2011-01-15 20:28:27 +0000 | [diff] [blame] | 240 | image->rows); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 241 | if (status == MagickFalse) |
| 242 | break; |
| 243 | } |
cristy | 93b13ba | 2009-09-12 04:01:09 +0000 | [diff] [blame] | 244 | count=ReadBlob(image,length,pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 245 | } |
| 246 | SetQuantumImageType(image,quantum_type); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 247 | /* |
| 248 | Proceed to next image. |
| 249 | */ |
| 250 | if (image_info->number_scenes != 0) |
| 251 | if (image->scene >= (image_info->scene+image_info->number_scenes-1)) |
| 252 | break; |
| 253 | if (count == (ssize_t) length) |
| 254 | { |
| 255 | /* |
| 256 | Allocate next image structure. |
| 257 | */ |
| 258 | AcquireNextImage(image_info,image); |
| 259 | if (GetNextImageInList(image) == (Image *) NULL) |
| 260 | { |
| 261 | image=DestroyImageList(image); |
| 262 | return((Image *) NULL); |
| 263 | } |
| 264 | image=SyncNextImageInList(image); |
| 265 | status=SetImageProgress(image,LoadImagesTag,TellBlob(image), |
| 266 | GetBlobSize(image)); |
| 267 | if (status == MagickFalse) |
| 268 | break; |
| 269 | } |
| 270 | scene++; |
| 271 | } while (count == (ssize_t) length); |
| 272 | quantum_info=DestroyQuantumInfo(quantum_info); |
cristy | 01a3f33 | 2009-10-27 14:17:37 +0000 | [diff] [blame] | 273 | InheritException(&image->exception,&canvas_image->exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 274 | canvas_image=DestroyImage(canvas_image); |
| 275 | (void) CloseBlob(image); |
| 276 | return(GetFirstImageInList(image)); |
| 277 | } |
| 278 | |
| 279 | /* |
| 280 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 281 | % % |
| 282 | % % |
| 283 | % % |
| 284 | % R e g i s t e r G R A Y I m a g e % |
| 285 | % % |
| 286 | % % |
| 287 | % % |
| 288 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 289 | % |
| 290 | % RegisterGRAYImage() adds attributes for the GRAY image format to |
| 291 | % the list of supported formats. The attributes include the image format |
| 292 | % tag, a method to read and/or write the format, whether the format |
| 293 | % supports the saving of more than one frame to the same file or blob, |
| 294 | % whether the format supports native in-memory I/O, and a brief |
| 295 | % description of the format. |
| 296 | % |
| 297 | % The format of the RegisterGRAYImage method is: |
| 298 | % |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 299 | % size_t RegisterGRAYImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 300 | % |
| 301 | */ |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 302 | ModuleExport size_t RegisterGRAYImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 303 | { |
| 304 | MagickInfo |
| 305 | *entry; |
| 306 | |
| 307 | entry=SetMagickInfo("GRAY"); |
| 308 | entry->decoder=(DecodeImageHandler *) ReadGRAYImage; |
| 309 | entry->encoder=(EncodeImageHandler *) WriteGRAYImage; |
| 310 | entry->raw=MagickTrue; |
| 311 | entry->endian_support=MagickTrue; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 312 | entry->description=ConstantString("Raw gray samples"); |
| 313 | entry->module=ConstantString("GRAY"); |
| 314 | (void) RegisterMagickInfo(entry); |
| 315 | return(MagickImageCoderSignature); |
| 316 | } |
| 317 | |
| 318 | /* |
| 319 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 320 | % % |
| 321 | % % |
| 322 | % % |
| 323 | % U n r e g i s t e r G R A Y I m a g e % |
| 324 | % % |
| 325 | % % |
| 326 | % % |
| 327 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 328 | % |
| 329 | % UnregisterGRAYImage() removes format registrations made by the |
| 330 | % GRAY module from the list of supported formats. |
| 331 | % |
| 332 | % The format of the UnregisterGRAYImage method is: |
| 333 | % |
| 334 | % UnregisterGRAYImage(void) |
| 335 | % |
| 336 | */ |
| 337 | ModuleExport void UnregisterGRAYImage(void) |
| 338 | { |
| 339 | (void) UnregisterMagickInfo("GRAY"); |
| 340 | } |
| 341 | |
| 342 | /* |
| 343 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 344 | % % |
| 345 | % % |
| 346 | % % |
| 347 | % W r i t e G R A Y I m a g e % |
| 348 | % % |
| 349 | % % |
| 350 | % % |
| 351 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 352 | % |
| 353 | % WriteGRAYImage() writes an image to a file as gray scale intensity |
| 354 | % values. |
| 355 | % |
| 356 | % The format of the WriteGRAYImage method is: |
| 357 | % |
| 358 | % MagickBooleanType WriteGRAYImage(const ImageInfo *image_info, |
| 359 | % Image *image) |
| 360 | % |
| 361 | % A description of each parameter follows. |
| 362 | % |
| 363 | % o image_info: the image info. |
| 364 | % |
| 365 | % o image: The image. |
| 366 | % |
| 367 | */ |
| 368 | static MagickBooleanType WriteGRAYImage(const ImageInfo *image_info, |
| 369 | Image *image) |
| 370 | { |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 371 | ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 372 | y; |
| 373 | |
| 374 | MagickBooleanType |
| 375 | status; |
| 376 | |
| 377 | MagickOffsetType |
| 378 | scene; |
| 379 | |
| 380 | QuantumInfo |
| 381 | *quantum_info; |
| 382 | |
| 383 | QuantumType |
| 384 | quantum_type; |
| 385 | |
| 386 | ssize_t |
| 387 | count; |
| 388 | |
| 389 | size_t |
| 390 | length; |
| 391 | |
| 392 | unsigned char |
| 393 | *pixels; |
| 394 | |
| 395 | /* |
| 396 | Open output image file. |
| 397 | */ |
| 398 | assert(image_info != (const ImageInfo *) NULL); |
| 399 | assert(image_info->signature == MagickSignature); |
| 400 | assert(image != (Image *) NULL); |
| 401 | assert(image->signature == MagickSignature); |
| 402 | if (image->debug != MagickFalse) |
| 403 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); |
| 404 | status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception); |
| 405 | if (status == MagickFalse) |
| 406 | return(status); |
| 407 | scene=0; |
| 408 | do |
| 409 | { |
| 410 | /* |
| 411 | Write grayscale pixels. |
| 412 | */ |
| 413 | if (image->colorspace != RGBColorspace) |
| 414 | (void) TransformImageColorspace(image,RGBColorspace); |
| 415 | quantum_type=GrayQuantum; |
| 416 | quantum_info=AcquireQuantumInfo(image_info,image); |
| 417 | if (quantum_info == (QuantumInfo *) NULL) |
| 418 | ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); |
| 419 | pixels=GetQuantumPixels(quantum_info); |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 420 | for (y=0; y < (ssize_t) image->rows; y++) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 421 | { |
| 422 | register const PixelPacket |
cristy | c47d1f8 | 2009-11-26 01:44:43 +0000 | [diff] [blame] | 423 | *restrict p; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 424 | |
| 425 | p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception); |
| 426 | if (p == (const PixelPacket *) NULL) |
| 427 | break; |
| 428 | length=ExportQuantumPixels(image,(const CacheView *) NULL,quantum_info, |
| 429 | quantum_type,pixels,&image->exception); |
| 430 | count=WriteBlob(image,length,pixels); |
| 431 | if (count != (ssize_t) length) |
| 432 | break; |
| 433 | if (image->previous == (Image *) NULL) |
| 434 | { |
cristy | cee9711 | 2010-05-28 00:44:52 +0000 | [diff] [blame] | 435 | status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, |
cristy | 2b1f0a3 | 2010-08-21 18:45:41 +0000 | [diff] [blame] | 436 | image->rows); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 437 | if (status == MagickFalse) |
| 438 | break; |
| 439 | } |
| 440 | } |
| 441 | quantum_info=DestroyQuantumInfo(quantum_info); |
| 442 | if (GetNextImageInList(image) == (Image *) NULL) |
| 443 | break; |
| 444 | image=SyncNextImageInList(image); |
| 445 | status=SetImageProgress(image,SaveImagesTag,scene++, |
| 446 | GetImageListLength(image)); |
| 447 | if (status == MagickFalse) |
| 448 | break; |
| 449 | } while (image_info->adjoin != MagickFalse); |
| 450 | (void) CloseBlob(image); |
| 451 | return(MagickTrue); |
| 452 | } |