Home | History | Annotate | Download | only in coders

Lines Matching refs:image

13 %                          Write A Histogram Image.                           %
55 #include "MagickCore/image-private.h"
77 WriteHISTOGRAMImage(const ImageInfo *,Image *,ExceptionInfo *);
91 % RegisterHISTOGRAMImage() adds attributes for the Histogram image format
92 % to the list of supported formats. The attributes include the image format
108 entry=AcquireMagickInfo("HISTOGRAM","HISTOGRAM","Histogram of the image");
153 % WriteHISTOGRAMImage() writes an image to a file in Histogram format.
154 % The image shows a histogram of the color (or gray) values in the image. The
155 % image consists of three overlaid histograms: a red one for the red channel,
157 % image comment contains a list of unique pixel values and the number of times
158 % each occurs in the image.
166 % Image *image,ExceptionInfo *exception)
170 % o image_info: the image info.
172 % o image: The image.
178 Image *image,ExceptionInfo *exception)
188 Image
224 Allocate histogram image.
228 assert(image != (Image *) NULL);
229 assert(image->signature == MagickCoreSignature);
230 if (image->debug != MagickFalse)
233 SetGeometry(image,&geometry);
238 histogram_image=CloneImage(image,geometry.width,geometry.height,MagickTrue,
240 if (histogram_image == (Image *) NULL)
258 for (y=0; y < (ssize_t) image->rows; y++)
260 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
263 for (x=0; x < (ssize_t) image->columns; x++)
265 if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
266 histogram[ScaleQuantumToChar(GetPixelRed(image,p))].red++;
267 if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
268 histogram[ScaleQuantumToChar(GetPixelGreen(image,p))].green++;
269 if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
270 histogram[ScaleQuantumToChar(GetPixelBlue(image,p))].blue++;
271 p+=GetPixelChannels(image);
277 if (((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) &&
280 if (((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) &&
283 if (((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0) &&
291 Initialize histogram image.
301 if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
311 if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
321 if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
333 status=SetImageProgress(image,SaveImageTag,y,histogram_image->rows);
348 Add a unique colors as an image comment.
359 (void) GetNumberColors(image,file,exception);
372 Write Histogram image.
384 histogram_image->blob=CloneBlobInfo(image->blob);
386 image->blob=DetachBlob(image->blob);
387 image->blob=CloneBlobInfo(histogram_image->blob);