Coordinate crop and square features added to version 2.8.10 of timthumb. Does
not affect existing features. Code attached.
Usage:
// provide x1/y1 and x2/y2 for cropped square
// resulting image will be exact size of cropped portion of image
?src=your_img_path&x1=1&y1=30&x2=150&y2=240
// use w= or h= to reduce or enlarge resulting cropped square
?src=your_img_path&x1=1&y1=30&x2=150&y2=240&w=75
?src=your_img_path&x1=1&y1=30&x2=150&y2=240&h=100
// force image (or cropped area) to square
// square size is set to shortest side, or smallest MAX measurement
?src=your_img_path&sq=1
I'm hoping this provides some useful functionality that some people might be
looking for, and can be retained in future builds.
Original issue reported on code.google.com by j...@mywebit.com on 26 Apr 2012 at 2:15
Original issue reported on code.google.com by
j...@mywebit.com
on 26 Apr 2012 at 2:15Attachments: