This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Image Aliases.. trouble with filters
expandshrink

Image Aliases.. trouble with filters

Image Aliases.. trouble with filters

Thursday 06 December 2012 3:44:18 pm - 3 replies

Hello everybody,

I want to add a new alias for my pictures (i'm still in 2012.5), who scales the image to the widthsize specified, but maintaining the aspect ratio. So I put in image.ini this alias :

[my_picture_fullscreen]
Reference=reference
Filters[]
Filters[]=geometry/scaledownonly=2000;2000

I've tested this with an image (3202, 3055). I had expected a image with a width or a height of 2000px, but no... the dimensions of the image are now 600*572 ...

Has anybody a solution ? Thank you !

Paul

Thursday 06 December 2012 5:11:22 pm

If your image is smaller than the expected size you should not use scaledownonly filter but scale :

[my_picture_fullscreen]
Reference=reference
Filters[]
Filters[]=geometry/scale=2000;2000

Maybe is it a cache problem...

Do you have cleared the cache (INI and data) ?

Modified on Thursday 06 December 2012 5:12:30 pm by Damien MARTIN

Thursday 06 December 2012 7:46:29 pm

Hi Damien,

My original image is bigger than the image I want ( 3202 x 3055 ). If I use the "scale" filter instead of the "scaledownonly", the smaller pictures (ex. 100 x 100 ) will be resized too ( 2000 x 2000 ) and I don't want. I just want my orginal image became 2000 x 1894 (by maintening the aspect ratio) but it does'nt work...

And I spent all my day to clear all the cache... blunk.gif Emoticon

There is something I don't understand here... !

Paul

Monday 17 December 2012 3:38:02 pm

Ok I've found where was the problem ! It was simply but... i didn't noticed !

As I said, I've put in my image.ini :

[my_picture_fullscreen]
Reference=reference
Filters[]
Filters[]=geometry/scaledownonly=2000;2000

In fact the filters are applied on the alias 'reference' of the image, and not on the original one. And I my configuration ( eZPublish 2012.5 : /settings/images.ini ), the reference alias is defined by :

[reference]
Filters[]
Filters[]=geometry/scaledownonly=600;600

So... it was normal with the scaledownonly filter that my image could not be resized. The solution is to not take an reference image to apply the filter (or a biggest one) in my /settings/override/image.ini.append.php

[my_picture_fullscreen]
Filters[]
Filters[]=geometry/scaledownonly=2000;2000

Hope it can help others blunk.gif Emoticon

Paul

Modified on Monday 17 December 2012 3:41:35 pm by Paul FROMAGE

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from