• Home
  • Raw
  • Download

Lines Matching refs:image

98 static MagickBooleanType InsertRow(Image *image,ssize_t bpp,unsigned char *p,  in InsertRow()  argument
113 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in InsertRow()
120 for (x=0; x < ((ssize_t) image->columns-7); x+=8) in InsertRow()
125 SetPixelIndex(image,index,q); in InsertRow()
126 if (index < image->colors) in InsertRow()
127 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
128 q+=GetPixelChannels(image); in InsertRow()
132 if ((image->columns % 8) != 0) in InsertRow()
134 for (bit=0; bit < (ssize_t) (image->columns % 8); bit++) in InsertRow()
137 SetPixelIndex(image,index,q); in InsertRow()
138 if (index < image->colors) in InsertRow()
139 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
140 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
141 q+=GetPixelChannels(image); in InsertRow()
149 for (x=0; x < ((ssize_t) image->columns-3); x+=4) in InsertRow()
151 index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception); in InsertRow()
152 SetPixelIndex(image,index,q); in InsertRow()
153 if (index < image->colors) in InsertRow()
154 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
155 q+=GetPixelChannels(image); in InsertRow()
156 index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception); in InsertRow()
157 SetPixelIndex(image,index,q); in InsertRow()
158 if (index < image->colors) in InsertRow()
159 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
160 q+=GetPixelChannels(image); in InsertRow()
161 index=ConstrainColormapIndex(image,(*p >> 2) & 0x3,exception); in InsertRow()
162 SetPixelIndex(image,index,q); in InsertRow()
163 if (index < image->colors) in InsertRow()
164 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
165 q+=GetPixelChannels(image); in InsertRow()
166 index=ConstrainColormapIndex(image,(*p) & 0x3,exception); in InsertRow()
167 SetPixelIndex(image,index,q); in InsertRow()
168 if (index < image->colors) in InsertRow()
169 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
170 q+=GetPixelChannels(image); in InsertRow()
173 if ((image->columns % 4) != 0) in InsertRow()
175 index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception); in InsertRow()
176 SetPixelIndex(image,index,q); in InsertRow()
177 if (index < image->colors) in InsertRow()
178 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
179 q+=GetPixelChannels(image); in InsertRow()
180 if ((image->columns % 4) > 1) in InsertRow()
182 index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception); in InsertRow()
183 SetPixelIndex(image,index,q); in InsertRow()
184 if (index < image->colors) in InsertRow()
185 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
186 q+=GetPixelChannels(image); in InsertRow()
187 if ((image->columns % 4) > 2) in InsertRow()
189 index=ConstrainColormapIndex(image,(*p >> 2) & 0x3, in InsertRow()
191 SetPixelIndex(image,index,q); in InsertRow()
192 if (index < image->colors) in InsertRow()
193 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) in InsertRow()
195 q+=GetPixelChannels(image); in InsertRow()
205 for (x=0; x < ((ssize_t) image->columns-1); x+=2) in InsertRow()
207 index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception); in InsertRow()
208 SetPixelIndex(image,index,q); in InsertRow()
209 if (index < image->colors) in InsertRow()
210 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
211 q+=GetPixelChannels(image); in InsertRow()
212 index=ConstrainColormapIndex(image,(*p) & 0x0f,exception); in InsertRow()
213 SetPixelIndex(image,index,q); in InsertRow()
214 if (index < image->colors) in InsertRow()
215 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
217 q+=GetPixelChannels(image); in InsertRow()
219 if ((image->columns % 2) != 0) in InsertRow()
221 index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception); in InsertRow()
222 SetPixelIndex(image,index,q); in InsertRow()
223 if (index < image->colors) in InsertRow()
224 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
226 q+=GetPixelChannels(image); in InsertRow()
232 for (x=0; x < (ssize_t) image->columns; x++) in InsertRow()
234 index=ConstrainColormapIndex(image,*p,exception); in InsertRow()
235 SetPixelIndex(image,index,q); in InsertRow()
236 if (index < image->colors) in InsertRow()
237 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
239 q+=GetPixelChannels(image); in InsertRow()
245 for (x=0; x < (ssize_t) image->columns; x++) in InsertRow()
247 SetPixelRed(image,ScaleCharToQuantum(*p++),q); in InsertRow()
248 SetPixelGreen(image,ScaleCharToQuantum(*p++),q); in InsertRow()
249 SetPixelBlue(image,ScaleCharToQuantum(*p++),q); in InsertRow()
250 q+=GetPixelChannels(image); in InsertRow()
254 if (!SyncAuthenticPixels(image,exception)) in InsertRow()
262 static int GetCutColors(Image *image,ExceptionInfo *exception) in GetCutColors() argument
277 for (y=0; y < (ssize_t) image->rows; y++) in GetCutColors()
279 q=GetAuthenticPixels(image,0,y,image->columns,1,exception); in GetCutColors()
282 for (x=0; x < (ssize_t) image->columns; x++) in GetCutColors()
284 if (intensity < GetPixelRed(image,q)) in GetCutColors()
285 intensity=GetPixelRed(image,q); in GetCutColors()
288 q+=GetPixelChannels(image); in GetCutColors()
335 Image *image,*palette; in ReadCUTImage() local
362 image=AcquireImage(image_info,exception); in ReadCUTImage()
363 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadCUTImage()
366 image=DestroyImageList(image); in ReadCUTImage()
374 Header.Width=ReadBlobLSBShort(image); in ReadCUTImage()
375 Header.Height=ReadBlobLSBShort(image); in ReadCUTImage()
376 Header.Reserved=ReadBlobLSBShort(image); in ReadCUTImage()
382 EncodedByte=ReadBlobLSBShort(image); in ReadCUTImage()
383 RunCount=(unsigned char) ReadBlobByte(image); in ReadCUTImage()
390 offset=SeekBlob(image,TellBlob(image)+i,SEEK_SET); in ReadCUTImage()
393 if(EOFBlob(image) != MagickFalse) goto CUT_KO; /*wrong data*/ in ReadCUTImage()
397 RunCount=(unsigned char) ReadBlobByte(image); in ReadCUTImage()
398 if(EOFBlob(image) != MagickFalse) goto CUT_KO; /*wrong data: unexpected eof in line*/ in ReadCUTImage()
409 image->columns=Header.Width; in ReadCUTImage()
410 image->rows=Header.Height; in ReadCUTImage()
411 image->depth=8; in ReadCUTImage()
412 image->colors=(size_t) (GetQuantumRange(1UL*i)+1); in ReadCUTImage()
415 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadCUTImage()
417 return(DestroyImageList(image)); in ReadCUTImage()
483 if (EOFBlob(image)) in ReadCUTImage()
487 image->colors=PalHeader.MaxIndex+1; in ReadCUTImage()
488 if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) goto NoMemory; in ReadCUTImage()
504 image->colormap[i].red=(Quantum) ReadBlobLSBShort(palette); in ReadCUTImage()
507 image->colormap[i].red=ClampToQuantum(((double) in ReadCUTImage()
508 image->colormap[i].red*QuantumRange+(PalHeader.MaxRed>>1))/ in ReadCUTImage()
511 image->colormap[i].green=(Quantum) ReadBlobLSBShort(palette); in ReadCUTImage()
514 image->colormap[i].green=ClampToQuantum in ReadCUTImage()
515 … (((double) image->colormap[i].green*QuantumRange+(PalHeader.MaxGreen>>1))/PalHeader.MaxGreen); in ReadCUTImage()
517 image->colormap[i].blue=(Quantum) ReadBlobLSBShort(palette); in ReadCUTImage()
520 image->colormap[i].blue=ClampToQuantum in ReadCUTImage()
521 … (((double)image->colormap[i].blue*QuantumRange+(PalHeader.MaxBlue>>1))/PalHeader.MaxBlue); in ReadCUTImage()
525 if (EOFBlob(image)) in ReadCUTImage()
535 image->colors=256; in ReadCUTImage()
536 if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) in ReadCUTImage()
542 for (i=0; i < (ssize_t)image->colors; i++) in ReadCUTImage()
544 image->colormap[i].red=ScaleCharToQuantum((unsigned char) i); in ReadCUTImage()
545 image->colormap[i].green=ScaleCharToQuantum((unsigned char) i); in ReadCUTImage()
546 image->colormap[i].blue=ScaleCharToQuantum((unsigned char) i); in ReadCUTImage()
556 offset=SeekBlob(image,6 /*sizeof(Header)*/,SEEK_SET); in ReadCUTImage()
568 EncodedByte=ReadBlobLSBShort(image); in ReadCUTImage()
573 RunCount=(unsigned char) ReadBlobByte(image); in ReadCUTImage()
589 RunValue=(unsigned char) ReadBlobByte(image); in ReadCUTImage()
593 (void) ReadBlob(image,(size_t) RunCountMasked,ptrB); in ReadCUTImage()
599 if (EOFBlob(image) != MagickFalse) goto Finish; /* wrong data: unexpected eof in line */ in ReadCUTImage()
600 RunCount=(unsigned char) ReadBlobByte(image); in ReadCUTImage()
604 InsertRow(image,depth,BImgBuff,i,exception); in ReadCUTImage()
606 (void) SyncImage(image,exception); in ReadCUTImage()
613 if ((image->storage_class == PseudoClass) && in ReadCUTImage()
614 (SetImageGray(image,exception) != MagickFalse)) in ReadCUTImage()
616 if(GetCutColors(image,exception)==2) in ReadCUTImage()
618 for (i=0; i < (ssize_t)image->colors; i++) in ReadCUTImage()
623 if(image->colormap[i].red!=sample) goto Finish; in ReadCUTImage()
624 if(image->colormap[i].green!=sample) goto Finish; in ReadCUTImage()
625 if(image->colormap[i].blue!=sample) goto Finish; in ReadCUTImage()
628 image->colormap[1].red=image->colormap[1].green= in ReadCUTImage()
629 image->colormap[1].blue=QuantumRange; in ReadCUTImage()
630 for (i=0; i < (ssize_t)image->rows; i++) in ReadCUTImage()
632 q=QueueAuthenticPixels(image,0,i,image->columns,1,exception); in ReadCUTImage()
635 for (j=0; j < (ssize_t)image->columns; j++) in ReadCUTImage()
637 if (GetPixelRed(image,q) == ScaleCharToQuantum(1)) in ReadCUTImage()
639 SetPixelRed(image,QuantumRange,q); in ReadCUTImage()
640 SetPixelGreen(image,QuantumRange,q); in ReadCUTImage()
641 SetPixelBlue(image,QuantumRange,q); in ReadCUTImage()
643 q+=GetPixelChannels(image); in ReadCUTImage()
645 if (SyncAuthenticPixels(image,exception) == MagickFalse) goto Finish; in ReadCUTImage()
658 if (EOFBlob(image) != MagickFalse) in ReadCUTImage()
660 image->filename); in ReadCUTImage()
661 (void) CloseBlob(image); in ReadCUTImage()
662 return(GetFirstImageInList(image)); in ReadCUTImage()