Home | History | Annotate | Download | only in coders

Lines Matching refs:image

50 #include "MagickCore/image.h"
51 #include "MagickCore/image-private.h"
82 % ReadDPSImage() reads a Adobe Postscript image file and returns it. It
83 % allocates the memory necessary for the new Image structure and returns a
84 % pointer to the new image.
88 % Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
92 % o image_info: the image info.
97 static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
108 Image
109 *image;
168 return((Image *) NULL);
174 Open image file.
176 image=AcquireImage(image_info,exception);
177 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
179 return((Image *) NULL);
205 image=DestroyImage(image);
208 return((Image *) NULL);
211 Create a pixmap the appropriate size for the image.
215 if ((image->resolution.x != 0.0) && (image->resolution.y != 0.0))
216 pixels_per_point=MagickMin(image->resolution.x,image->resolution.y)/
219 GetBlobFileHandle(image),visual_info->depth,pixels_per_point,&pixmap,
223 image=DestroyImage(image);
226 return((Image *) NULL);
232 GetBlobFileHandle(image),(int) bits_per_pixel.height,visual_info->depth,
237 image=DestroyImage(image);
240 return((Image *) NULL);
243 Initialize DPS X image.
250 image=DestroyImage(image);
253 return((Image *) NULL);
262 image=DestroyImage(image);
266 return((Image *) NULL);
311 Convert X image to MIFF format.
314 image->storage_class=PseudoClass;
315 image->columns=(size_t) dps_image->width;
316 image->rows=(size_t) dps_image->height;
319 (void) CloseBlob(image);
320 return(GetFirstImageInList(image));
322 status=SetImageExtent(image,image->columns,image->rows,exception);
324 return(DestroyImageList(image));
325 switch (image->storage_class)
367 Convert X image to DirectClass packets.
371 for (y=0; y < (ssize_t) image->rows; y++)
373 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
376 for (x=0; x < (ssize_t) image->columns; x++)
380 SetPixelRed(image,ScaleShortToQuantum(colors[index].red),q);
382 SetPixelGreen(image,ScaleShortToQuantum(colors[index].green),q);
384 SetPixelBlue(image,ScaleShortToQuantum(colors[index].blue),q);
385 q+=GetPixelChannels(image);
387 if (SyncAuthenticPixels(image,exception) == MagickFalse)
389 if (SetImageProgress(image,LoadImageTag,y,image->rows) == MagickFalse)
393 for (y=0; y < (ssize_t) image->rows; y++)
395 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
398 for (x=0; x < (ssize_t) image->columns; x++)
403 SetPixelRed(image,ScaleShortToQuantum((unsigned short) color),q);
406 SetPixelGreen(image,ScaleShortToQuantum((unsigned short) color),q);
409 SetPixelBlue(image,ScaleShortToQuantum((unsigned short) color),q);
410 q+=GetPixelChannels(image);
412 if (SyncAuthenticPixels(image,exception) == MagickFalse)
414 if (SetImageProgress(image,LoadImageTag,y,image->rows) == MagickFalse)
424 if (AcquireImageColormap(image,(size_t) visual_info->colormap_size,exception) == MagickFalse)
426 image=DestroyImage(image);
431 return((Image *) NULL);
433 for (i=0; i < (ssize_t) image->colors; i++)
435 image->colormap[colors[i].pixel].red=ScaleShortToQuantum(colors[i].red);
436 image->colormap[colors[i].pixel].green=
438 image->colormap[colors[i].pixel].blue=
442 Convert X image to PseudoClass packets.
444 for (y=0; y < (ssize_t) image->rows; y++)
446 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
449 for (x=0; x < (ssize_t) image->columns; x++)
451 SetPixelIndex(image,(unsigned short) XGetPixel(dps_image,x,y),q);
452 q+=GetPixelChannels(image);
454 if (SyncAuthenticPixels(image,exception) == MagickFalse)
456 if (SetImageProgress(image,LoadImageTag,y,image->rows) == MagickFalse)
464 if (image->storage_class == PseudoClass)
465 (void) SyncImage(image,exception);
467 Rasterize matte image.
470 GetBlobFileHandle(image),1,pixels_per_point,&pixmap,&bits_per_pixel,&page);
474 GetBlobFileHandle(image),(int) bits_per_pixel.height,1,&page,-page.x,
482 Initialize image matte.
489 image->storage_class=DirectClass;
490 image->alpha_trait=BlendPixelTrait;
491 for (y=0; y < (ssize_t) image->rows; y++)
493 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
496 for (x=0; x < (ssize_t) image->columns; x++)
498 SetPixelAlpha(image,OpaqueAlpha,q);
500 SetPixelAlpha(image,TransparentAlpha,q);
501 q+=GetPixelChannels(image);
503 if (SyncAuthenticPixels(image,exception) == MagickFalse)
515 (void) CloseBlob(image);
516 return(GetFirstImageInList(image));
532 % RegisterDPSImage() adds attributes for the Display Postscript image
533 % format to the list of supported formats. The attributes include the image