Would it be possible to have an option to scale the image rather than just resize so that proportions are retained? Thanks.

Comments

quicksketch’s picture

I'd prefer to avoid getting into this. I thought about it as an option, but it's not what the end-user expects. They expect that an image will appear exactly the size they set, rather than have it be corrected for them. Both tinyMCE and FCKeditor "lock" the ratio when grabbing a corner of the image and have options to reset the dimensions entirely.

If you're doing this in plain HTML, you also have the option of specifying only a height or a width, and Image Resize Filter will automatically populate the other property for you on output.

damienmckenna’s picture

If it was left as an option that was only available when calling the image_resize_filter_get_images() function directly? For example, I'm using it to display images from a remote feed.

function image_resize_filter_get_images($settings, $text, $proportional=FALSE) {
// other code to be determined when I have had more sleep
}
quicksketch’s picture

Hmm, I'd consider adding it if we don't have to expose it as an end-user feature. It's literally only a 2-3 line change, since the first version of this module accidentally provided scaled images. However, it should be an option in the $settings array, that's what its for. If you write the patch I'll put it in for you.

13rac1’s picture

If you are using it with FCKeditor, you can resize the image using the diagonals. Forcing proportional could be a check box though...

quicksketch’s picture

Status: Active » Postponed

Damien, are you still interested in this? Otherwise I'll mark won't fix since it's likely to only be used by a very few developers.

damienmckenna’s picture

Nobody (other than me) noticed, and I got moved to another project. Haven't gotten back to it. I'll see if I can whip up something...

quicksketch’s picture

Status: Postponed » Closed (fixed)

Closing after lack of activity. Please reopen if you're still interested.