You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Eric DE MAULDE <er...@free.fr> on 2009/01/12 11:41:34 UTC

scale images : general class to filter a xml tree (xml file)

Hi,

I create a XML file to set images dimensions (height, width) related to their sizes (small, medium, large) by Web site
The target is to scale (... add a logo) from a saved detail image (if the asked size file doesn't exist).

My solution : 

ImageProperties.xml    <--  Image.class (scale detail image and create the image file if need be - doesn't exist with the rigth height or width)    <--    Screen (call a product image)  --> display the related image

Does it exist a general java class to filter a XM file  ?
Or do you know a better solution ?

Thanks

Eric 

Re: scale images : general class to filter a xml tree (xml file)

Posted by madppiper <pa...@mutschler.ch>.
I have done something similar in my app and used the Jakarta Image-Taglib for
it (which is based on the Poor Mans Image Wrapper, btw -> a great tool). It
isn't a pretty solution however, since I had to work around to call a jsp
(so that i could use the taglib) file from a service that would then create
the scaled images and store them on the server... I would only run the
service when I add new products and create all sizes I would need once. 

I would argue that perhaps it is easiest, if we would add a new ImagingUtil
class to the project which is based on the Poor Mans Image Wrapper
(http://www.mullassery.com/software/PMIW/index.jsp) and allows instant image
resizing... 
-- 
View this message in context: http://www.nabble.com/scale-images-%3A-general-class-to-filter-a-xml-tree-%28xml-file%29-tp21412075p21432642.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: scale images : general class to filter a xml tree (xml file)

Posted by Bruno Busco <br...@gmail.com>.
In the old thread, if I well remember, you should also find a
reference so a java library to use.

2009/1/12 Bruno Busco <br...@gmail.com>:
> Hi Eric,
> I like this approach and, some time ago, I started a discussion on the
> ML about this.
> http://www.mail-archive.com/user@ofbiz.apache.org/msg11586.html
>
> The item is still on my todo list.
> The dynamic image scale with cache is something I find really
> interesting to add to OFBiz.
>
> I used with drupal this component http://drupal.org/project/imagecache
> that does the same thing and could be used, may be, as a reference.
>
> -Bruno
>
> 2009/1/12 Eric DE MAULDE <er...@free.fr>:
>> Hi,
>>
>> I create a XML file to set images dimensions (height, width) related to their sizes (small, medium, large) by Web site
>> The target is to scale (... add a logo) from a saved detail image (if the asked size file doesn't exist).
>>
>> My solution :
>>
>> ImageProperties.xml    <--  Image.class (scale detail image and create the image file if need be - doesn't exist with the rigth height or width)    <--    Screen (call a product image)  --> display the related image
>>
>> Does it exist a general java class to filter a XM file  ?
>> Or do you know a better solution ?
>>
>> Thanks
>>
>> Eric
>

Re: scale images : general class to filter a xml tree (xml file)

Posted by Bruno Busco <br...@gmail.com>.
Hi Eric,
I like this approach and, some time ago, I started a discussion on the
ML about this.
http://www.mail-archive.com/user@ofbiz.apache.org/msg11586.html

The item is still on my todo list.
The dynamic image scale with cache is something I find really
interesting to add to OFBiz.

I used with drupal this component http://drupal.org/project/imagecache
that does the same thing and could be used, may be, as a reference.

-Bruno

2009/1/12 Eric DE MAULDE <er...@free.fr>:
> Hi,
>
> I create a XML file to set images dimensions (height, width) related to their sizes (small, medium, large) by Web site
> The target is to scale (... add a logo) from a saved detail image (if the asked size file doesn't exist).
>
> My solution :
>
> ImageProperties.xml    <--  Image.class (scale detail image and create the image file if need be - doesn't exist with the rigth height or width)    <--    Screen (call a product image)  --> display the related image
>
> Does it exist a general java class to filter a XM file  ?
> Or do you know a better solution ?
>
> Thanks
>
> Eric