Share » Forums » Developer » convert an image with filters in a...

convert an image with filters in a php script

convert an image with filters in a php script

Thursday 23 June 2011 8:11:35 am - 4 replies

Author Message

Carlos Revillo

Thursday 23 June 2011 9:21:08 am

hi Jerome.

Maybe you can try something like this

$image_alias_handler = new eZImageAliasHandler( $data['image'] );
$alias = $image_alias_handler->imageAlias( 'youralias' );

Being $data['image'] your image attribute.

Jerome Despatis

Thursday 23 June 2011 9:39:19 am

Thanks Carlos, but I don't understand well

You're speaking about imageAlias and so on, so you imagine I have an object and I want to process a new alias ?

That's not my case, I have indeed a foobar.png, and I'd like to apply to it some filters from image.ini, in order to have a foobar-converted.png.

I have no object at that step

Jerome Despatis

Thursday 23 June 2011 12:07:43 pm

$img = eZImageManager::instance();
$img->readINISettings();
$destinationMimeData = "/tmp";
$img->convert( $input, $destinationMimeData, "aliasname" );

Life is so easy with eZ :)

Nicolas Pastorino

Thursday 23 June 2011 12:35:26 pm

Life is so easy with eZ :)

Quote of the day !

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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

36 542 Users on board!

Forums menu