Lines Matching refs:image

160     *image;  in ReadMPCImage()  local
201 image=AcquireImage(image_info,exception); in ReadMPCImage()
202 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadMPCImage()
205 image=DestroyImageList(image); in ReadMPCImage()
208 (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); in ReadMPCImage()
210 c=ReadBlobByte(image); in ReadMPCImage()
213 image=DestroyImage(image); in ReadMPCImage()
229 image->depth=8; in ReadMPCImage()
230 image->compression=NoCompression; in ReadMPCImage()
248 c=ReadBlobByte(image); in ReadMPCImage()
250 c=ReadBlobByte(image); in ReadMPCImage()
273 (void) SetImageProperty(image,"comment",comment,exception); in ReadMPCImage()
275 c=ReadBlobByte(image); in ReadMPCImage()
291 c=ReadBlobByte(image); in ReadMPCImage()
296 c=ReadBlobByte(image); in ReadMPCImage()
302 c=ReadBlobByte(image); in ReadMPCImage()
316 c=ReadBlobByte(image); in ReadMPCImage()
319 c=ReadBlobByte(image); in ReadMPCImage()
323 c=ReadBlobByte(image); in ReadMPCImage()
354 image->alpha_trait=(PixelTrait) alpha_trait; in ReadMPCImage()
357 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
366 &image->background_color,exception); in ReadMPCImage()
372 image->chromaticity.blue_primary.x=geometry_info.rho; in ReadMPCImage()
373 image->chromaticity.blue_primary.y=geometry_info.sigma; in ReadMPCImage()
375 image->chromaticity.blue_primary.y= in ReadMPCImage()
376 image->chromaticity.blue_primary.x; in ReadMPCImage()
382 &image->border_color,exception); in ReadMPCImage()
385 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
400 image->storage_class=(ClassType) storage_class; in ReadMPCImage()
405 image->colors=StringToUnsignedLong(options); in ReadMPCImage()
417 image->colorspace=(ColorspaceType) colorspace; in ReadMPCImage()
429 image->compression=(CompressionType) compression; in ReadMPCImage()
434 image->columns=StringToUnsignedLong(options); in ReadMPCImage()
437 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
445 image->delay=StringToUnsignedLong(options); in ReadMPCImage()
450 image->depth=StringToUnsignedLong(options); in ReadMPCImage()
462 image->dispose=(DisposeType) dispose; in ReadMPCImage()
465 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
480 image->endian=(EndianType) endian; in ReadMPCImage()
485 image->error.mean_error_per_pixel=StringToDouble(options, in ReadMPCImage()
489 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
497 image->gamma=StringToDouble(options,(char **) NULL); in ReadMPCImage()
503 image->chromaticity.green_primary.x=geometry_info.rho; in ReadMPCImage()
504 image->chromaticity.green_primary.y=geometry_info.sigma; in ReadMPCImage()
506 image->chromaticity.green_primary.y= in ReadMPCImage()
507 image->chromaticity.green_primary.x; in ReadMPCImage()
510 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
523 image->iterations=StringToUnsignedLong(options); in ReadMPCImage()
526 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
540 &image->matte_color,exception); in ReadMPCImage()
545 image->error.normalized_maximum_error=StringToDouble( in ReadMPCImage()
551 image->error.normalized_mean_error=StringToDouble(options, in ReadMPCImage()
557 (void) CloneString(&image->montage,options); in ReadMPCImage()
560 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
568 image->number_channels=StringToUnsignedLong(options); in ReadMPCImage()
573 image->number_meta_channels=StringToUnsignedLong(options); in ReadMPCImage()
574 if (image->number_meta_channels > MaxPixelChannels) in ReadMPCImage()
599 image->orientation=(OrientationType) orientation; in ReadMPCImage()
602 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
614 (void) ParseAbsoluteGeometry(geometry,&image->page); in ReadMPCImage()
627 image->intensity=(PixelIntensityMethod) intensity; in ReadMPCImage()
638 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
646 image->quality=StringToUnsignedLong(options); in ReadMPCImage()
649 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
658 image->chromaticity.red_primary.x=geometry_info.rho; in ReadMPCImage()
660 image->chromaticity.red_primary.y=geometry_info.sigma; in ReadMPCImage()
672 image->rendering_intent=(RenderingIntent) rendering_intent; in ReadMPCImage()
678 image->resolution.x=geometry_info.rho; in ReadMPCImage()
679 image->resolution.y=geometry_info.sigma; in ReadMPCImage()
681 image->resolution.y=image->resolution.x; in ReadMPCImage()
686 image->rows=StringToUnsignedLong(options); in ReadMPCImage()
689 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
697 image->scene=StringToUnsignedLong(options); in ReadMPCImage()
700 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
708 image->ticks_per_second=(ssize_t) StringToLong(options); in ReadMPCImage()
717 (void) ParseAbsoluteGeometry(geometry,&image->tile_offset); in ReadMPCImage()
729 image->type=(ImageType) type; in ReadMPCImage()
732 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
747 image->units=(ResolutionType) units; in ReadMPCImage()
750 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
759 image->chromaticity.white_point.x=geometry_info.rho; in ReadMPCImage()
760 image->chromaticity.white_point.y=geometry_info.sigma; in ReadMPCImage()
762 image->chromaticity.white_point.y= in ReadMPCImage()
763 image->chromaticity.white_point.x; in ReadMPCImage()
766 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
771 (void) SetImageProperty(image,keyword,options,exception); in ReadMPCImage()
777 c=ReadBlobByte(image); in ReadMPCImage()
779 c=ReadBlobByte(image); in ReadMPCImage()
782 (void) ReadBlobByte(image); in ReadMPCImage()
787 (image->storage_class == UndefinedClass) || in ReadMPCImage()
788 (image->compression == UndefinedCompression) || in ReadMPCImage()
789 (image->columns == 0) || (image->rows == 0) || in ReadMPCImage()
790 (image->number_channels > MaxPixelChannels) || in ReadMPCImage()
791 (image->number_meta_channels > (MaxPixelChannels-8)) || in ReadMPCImage()
792 ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels) || in ReadMPCImage()
793 (image->depth == 0) || (image->depth > 64)) in ReadMPCImage()
805 if (image->montage != (char *) NULL) in ReadMPCImage()
814 image->directory=AcquireString((char *) NULL); in ReadMPCImage()
815 p=image->directory; in ReadMPCImage()
826 image->directory=(char *) ResizeQuantumMemory(image->directory, in ReadMPCImage()
827 extent+MagickPathExtent,sizeof(*image->directory)); in ReadMPCImage()
828 if (image->directory == (char *) NULL) in ReadMPCImage()
835 p=image->directory+length; in ReadMPCImage()
837 c=ReadBlobByte(image); in ReadMPCImage()
859 length=ReadBlobMSBLong(image); in ReadMPCImage()
860 if ((MagickSizeType) length > GetBlobSize(image)) in ReadMPCImage()
865 count=ReadBlob(image,length,GetStringInfoDatum(profile)); in ReadMPCImage()
871 status=SetImageProfile(image,name,profile,exception); in ReadMPCImage()
879 depth=GetImageQuantumDepth(image,MagickFalse); in ReadMPCImage()
880 if (image->storage_class == PseudoClass) in ReadMPCImage()
892 if ((MagickSizeType) (packet_size*image->colors) > GetBlobSize(image)) in ReadMPCImage()
894 image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1, in ReadMPCImage()
895 sizeof(*image->colormap)); in ReadMPCImage()
896 if (image->colormap == (PixelInfo *) NULL) in ReadMPCImage()
898 if (image->colors != 0) in ReadMPCImage()
903 colormap=(unsigned char *) AcquireQuantumMemory(image->colors, in ReadMPCImage()
907 count=ReadBlob(image,packet_size*image->colors,colormap); in ReadMPCImage()
908 if (count != (ssize_t) (packet_size*image->colors)) in ReadMPCImage()
926 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
929 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
932 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
935 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
945 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
948 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
951 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
954 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
964 for (i=0; i < (ssize_t) image->colors; i++) in ReadMPCImage()
967 image->colormap[i].red=(MagickRealType) in ReadMPCImage()
970 image->colormap[i].green=(MagickRealType) in ReadMPCImage()
973 image->colormap[i].blue=(MagickRealType) in ReadMPCImage()
983 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadMPCImage()
985 if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) || in ReadMPCImage()
986 (AcquireMagickResource(HeightResource,image->rows) == MagickFalse)) in ReadMPCImage()
991 status=PersistPixelCache(image,cache_filename,MagickTrue,&offset,exception); in ReadMPCImage()
994 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadMPCImage()
997 if (EOFBlob(image) != MagickFalse) in ReadMPCImage()
1000 image->filename); in ReadMPCImage()
1008 c=ReadBlobByte(image); in ReadMPCImage()
1015 AcquireNextImage(image_info,image,exception); in ReadMPCImage()
1016 if (GetNextImageInList(image) == (Image *) NULL) in ReadMPCImage()
1021 image=SyncNextImageInList(image); in ReadMPCImage()
1022 status=SetImageProgress(image,LoadImagesTag,TellBlob(image), in ReadMPCImage()
1023 GetBlobSize(image)); in ReadMPCImage()
1028 (void) CloseBlob(image); in ReadMPCImage()
1030 return(DestroyImageList(image)); in ReadMPCImage()
1031 return(GetFirstImageInList(image)); in ReadMPCImage()
1127 static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image, in WriteMPCImage() argument
1157 assert(image != (Image *) NULL); in WriteMPCImage()
1158 assert(image->signature == MagickCoreSignature); in WriteMPCImage()
1159 if (image->debug != MagickFalse) in WriteMPCImage()
1160 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WriteMPCImage()
1163 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WriteMPCImage()
1166 (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); in WriteMPCImage()
1170 imageListLength=GetImageListLength(image); in WriteMPCImage()
1176 depth=GetImageQuantumDepth(image,MagickTrue); in WriteMPCImage()
1177 if ((image->storage_class == PseudoClass) && in WriteMPCImage()
1178 (image->colors > (size_t) (GetQuantumRange(image->depth)+1))) in WriteMPCImage()
1179 (void) SetImageStorageClass(image,DirectClass,exception); in WriteMPCImage()
1180 (void) WriteBlobString(image,"id=MagickCache\n"); in WriteMPCImage()
1183 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1186 MagickClassOptions,image->storage_class),(double) image->colors, in WriteMPCImage()
1188 image->alpha_trait)); in WriteMPCImage()
1189 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1192 (double) image->number_channels,(double) image->number_meta_channels); in WriteMPCImage()
1193 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1195 "columns=%.20g rows=%.20g depth=%.20g\n",(double) image->columns, in WriteMPCImage()
1196 (double) image->rows,(double) image->depth); in WriteMPCImage()
1197 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1198 if (image->type != UndefinedType) in WriteMPCImage()
1201 CommandOptionToMnemonic(MagickTypeOptions,image->type)); in WriteMPCImage()
1202 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1205 CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace)); in WriteMPCImage()
1206 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1207 if (image->intensity != UndefinedPixelIntensityMethod) in WriteMPCImage()
1211 MagickPixelIntensityOptions,image->intensity)); in WriteMPCImage()
1212 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1214 if (image->endian != UndefinedEndian) in WriteMPCImage()
1217 CommandOptionToMnemonic(MagickEndianOptions,image->endian)); in WriteMPCImage()
1218 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1220 if (image->compression != UndefinedCompression) in WriteMPCImage()
1224 MagickCompressOptions,image->compression),(double) image->quality); in WriteMPCImage()
1225 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1227 if (image->units != UndefinedResolution) in WriteMPCImage()
1230 CommandOptionToMnemonic(MagickResolutionOptions,image->units)); in WriteMPCImage()
1231 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1233 if ((image->resolution.x != 0) || (image->resolution.y != 0)) in WriteMPCImage()
1236 "resolution=%gx%g\n",image->resolution.x,image->resolution.y); in WriteMPCImage()
1237 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1239 if ((image->page.width != 0) || (image->page.height != 0)) in WriteMPCImage()
1242 "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double) in WriteMPCImage()
1243 image->page.height,(double) image->page.x,(double) image->page.y); in WriteMPCImage()
1244 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1247 if ((image->page.x != 0) || (image->page.y != 0)) in WriteMPCImage()
1250 (long) image->page.x,(long) image->page.y); in WriteMPCImage()
1251 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1253 if ((image->tile_offset.x != 0) || (image->tile_offset.y != 0)) in WriteMPCImage()
1256 "tile-offset=%+ld%+ld\n",(long) image->tile_offset.x,(long) in WriteMPCImage()
1257 image->tile_offset.y); in WriteMPCImage()
1258 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1260 if ((GetNextImageInList(image) != (Image *) NULL) || in WriteMPCImage()
1261 (GetPreviousImageInList(image) != (Image *) NULL)) in WriteMPCImage()
1263 if (image->scene == 0) in WriteMPCImage()
1266 image->iterations,(double) image->delay,(double) in WriteMPCImage()
1267 image->ticks_per_second); in WriteMPCImage()
1271 (double) image->scene,(double) image->iterations,(double) in WriteMPCImage()
1272 image->delay,(double) image->ticks_per_second); in WriteMPCImage()
1273 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1277 if (image->scene != 0) in WriteMPCImage()
1280 (double) image->scene); in WriteMPCImage()
1281 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1283 if (image->iterations != 0) in WriteMPCImage()
1286 "iterations=%.20g\n",(double) image->iterations); in WriteMPCImage()
1287 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1289 if (image->delay != 0) in WriteMPCImage()
1292 (double) image->delay); in WriteMPCImage()
1293 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1295 if (image->ticks_per_second != UndefinedTicksPerSecond) in WriteMPCImage()
1298 "ticks-per-second=%.20g\n",(double) image->ticks_per_second); in WriteMPCImage()
1299 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1302 if (image->gravity != UndefinedGravity) in WriteMPCImage()
1305 CommandOptionToMnemonic(MagickGravityOptions,image->gravity)); in WriteMPCImage()
1306 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1308 if (image->dispose != UndefinedDispose) in WriteMPCImage()
1311 CommandOptionToMnemonic(MagickDisposeOptions,image->dispose)); in WriteMPCImage()
1312 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1314 if (image->rendering_intent != UndefinedIntent) in WriteMPCImage()
1318 image->rendering_intent)); in WriteMPCImage()
1319 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1321 if (image->gamma != 0.0) in WriteMPCImage()
1324 image->gamma); in WriteMPCImage()
1325 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1327 if (image->chromaticity.white_point.x != 0.0) in WriteMPCImage()
1334 image->chromaticity.red_primary.x,image->chromaticity.red_primary.y, in WriteMPCImage()
1335 image->chromaticity.green_primary.x, in WriteMPCImage()
1336 image->chromaticity.green_primary.y, in WriteMPCImage()
1337 image->chromaticity.blue_primary.x, in WriteMPCImage()
1338 image->chromaticity.blue_primary.y); in WriteMPCImage()
1339 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1341 "white-point=%g,%g\n",image->chromaticity.white_point.x, in WriteMPCImage()
1342 image->chromaticity.white_point.y); in WriteMPCImage()
1343 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1345 if (image->orientation != UndefinedOrientation) in WriteMPCImage()
1349 image->orientation)); in WriteMPCImage()
1350 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1352 if (image->profiles != (void *) NULL) in WriteMPCImage()
1363 ResetImageProfileIterator(image); in WriteMPCImage()
1364 for (name=GetNextImageProfile(image); name != (const char *) NULL; ) in WriteMPCImage()
1366 profile=GetImageProfile(image,name); in WriteMPCImage()
1371 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1373 name=GetNextImageProfile(image); in WriteMPCImage()
1376 if (image->montage != (char *) NULL) in WriteMPCImage()
1379 image->montage); in WriteMPCImage()
1380 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1382 ResetImagePropertyIterator(image); in WriteMPCImage()
1383 property=GetNextImageProperty(image); in WriteMPCImage()
1387 (void) WriteBlobString(image,buffer); in WriteMPCImage()
1388 value=GetImageProperty(image,property,exception); in WriteMPCImage()
1399 (void) WriteBlob(image,length,(const unsigned char *) value); in WriteMPCImage()
1402 (void) WriteBlobByte(image,'{'); in WriteMPCImage()
1404 (void) WriteBlob(image,length,(const unsigned char *) value); in WriteMPCImage()
1409 (void) WriteBlobByte(image,'\\'); in WriteMPCImage()
1410 (void) WriteBlobByte(image,(unsigned char) value[i]); in WriteMPCImage()
1412 (void) WriteBlobByte(image,'}'); in WriteMPCImage()
1415 (void) WriteBlobByte(image,'\n'); in WriteMPCImage()
1416 property=GetNextImageProperty(image); in WriteMPCImage()
1418 (void) WriteBlobString(image,"\f\n:\032"); in WriteMPCImage()
1419 if (image->montage != (char *) NULL) in WriteMPCImage()
1424 if (image->directory != (char *) NULL) in WriteMPCImage()
1425 (void) WriteBlobString(image,image->directory); in WriteMPCImage()
1426 (void) WriteBlobByte(image,'\0'); in WriteMPCImage()
1428 if (image->profiles != 0) in WriteMPCImage()
1439 ResetImageProfileIterator(image); in WriteMPCImage()
1440 name=GetNextImageProfile(image); in WriteMPCImage()
1443 profile=GetImageProfile(image,name); in WriteMPCImage()
1444 (void) WriteBlobMSBLong(image,(unsigned int) in WriteMPCImage()
1446 (void) WriteBlob(image,GetStringInfoLength(profile), in WriteMPCImage()
1448 name=GetNextImageProfile(image); in WriteMPCImage()
1451 if (image->storage_class == PseudoClass) in WriteMPCImage()
1464 colormap=(unsigned char *) AcquireQuantumMemory(image->colors, in WriteMPCImage()
1472 for (i=0; i < (ssize_t) image->colors; i++) in WriteMPCImage()
1487 pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].red)); in WriteMPCImage()
1490 image->colormap[i].green)); in WriteMPCImage()
1492 pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].blue)); in WriteMPCImage()
1501 pixel=ScaleQuantumToShort(ClampToQuantum(image->colormap[i].red)); in WriteMPCImage()
1504 image->colormap[i].green)); in WriteMPCImage()
1507 image->colormap[i].blue)); in WriteMPCImage()
1517 image->colormap[i].red)); in WriteMPCImage()
1520 image->colormap[i].green)); in WriteMPCImage()
1523 image->colormap[i].blue)); in WriteMPCImage()
1529 (void) WriteBlob(image,packet_size*image->colors,colormap); in WriteMPCImage()
1535 status=PersistPixelCache(image,cache_filename,MagickFalse,&offset, in WriteMPCImage()
1539 if (GetNextImageInList(image) == (Image *) NULL) in WriteMPCImage()
1541 image=SyncNextImageInList(image); in WriteMPCImage()
1542 if (image->progress_monitor != (MagickProgressMonitor) NULL) in WriteMPCImage()
1544 status=image->progress_monitor(SaveImagesTag,scene, in WriteMPCImage()
1545 imageListLength,image->client_data); in WriteMPCImage()
1551 (void) CloseBlob(image); in WriteMPCImage()