scale an image to fit inside width and height without cropping

4 views
Skip to first unread message

Scott

unread,
Aug 3, 2010, 4:53:03 PM8/3/10
to apostrophenow
Maybe I'm missing something, but I can't figure out how to set up an
image (or button) slot so that the images will be scaled to fit inside
a width and height, but not scaled out of proportion.

If I use the following options, my images are getting skewed:

'aButton' => array('width' => 106, 'height' => 60, 'flexHeight' =>
false, 'resizeType' => 's')

If I change flexHeight to true, as mentioned in the docs the height
parameter is ignored, so I end up with images that are too tall:

'aButton' => array('width' => 106, 'height' => 60, 'flexHeight' =>
true, 'resizeType' => 's')

Finally, if I change the resizeType to 'c' it crops my images, which
isn't want I'm looking for.

If this doesn't exist I suppose the right way to go about it is to
override the view for the slot (in my case it's a button slot) and
calculate my own dimensions to use in the embed code.

Many thanks...
Scott


Tom Boutell

unread,
Aug 3, 2010, 11:15:33 PM8/3/10
to apostr...@googlegroups.com
Hmm, images aren't supposed to be skewed in this situation. Are you
using gd, or do you have the netpbm utilities available?

--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Reply all
Reply to author
Forward
0 new messages