Lines Matching refs:image
165 *image; in ReadMPCImage() local
209 image=AcquireImage(image_info,exception); in ReadMPCImage()
210 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadMPCImage()
213 image=DestroyImageList(image); in ReadMPCImage()
216 (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); in ReadMPCImage()
218 c=ReadBlobByte(image); in ReadMPCImage()
221 image=DestroyImage(image); in ReadMPCImage()
239 image->depth=8; in ReadMPCImage()
240 image->compression=NoCompression; in ReadMPCImage()
258 c=ReadBlobByte(image); in ReadMPCImage()
260 c=ReadBlobByte(image); in ReadMPCImage()
283 (void) SetImageProperty(image,"comment",comment,exception); in ReadMPCImage()
285 c=ReadBlobByte(image); in ReadMPCImage()
301 c=ReadBlobByte(image); in ReadMPCImage()
306 c=ReadBlobByte(image); in ReadMPCImage()
312 c=ReadBlobByte(image); in ReadMPCImage()
326 c=ReadBlobByte(image); in ReadMPCImage()
329 c=ReadBlobByte(image); in ReadMPCImage()
333 c=ReadBlobByte(image); in ReadMPCImage()
364 image->alpha_trait=(PixelTrait) alpha_trait; in ReadMPCImage()
367 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
376 &image->background_color,exception); in ReadMPCImage()
382 image->chromaticity.blue_primary.x=geometry_info.rho; in ReadMPCImage()
383 image->chromaticity.blue_primary.y=geometry_info.sigma; in ReadMPCImage()
385 image->chromaticity.blue_primary.y= in ReadMPCImage()
386 image->chromaticity.blue_primary.x; in ReadMPCImage()
392 &image->border_color,exception); in ReadMPCImage()
395 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
410 image->storage_class=(ClassType) storage_class; in ReadMPCImage()
415 image->colors=StringToUnsignedLong(options); in ReadMPCImage()
427 image->colorspace=(ColorspaceType) colorspace; in ReadMPCImage()
439 image->compression=(CompressionType) compression; in ReadMPCImage()
444 image->columns=StringToUnsignedLong(options); in ReadMPCImage()
447 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
455 image->delay=StringToUnsignedLong(options); in ReadMPCImage()
460 image->depth=StringToUnsignedLong(options); in ReadMPCImage()
472 image->dispose=(DisposeType) dispose; in ReadMPCImage()
475 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
490 image->endian=(EndianType) endian; in ReadMPCImage()
495 image->error.mean_error_per_pixel=StringToDouble(options, in ReadMPCImage()
499 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
507 image->gamma=StringToDouble(options,(char **) NULL); in ReadMPCImage()
513 image->chromaticity.green_primary.x=geometry_info.rho; in ReadMPCImage()
514 image->chromaticity.green_primary.y=geometry_info.sigma; in ReadMPCImage()
516 image->chromaticity.green_primary.y= in ReadMPCImage()
517 image->chromaticity.green_primary.x; in ReadMPCImage()
520 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
533 image->iterations=StringToUnsignedLong(options); in ReadMPCImage()
536 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
550 &image->matte_color,exception); in ReadMPCImage()
555 image->error.normalized_maximum_error=StringToDouble( in ReadMPCImage()
561 image->error.normalized_mean_error=StringToDouble(options, in ReadMPCImage()
567 (void) CloneString(&image->montage,options); in ReadMPCImage()
570 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
578 image->number_channels=StringToUnsignedLong(options); in ReadMPCImage()
583 image->number_meta_channels=StringToUnsignedLong(options); in ReadMPCImage()
584 if (image->number_meta_channels > MaxPixelChannels) in ReadMPCImage()
609 image->orientation=(OrientationType) orientation; in ReadMPCImage()
612 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
624 (void) ParseAbsoluteGeometry(geometry,&image->page); in ReadMPCImage()
637 image->intensity=(PixelIntensityMethod) intensity; in ReadMPCImage()
648 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
656 image->quality=StringToUnsignedLong(options); in ReadMPCImage()
659 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
668 image->chromaticity.red_primary.x=geometry_info.rho; in ReadMPCImage()
670 image->chromaticity.red_primary.y=geometry_info.sigma; in ReadMPCImage()
682 image->rendering_intent=(RenderingIntent) rendering_intent; in ReadMPCImage()
688 image->resolution.x=geometry_info.rho; in ReadMPCImage()
689 image->resolution.y=geometry_info.sigma; in ReadMPCImage()
691 image->resolution.y=image->resolution.x; in ReadMPCImage()
696 image->rows=StringToUnsignedLong(options); in ReadMPCImage()
699 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
707 image->scene=StringToUnsignedLong(options); in ReadMPCImage()
710 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
718 image->ticks_per_second=(ssize_t) StringToLong(options); in ReadMPCImage()
727 (void) ParseAbsoluteGeometry(geometry,&image->tile_offset); in ReadMPCImage()
739 image->type=(ImageType) type; in ReadMPCImage()
742 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
757 image->units=(ResolutionType) units; in ReadMPCImage()
760 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
769 image->chromaticity.white_point.x=geometry_info.rho; in ReadMPCImage()
770 image->chromaticity.white_point.y=geometry_info.sigma; in ReadMPCImage()
772 image->chromaticity.white_point.y= in ReadMPCImage()
773 image->chromaticity.white_point.x; in ReadMPCImage()
776 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
781 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
787 c=ReadBlobByte(image); in ReadMPCImage()
789 c=ReadBlobByte(image); in ReadMPCImage()
792 (void) ReadBlobByte(image); in ReadMPCImage()
797 (image->storage_class == UndefinedClass) || in ReadMPCImage()
798 (image->compression == UndefinedCompression) || in ReadMPCImage()
799 (image->columns == 0) || (image->rows == 0) || in ReadMPCImage()
800 (image->number_channels > MaxPixelChannels) || in ReadMPCImage()
801 (image->number_meta_channels > (MaxPixelChannels-8)) || in ReadMPCImage()
802 ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels) || in ReadMPCImage()
803 (image->depth == 0) || (image->depth > 64)) in ReadMPCImage()
818 if (image->montage != (char *) NULL) in ReadMPCImage()
827 image->directory=AcquireString((char *) NULL); in ReadMPCImage()
828 p=image->directory; in ReadMPCImage()
839 image->directory=(char *) ResizeQuantumMemory(image->directory, in ReadMPCImage()
840 extent+MagickPathExtent,sizeof(*image->directory)); in ReadMPCImage()
841 if (image->directory == (char *) NULL) in ReadMPCImage()
848 p=image->directory+length; in ReadMPCImage()
850 c=ReadBlobByte(image); in ReadMPCImage()
872 length=ReadBlobMSBLong(image); in ReadMPCImage()
873 if ((MagickSizeType) length > GetBlobSize(image)) in ReadMPCImage()
878 count=ReadBlob(image,length,GetStringInfoDatum(profile)); in ReadMPCImage()
884 status=SetImageProfile(image,name,profile,exception); in ReadMPCImage()
892 depth=GetImageQuantumDepth(image,MagickFalse); in ReadMPCImage()
893 if (image->storage_class == PseudoClass) in ReadMPCImage()
905 if ((MagickSizeType) (packet_size*image->colors) > GetBlobSize(image)) in ReadMPCImage()
907 image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1, in ReadMPCImage()
908 sizeof(*image->colormap)); in ReadMPCImage()
909 if (image->colormap == (PixelInfo *) NULL) in ReadMPCImage()
911 if (image->colors != 0) in ReadMPCImage()
916 colormap=(unsigned char *) AcquireQuantumMemory(image->colors, in ReadMPCImage()
920 count=ReadBlob(image,packet_size*image->colors,colormap); in ReadMPCImage()
921 if (count != (ssize_t) (packet_size*image->colors)) in ReadMPCImage()
939 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
942 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
945 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
948 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
958 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
961 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
964 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
967 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
977 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
980 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
983 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
986 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
996 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadMPCImage()
998 if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) || in ReadMPCImage()
999 (AcquireMagickResource(HeightResource,image->rows) == MagickFalse)) in ReadMPCImage()
1004 status=PersistPixelCache(image,cache_filename,MagickTrue,&offset,exception); in ReadMPCImage()
1007 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadMPCImage()
1010 if (EOFBlob(image) != MagickFalse) in ReadMPCImage()
1013 image->filename); in ReadMPCImage()
1021 c=ReadBlobByte(image); in ReadMPCImage()
1028 AcquireNextImage(image_info,image,exception); in ReadMPCImage()
1029 if (GetNextImageInList(image) == (Image *) NULL) in ReadMPCImage()
1034 image=SyncNextImageInList(image); in ReadMPCImage()
1035 status=SetImageProgress(image,LoadImagesTag,TellBlob(image), in ReadMPCImage()
1036 GetBlobSize(image)); in ReadMPCImage()
1041 (void) CloseBlob(image); in ReadMPCImage()
1043 return(DestroyImageList(image)); in ReadMPCImage()
1044 return(GetFirstImageInList(image)); in ReadMPCImage()
1139 static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image, in WriteMPCImage() argument
1169 assert(image != (Image *) NULL); in WriteMPCImage()
1170 assert(image->signature == MagickCoreSignature); in WriteMPCImage()
1171 if (image->debug != MagickFalse) in WriteMPCImage()
1172 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WriteMPCImage()
1175 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WriteMPCImage()
1178 (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); in WriteMPCImage()
1182 imageListLength=GetImageListLength(image); in WriteMPCImage()
1193 (void) SetImageStorageClass(image,image->storage_class,exception); in WriteMPCImage()
1194 depth=GetImageQuantumDepth(image,MagickTrue); in WriteMPCImage()
1195 if ((image->storage_class == PseudoClass) && in WriteMPCImage()
1196 (image->colors > (size_t) (GetQuantumRange(image->depth)+1))) in WriteMPCImage()
1197 (void) SetImageStorageClass(image,DirectClass,exception); in WriteMPCImage()
1198 (void) WriteBlobString(image,"id=MagickPixelCache\n"); in WriteMPCImage()
1203 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1206 MagickClassOptions,image->storage_class),(double) image->colors, in WriteMPCImage()
1208 image->alpha_trait)); in WriteMPCImage()
1209 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1212 (double) image->number_channels,(double) image->number_meta_channels); in WriteMPCImage()
1213 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1215 "columns=%.20g rows=%.20g depth=%.20g\n",(double) image->columns, in WriteMPCImage()
1216 (double) image->rows,(double) image->depth); in WriteMPCImage()
1217 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1218 if (image->type != UndefinedType) in WriteMPCImage()
1221 CommandOptionToMnemonic(MagickTypeOptions,image->type)); in WriteMPCImage()
1222 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1225 CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace)); in WriteMPCImage()
1226 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1227 if (image->intensity != UndefinedPixelIntensityMethod) in WriteMPCImage()
1231 MagickPixelIntensityOptions,image->intensity)); in WriteMPCImage()
1232 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1234 if (image->endian != UndefinedEndian) in WriteMPCImage()
1237 CommandOptionToMnemonic(MagickEndianOptions,image->endian)); in WriteMPCImage()
1238 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1240 if (image->compression != UndefinedCompression) in WriteMPCImage()
1244 MagickCompressOptions,image->compression),(double) image->quality); in WriteMPCImage()
1245 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1247 if (image->units != UndefinedResolution) in WriteMPCImage()
1250 CommandOptionToMnemonic(MagickResolutionOptions,image->units)); in WriteMPCImage()
1251 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1253 if ((image->resolution.x != 0) || (image->resolution.y != 0)) in WriteMPCImage()
1256 "resolution=%gx%g\n",image->resolution.x,image->resolution.y); in WriteMPCImage()
1257 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1259 if ((image->page.width != 0) || (image->page.height != 0)) in WriteMPCImage()
1262 "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double) in WriteMPCImage()
1263 image->page.height,(double) image->page.x,(double) image->page.y); in WriteMPCImage()
1264 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1267 if ((image->page.x != 0) || (image->page.y != 0)) in WriteMPCImage()
1270 (long) image->page.x,(long) image->page.y); in WriteMPCImage()
1271 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1273 if ((image->tile_offset.x != 0) || (image->tile_offset.y != 0)) in WriteMPCImage()
1276 "tile-offset=%+ld%+ld\n",(long) image->tile_offset.x,(long) in WriteMPCImage()
1277 image->tile_offset.y); in WriteMPCImage()
1278 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1280 if ((GetNextImageInList(image) != (Image *) NULL) || in WriteMPCImage()
1281 (GetPreviousImageInList(image) != (Image *) NULL)) in WriteMPCImage()
1283 if (image->scene == 0) in WriteMPCImage()
1286 image->iterations,(double) image->delay,(double) in WriteMPCImage()
1287 image->ticks_per_second); in WriteMPCImage()
1291 (double) image->scene,(double) image->iterations,(double) in WriteMPCImage()
1292 image->delay,(double) image->ticks_per_second); in WriteMPCImage()
1293 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1297 if (image->scene != 0) in WriteMPCImage()
1300 (double) image->scene); in WriteMPCImage()
1301 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1303 if (image->iterations != 0) in WriteMPCImage()
1306 "iterations=%.20g\n",(double) image->iterations); in WriteMPCImage()
1307 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1309 if (image->delay != 0) in WriteMPCImage()
1312 (double) image->delay); in WriteMPCImage()
1313 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1315 if (image->ticks_per_second != UndefinedTicksPerSecond) in WriteMPCImage()
1318 "ticks-per-second=%.20g\n",(double) image->ticks_per_second); in WriteMPCImage()
1319 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1322 if (image->gravity != UndefinedGravity) in WriteMPCImage()
1325 CommandOptionToMnemonic(MagickGravityOptions,image->gravity)); in WriteMPCImage()
1326 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1328 if (image->dispose != UndefinedDispose) in WriteMPCImage()
1331 CommandOptionToMnemonic(MagickDisposeOptions,image->dispose)); in WriteMPCImage()
1332 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1334 if (image->rendering_intent != UndefinedIntent) in WriteMPCImage()
1338 image->rendering_intent)); in WriteMPCImage()
1339 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1341 if (image->gamma != 0.0) in WriteMPCImage()
1344 image->gamma); in WriteMPCImage()
1345 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1347 if (image->chromaticity.white_point.x != 0.0) in WriteMPCImage()
1354 image->chromaticity.red_primary.x,image->chromaticity.red_primary.y, in WriteMPCImage()
1355 image->chromaticity.green_primary.x, in WriteMPCImage()
1356 image->chromaticity.green_primary.y, in WriteMPCImage()
1357 image->chromaticity.blue_primary.x, in WriteMPCImage()
1358 image->chromaticity.blue_primary.y); in WriteMPCImage()
1359 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1361 "white-point=%g,%g\n",image->chromaticity.white_point.x, in WriteMPCImage()
1362 image->chromaticity.white_point.y); in WriteMPCImage()
1363 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1365 if (image->orientation != UndefinedOrientation) in WriteMPCImage()
1369 image->orientation)); in WriteMPCImage()
1370 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1372 if (image->profiles != (void *) NULL) in WriteMPCImage()
1383 ResetImageProfileIterator(image); in WriteMPCImage()
1384 for (name=GetNextImageProfile(image); name != (const char *) NULL; ) in WriteMPCImage()
1386 profile=GetImageProfile(image,name); in WriteMPCImage()
1391 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1393 name=GetNextImageProfile(image); in WriteMPCImage()
1396 if (image->montage != (char *) NULL) in WriteMPCImage()
1399 image->montage); in WriteMPCImage()
1400 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1402 ResetImagePropertyIterator(image); in WriteMPCImage()
1403 property=GetNextImageProperty(image); in WriteMPCImage()
1407 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1408 value=GetImageProperty(image,property,exception); in WriteMPCImage()
1419 (void) WriteBlob(image,length,(const unsigned char *) value); in WriteMPCImage()
1422 (void) WriteBlobByte(image,'{'); in WriteMPCImage()
1424 (void) WriteBlob(image,length,(const unsigned char *) value); in WriteMPCImage()
1429 (void) WriteBlobByte(image,'\\'); in WriteMPCImage()
1430 (void) WriteBlobByte(image,(unsigned char) value[i]); in WriteMPCImage()
1432 (void) WriteBlobByte(image,'}'); in WriteMPCImage()
1435 (void) WriteBlobByte(image,'\n'); in WriteMPCImage()
1436 property=GetNextImageProperty(image); in WriteMPCImage()
1438 (void) WriteBlobString(image,"\f\n:\032"); in WriteMPCImage()
1439 if (image->montage != (char *) NULL) in WriteMPCImage()
1444 if (image->directory != (char *) NULL) in WriteMPCImage()
1445 (void) WriteBlobString(image,image->directory); in WriteMPCImage()
1446 (void) WriteBlobByte(image,'\0'); in WriteMPCImage()
1448 if (image->profiles != 0) in WriteMPCImage()
1459 ResetImageProfileIterator(image); in WriteMPCImage()
1460 name=GetNextImageProfile(image); in WriteMPCImage()
1463 profile=GetImageProfile(image,name); in WriteMPCImage()
1464 (void) WriteBlobMSBLong(image,(unsigned int) in WriteMPCImage()
1466 (void) WriteBlob(image,GetStringInfoLength(profile), in WriteMPCImage()
1468 name=GetNextImageProfile(image); in WriteMPCImage()
1471 if (image->storage_class == PseudoClass) in WriteMPCImage()
1484 colormap=(unsigned char *) AcquireQuantumMemory(image->colors, in WriteMPCImage()
1492 for (i=0; i < (ssize_t) image->colors; i++) in WriteMPCImage()
1507 pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].red)); in WriteMPCImage()
1510 image->colormap[i].green)); in WriteMPCImage()
1512 pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].blue)); in WriteMPCImage()
1521 pixel=ScaleQuantumToShort(ClampToQuantum(image->colormap[i].red)); in WriteMPCImage()
1524 image->colormap[i].green)); in WriteMPCImage()
1527 image->colormap[i].blue)); in WriteMPCImage()
1537 image->colormap[i].red)); in WriteMPCImage()
1540 image->colormap[i].green)); in WriteMPCImage()
1543 image->colormap[i].blue)); in WriteMPCImage()
1549 (void) WriteBlob(image,packet_size*image->colors,colormap); in WriteMPCImage()
1555 status=PersistPixelCache(image,cache_filename,MagickFalse,&offset, in WriteMPCImage()
1559 if (GetNextImageInList(image) == (Image *) NULL) in WriteMPCImage()
1561 image=SyncNextImageInList(image); in WriteMPCImage()
1562 if (image->progress_monitor != (MagickProgressMonitor) NULL) in WriteMPCImage()
1564 status=image->progress_monitor(SaveImagesTag,scene, in WriteMPCImage()
1565 imageListLength,image->client_data); in WriteMPCImage()
1571 (void) CloseBlob(image); in WriteMPCImage()