meghlal / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Coordinate Crop incorporated #197

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've incorporated coordinate cropping for those that might find it useful.    

Based on code downloaded 6-13-11.  

for use with exact positioning crop....
x1 = top-left X position (pixels from left side)
y1 = top-left Y position (pixels from top)
x2 = bottom-right X position (pixels from left side)
y2 = bottom-right Y position (pixels from top)
maxw = maximum pixel width of image, will extend beyond current rez if ups = 
TRUE
maxh = maximum pixel height of image, will extend beyond current rez if ups = 
TRUE
ups = TRUE to upscale cropped image beyond current resolution

Examples

Coordinate Crop
timthumb.php?src=myimage.jpg&x1=44&x2=256&y1=45&y2=245

CoordCrop w-Resize (resize remains proportional based on region defined by 
coordinates)
resize up to full resolution of original image, limit 500px
timthumb.php?src=myimage.jpg&x1=44&x2=256&y1=45&y2=245&maxw=500&maxh=500
resize beyond full resolution of original image
timthumb.php?src=myimage.jpg&x1=44&x2=256&y1=45&y2=245&maxw=500&maxh=500&ups=TRU
E

Original issue reported on code.google.com by j...@mywebit.com on 13 Jun 2011 at 7:55

Attachments:

GoogleCodeExporter commented 9 years ago
The code is now completely rewritten. Check the new code out, incorporate this 
and post it here and I'll review. Thanks.

Original comment by mmaun...@gmail.com on 7 Aug 2011 at 1:35