Lines Matching refs:crop
53 @@ -5182,17 +5182,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
55 if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER))
57 - x1 = (uint32_t) (crop->corners[i].X1 * scale * xres);
58 - x2 = (uint32_t) (crop->corners[i].X2 * scale * xres);
59 - y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres);
60 - y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres);
61 + x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres);
62 + x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres);
63 + y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres);
64 + y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres);
68 - x1 = (uint32_t) (crop->corners[i].X1);
69 - x2 = (uint32_t) (crop->corners[i].X2);
70 - y1 = (uint32_t) (crop->corners[i].Y1);
71 - y2 = (uint32_t) (crop->corners[i].Y2);
72 + x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1);
73 + x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2);
74 + y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1);
75 + y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2);
78 crop->regionlist[i].x1 = 0;
79 @@ -5255,17 +5255,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
81 if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
83 - tmargin = (uint32_t)(crop->margins[0]);
84 - lmargin = (uint32_t)(crop->margins[1]);
85 - bmargin = (uint32_t)(crop->margins[2]);
86 - rmargin = (uint32_t)(crop->margins[3]);
87 + tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]);
88 + lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]);
89 + bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]);
90 + rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]);
94 - tmargin = (uint32_t)(crop->margins[0] * scale * yres);
95 - lmargin = (uint32_t)(crop->margins[1] * scale * xres);
96 - bmargin = (uint32_t)(crop->margins[2] * scale * yres);
97 - rmargin = (uint32_t)(crop->margins[3] * scale * xres);
98 + tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres);
99 + lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres);
100 + bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres);
101 + rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres);
105 @@ -5295,24 +5295,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
106 if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
108 if (crop->crop_mode & CROP_WIDTH)
109 - width = (uint32_t)crop->width;
110 + width = _TIFFClampDoubleToUInt32(crop->width);
114 if (crop->crop_mode & CROP_LENGTH)
115 - length = (uint32_t)crop->length;
116 + length = _TIFFClampDoubleToUInt32(crop->length);
122 if (crop->crop_mode & CROP_WIDTH)
123 - width = (uint32_t)(crop->width * scale * image->xres);
124 + width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres);
128 if (crop->crop_mode & CROP_LENGTH)
129 - length = (uint32_t)(crop->length * scale * image->yres);
130 + length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres);
134 @@ -5711,13 +5711,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
152 @@ -5755,13 +5755,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
170 @@ -5770,6 +5770,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,