Lines Matching refs:image
166 static void SetHeaderFromIPL(Image *image, IPLInfo *ipl){ in SetHeaderFromIPL() argument
167 image->columns = ipl->width; in SetHeaderFromIPL()
168 image->rows = ipl->height; in SetHeaderFromIPL()
169 image->depth = ipl->depth; in SetHeaderFromIPL()
170 image->resolution.x = 1; in SetHeaderFromIPL()
171 image->resolution.y = 1; in SetHeaderFromIPL()
181 Image *image; in ReadIPLImage() local
213 image=AcquireImage(image_info,exception); in ReadIPLImage()
214 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadIPLImage()
217 image=DestroyImageList(image); in ReadIPLImage()
229 count=ReadBlob(image,4,magick); in ReadIPLImage()
233 image->endian=LSBEndian; in ReadIPLImage()
236 image->endian=MSBEndian; in ReadIPLImage()
242 count=ReadBlob(image, 8, magick); in ReadIPLImage()
246 count=ReadBlob(image,4,magick); in ReadIPLImage()
249 ipl_info.size=ReadBlobLong(image); in ReadIPLImage()
250 ipl_info.width=ReadBlobLong(image); in ReadIPLImage()
251 ipl_info.height=ReadBlobLong(image); in ReadIPLImage()
254 ipl_info.colors=ReadBlobLong(image); in ReadIPLImage()
255 if(ipl_info.colors == 3){ SetImageColorspace(image,sRGBColorspace,exception);} in ReadIPLImage()
256 else { image->colorspace = GRAYColorspace; } in ReadIPLImage()
257 ipl_info.z=ReadBlobLong(image); in ReadIPLImage()
258 ipl_info.time=ReadBlobLong(image); in ReadIPLImage()
260 ipl_info.byteType=ReadBlobLong(image); in ReadIPLImage()
303 if (extent > GetBlobSize(image)) in ReadIPLImage()
309 SetHeaderFromIPL(image, &ipl_info); in ReadIPLImage()
314 (void) CloseBlob(image); in ReadIPLImage()
315 return(GetFirstImageInList(image)); in ReadIPLImage()
317 length=image->columns; in ReadIPLImage()
318 quantum_type=GetQuantumType(image,exception); in ReadIPLImage()
321 SetHeaderFromIPL(image, &ipl_info); in ReadIPLImage()
324 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadIPLImage()
326 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadIPLImage()
328 return(DestroyImageList(image)); in ReadIPLImage()
333 quantum_info=AcquireQuantumInfo(image_info,image); in ReadIPLImage()
336 status=SetQuantumFormat(image,quantum_info,quantum_format); in ReadIPLImage()
340 if(image->columns != ipl_info.width){ in ReadIPLImage()
352 for(y = 0; y < (ssize_t) image->rows; y++){ in ReadIPLImage()
353 (void) ReadBlob(image, length*image->depth/8, pixels); in ReadIPLImage()
354 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in ReadIPLImage()
357 (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, in ReadIPLImage()
359 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadIPLImage()
364 for(y = 0; y < (ssize_t) image->rows; y++){ in ReadIPLImage()
365 (void) ReadBlob(image, length*image->depth/8, pixels); in ReadIPLImage()
366 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in ReadIPLImage()
369 (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, in ReadIPLImage()
371 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadIPLImage()
374 for(y = 0; y < (ssize_t) image->rows; y++){ in ReadIPLImage()
375 (void) ReadBlob(image, length*image->depth/8, pixels); in ReadIPLImage()
376 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in ReadIPLImage()
379 (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, in ReadIPLImage()
381 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadIPLImage()
384 for(y = 0; y < (ssize_t) image->rows; y++){ in ReadIPLImage()
385 (void) ReadBlob(image, length*image->depth/8, pixels); in ReadIPLImage()
386 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in ReadIPLImage()
389 (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, in ReadIPLImage()
391 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadIPLImage()
395 SetQuantumImageType(image,quantum_type); in ReadIPLImage()
400 if (EOFBlob(image) != MagickFalse) in ReadIPLImage()
403 image->filename); in ReadIPLImage()
411 AcquireNextImage(image_info,image,exception); in ReadIPLImage()
412 if (GetNextImageInList(image) == (Image *) NULL) in ReadIPLImage()
417 image=SyncNextImageInList(image); in ReadIPLImage()
418 status=SetImageProgress(image,LoadImagesTag,TellBlob(image), in ReadIPLImage()
419 GetBlobSize(image)); in ReadIPLImage()
424 CloseBlob(image); in ReadIPLImage()
426 return(DestroyImageList(image)); in ReadIPLImage()
427 return(GetFirstImageInList(image)); in ReadIPLImage()
512 static MagickBooleanType WriteIPLImage(const ImageInfo *image_info,Image *image, in WriteIPLImage() argument
544 assert(image != (Image *) NULL); in WriteIPLImage()
545 assert(image->signature == MagickCoreSignature); in WriteIPLImage()
546 if (image->debug != MagickFalse) in WriteIPLImage()
547 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WriteIPLImage()
550 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WriteIPLImage()
555 quantum_info=AcquireQuantumInfo(image_info,image); in WriteIPLImage()
559 (IsHighDynamicRangeImage(image,exception) != MagickFalse)) in WriteIPLImage()
560 SetQuantumFormat(image,quantum_info,FloatingPointQuantumFormat); in WriteIPLImage()
589 imageListLength=GetImageListLength(image); in WriteIPLImage()
593 ipl_info.width = (unsigned int) image->columns; in WriteIPLImage()
594 ipl_info.height = (unsigned int) image->rows; in WriteIPLImage()
595 (void) TransformImageColorspace(image,sRGBColorspace,exception); in WriteIPLImage()
596 if(IssRGBCompatibleColorspace(image->colorspace) != MagickFalse) { ipl_info.colors = 3; } in WriteIPLImage()
600 ((image->depth)/8)*ipl_info.height*ipl_info.width*ipl_info.colors*ipl_info.z); in WriteIPLImage()
612 (void) WriteBlob(image, 4, (const unsigned char *) "mmmm"); in WriteIPLImage()
614 image->endian = LSBEndian; in WriteIPLImage()
615 (void) WriteBlob(image, 4, (const unsigned char *) "iiii"); in WriteIPLImage()
617 (void) WriteBlobLong(image, 4); in WriteIPLImage()
618 (void) WriteBlob(image, 4, (const unsigned char *) "100f"); in WriteIPLImage()
619 (void) WriteBlob(image, 4, (const unsigned char *) "data"); in WriteIPLImage()
620 (void) WriteBlobLong(image, ipl_info.size); in WriteIPLImage()
621 (void) WriteBlobLong(image, ipl_info.width); in WriteIPLImage()
622 (void) WriteBlobLong(image, ipl_info.height); in WriteIPLImage()
623 (void) WriteBlobLong(image, ipl_info.colors); in WriteIPLImage()
625 (void) WriteBlobLong(image, 1); in WriteIPLImage()
627 (void) WriteBlobLong(image, ipl_info.z); in WriteIPLImage()
628 (void) WriteBlobLong(image, ipl_info.time); in WriteIPLImage()
629 (void) WriteBlobLong(image, ipl_info.byteType); in WriteIPLImage()
640 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteIPLImage()
643 (void) ExportQuantumPixels(image,(CacheView *) NULL, quantum_info, in WriteIPLImage()
645 (void) WriteBlob(image, image->columns*image->depth/8, pixels); in WriteIPLImage()
652 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteIPLImage()
655 (void) ExportQuantumPixels(image,(CacheView *) NULL, quantum_info, in WriteIPLImage()
657 (void) WriteBlob(image, image->columns*image->depth/8, pixels); in WriteIPLImage()
662 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteIPLImage()
665 (void) ExportQuantumPixels(image,(CacheView *) NULL, quantum_info, in WriteIPLImage()
667 (void) WriteBlob(image, image->columns*image->depth/8, pixels); in WriteIPLImage()
671 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteIPLImage()
674 (void) ExportQuantumPixels(image,(CacheView *) NULL, quantum_info, in WriteIPLImage()
676 (void) WriteBlob(image, image->columns*image->depth/8, pixels); in WriteIPLImage()
677 if (image->previous == (Image *) NULL) in WriteIPLImage()
679 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in WriteIPLImage()
680 image->rows); in WriteIPLImage()
687 if (GetNextImageInList(image) == (Image *) NULL) in WriteIPLImage()
689 image=SyncNextImageInList(image); in WriteIPLImage()
690 status=SetImageProgress(image,SaveImagesTag,scene++,imageListLength); in WriteIPLImage()
695 (void) WriteBlob(image, 4, (const unsigned char *) "fini"); in WriteIPLImage()
696 (void) WriteBlobLong(image, 0); in WriteIPLImage()
698 CloseBlob(image); in WriteIPLImage()