Lines Matching refs:crop

43 gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)  in gdImageCrop()  argument
50 dst = gdImageCreateTrueColor(crop->width, crop->height); in gdImageCrop()
56 dst = gdImageCreate(crop->width, crop->height); in gdImageCrop()
65 if (crop->x < 0 || crop->x>=src->sx || crop->y<0 || crop->y>=src->sy) { in gdImageCrop()
70 if ((src->sx - crop->width) < crop->x) { in gdImageCrop()
71 crop->width = src->sx - crop->x; in gdImageCrop()
73 if ((src->sy - crop->height) < crop->y) { in gdImageCrop()
74 crop->height = src->sy - crop->y; in gdImageCrop()
78 …>x: %i\nrect->y: %i\nrect->width: %i\nrect->height: %i\n", crop->x, crop->y, crop->width, crop->he… in gdImageCrop()
80 y = crop->y; in gdImageCrop()
83 while (y < (crop->y + crop->height)) { in gdImageCrop()
85 memcpy(dst->tpixels[dst_y++], src->tpixels[y++] + crop->x, crop->width * 4); in gdImageCrop()
89 for (y = crop->y; y < (crop->y + crop->height); y++) { in gdImageCrop()
90 for (x = crop->x; x < (crop->x + crop->width); x++) { in gdImageCrop()
91 dst->pixels[y - crop->y][x - crop->x] = src->pixels[y][x]; in gdImageCrop()
121 gdRect crop; in gdImageCropAuto() local
123 crop.x = 0; in gdImageCropAuto()
124 crop.y = 0; in gdImageCropAuto()
125 crop.width = 0; in gdImageCropAuto()
126 crop.height = 0; in gdImageCropAuto()
171 crop.y = y - 1; in gdImageCropAuto()
179 crop.height = y - crop.y + 2; in gdImageCropAuto()
183 for (y = 0; match && y < crop.y + crop.height; y++) { in gdImageCropAuto()
187 crop.x = x - 1; in gdImageCropAuto()
191 for (y = 0; match && y < crop.y + crop.height; y++) { in gdImageCropAuto()
195 crop.width = x - crop.x + 2; in gdImageCropAuto()
197 if (crop.x < 0 || crop.y < 0 || crop.width <= 0 || crop.height <= 0) { in gdImageCropAuto()
200 return gdImageCrop(im, &crop); in gdImageCropAuto()
229 gdRect crop; in gdImageCropThreshold() local
231 crop.x = 0; in gdImageCropThreshold()
232 crop.y = 0; in gdImageCropThreshold()
233 crop.width = 0; in gdImageCropThreshold()
234 crop.height = 0; in gdImageCropThreshold()
261 crop.y = y - 1; in gdImageCropThreshold()
269 crop.height = y - crop.y + 2; in gdImageCropThreshold()
273 for (y = 0; match && y < crop.y + crop.height; y++) { in gdImageCropThreshold()
277 crop.x = x - 1; in gdImageCropThreshold()
281 for (y = 0; match && y < crop.y + crop.height; y++) { in gdImageCropThreshold()
285 crop.width = x - crop.x + 2; in gdImageCropThreshold()
287 return gdImageCrop(im, &crop); in gdImageCropThreshold()