Share » Forums » Setup & design » image scaling based on larger side

image scaling based on larger side

image scaling based on larger side

Wednesday 29 August 2007 7:28:56 am - 5 replies

Author Message

Frédéric DAVID

Wednesday 29 August 2007 9:25:19 am

Hello,

you can find some response for your problem there :
http://ez.no/download/ez_publish/changelogs/ez_publish_3_3/new_image_system

# geometry/scalewidthdownonly=width- Scale image to have a width of width while maintaining aspect ratio, if the image is smaller than the given size no scaling is done
# geometry/scaleheightdownonly=height- Scale image to have a height of height while maintaining aspect ratio, if the image is smaller than the given size no scaling is done
#geometry/scaleexact=width;height - Scale image to width and height without maintaining aspect ratio

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

Marko Žmak

Wednesday 29 August 2007 10:22:13 am

No this doesn't solve my problem.

The thing that I need is to resize the loner side to the specified size, and then resize the other side according to that respecting the aspect ratio. None of these settings for image conversion can do this.
As far as I've seen there's no setting that does this.

Does someone know the sollution to this problem?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

André R.

Wednesday 29 August 2007 11:18:34 am

Won't this do the job ?

Filters[]=geometry/scaledownonly=640;640

So the largest size will be 640.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marko Žmak

Wednesday 29 August 2007 12:08:19 pm

Yes Andre this does the job. I misunderstood what geometry/scaledownonly does. I tought it will scake down both sides to that size.

But now I have another problem. I would like to scale down the SHORTER side to the specified size and resize the other side respecting the aspect ratio. For example I would like to scale down two images of unknown dimensions to have the shorter side exactly 300px.

How can I do that?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

André R.

Wednesday 29 August 2007 2:35:40 pm

Not possible to my knowledge.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu