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 - 1))) { 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 - 1)); y++) { in gdImageCrop()
90 for (x = crop->x; x < (crop->x + (crop->width - 1)); 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()
173 crop.y = y -1; in gdImageCropAuto()
182 crop.height = height - crop.y + 1; in gdImageCropAuto()
184 crop.height = y - crop.y + 2; in gdImageCropAuto()
189 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropAuto()
193 crop.x = x - 1; in gdImageCropAuto()
197 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropAuto()
201 crop.width = x - crop.x + 2; in gdImageCropAuto()
202 if (crop.x <= 0 || crop.y <= 0 || crop.width <= 0 || crop.height <= 0) { in gdImageCropAuto()
205 return gdImageCrop(im, &crop); in gdImageCropAuto()
234 gdRect crop; in gdImageCropThreshold() local
236 crop.x = 0; in gdImageCropThreshold()
237 crop.y = 0; in gdImageCropThreshold()
238 crop.width = 0; in gdImageCropThreshold()
239 crop.height = 0; in gdImageCropThreshold()
265 crop.y = y -1; in gdImageCropThreshold()
274 crop.height = height - crop.y + 1; in gdImageCropThreshold()
276 crop.height = y - crop.y + 2; in gdImageCropThreshold()
281 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropThreshold()
285 crop.x = x - 1; in gdImageCropThreshold()
289 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropThreshold()
293 crop.width = x - crop.x + 2; in gdImageCropThreshold()
295 return gdImageCrop(im, &crop); in gdImageCropThreshold()