Home | History | Annotate | Download | only in test

Lines Matching full:srcpitch

88 	int srcpitch, unsigned char *dstbuf, enum BMPPIXELFORMAT dstformat, int dstpitch,
94 srcptr=flip? &srcbuf[srcpitch*(h-1)]:srcbuf;
96 srcptr+=flip? -srcpitch:srcpitch, dstptr+=dstpitch)
178 int fd=-1, bytesread, srcpitch, srcbottomup=1, srcps, dstpitch,
248 srcpitch=(((*w)*srcps)+3)&(~3);
251 if(srcpitch*(*h)+bh.bfOffBits!=bh.bfSize) _throw("Corrupt bitmap header");
252 if((tempbuf=(unsigned char *)malloc(srcpitch*(*h)))==NULL
257 _unix(bytesread=read(fd, tempbuf, srcpitch*(*h)));
258 if(bytesread!=srcpitch*(*h)) _throw("Read error");
260 pixelconvert(tempbuf, BMP_BGR, srcpitch, *buf, f, dstpitch, *w, *h,
274 enum BMPPIXELFORMAT f, int srcpitch, int srcbottomup)
287 pixelconvert(buf, f, srcpitch, tempbuf, BMP_RGB, w*3, w, h,
299 enum BMPPIXELFORMAT f, int srcpitch, int srcbottomup)
311 if(!filename || !buf || w<1 || h<1 || f<0 || f>BMPPIXELFORMATS-1 || srcpitch<0)
314 if(srcpitch==0) srcpitch=w*ps[f];
319 return saveppm(filename, buf, w, h, f, srcpitch, srcbottomup);
374 pixelconvert(buf, f, srcpitch, tempbuf, BMP_BGR, dstpitch, w, h,