So this might not all seem like one feature request, but it accomplishes at least the primary goal I intended. Imagecache needs a way to create square thumbnails automatically from either landscape or portrait style images. To accomplish this goal, this patch implements the following features:

- Two options on image scale: Inside dimensions and Outside dimensions. Inside (default behavior) causes the image to fit within both width and height. Outside dimensions causes the resulting image to be outside the given width and height. The latter provides a starting point for creating a square image.

- Keyword support: Now instead of only having x and y offsets in pixels, you may also specify keywords such as 'center', 'bottom', 'right', etc. This allows you to crop an image centered left to right and top to bottom.

- Percentage support: Kindof a "while you're at it" feature. Since filtering is now done on preset values, I also added support for percentages, so you can scale 50% or whatever.

Here's the 4.7 branch patch.

Comments

quicksketch’s picture

StatusFileSize
new6.27 KB

5.0 branch patch.

dopry’s picture

Status: Needs review » Fixed

Yo.... thats the ill boy! You're committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)