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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Eric DE MAULDE
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
Reply | Threaded
Open this post in threaded view
|

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

Bruno Busco
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@.../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 <[hidden email]>:

> 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
Reply | Threaded
Open this post in threaded view
|

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

Bruno Busco
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 <[hidden email]>:

> 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@.../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 <[hidden email]>:
>> 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
>
Reply | Threaded
Open this post in threaded view
|

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

madppiper-2
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...