Closed (fixed)
Project:
ImageCache
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Oct 2006 at 20:23 UTC
Updated:
13 Dec 2006 at 08:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchThis functionality already exists. Use 'scale' instead of resize and only specify one parameter.
Comment #2
alanburke commentedOk The suggestion of scaling on one size doesn't work for me..
But I did spy a workaround.
Imagcache scale will scale such that the lower value of height or width is respected.
SO...to scale to a standard width of say 300px, set scale width to 300px, but set height to something very high, eg 3000.
[Unless you have images that are VERY high and thin, this should work]
I'd be interested to see whether this works for you.
Regards
Alan
Comment #3
suit4 commentedVery cool, this is, what I was looking for.
This is some kind of hidden functionality. THat shoul be mentioned as a helping text or so, or implemented as a real feature.
E.g. if someone leaves the height field empty in scale or resize, that the other values is sent to the scale function.
And: I agree, image cache is very usefull.
Comment #4
scroogie commentedComment #5
fangius commentedWithout your workaround passing only one parameter still barfs with latest version imagecache-HEAD.tar.gz dated November 11, 2006 - 09:14.
Should really work as #3 suggested (intuitive).
Your workaround is still holding. Nice find!
Comment #6
quicksketchI'm working on implementing this functionality today (resize on one dimension, the other not required).
Comment #7
quicksketchComment #8
quicksketchThis patch simply passes in ridiculously high values to the scale function if height or width are not defined, allowing image_scale to use the smaller (defined value). Patch should apply to 4-7, 5, and HEAD branches.
Comment #9
dopry commentedI applies it to all 3 branches... Hopefully it works. ;).
Comment #10
(not verified) commented