Posted by
Joe Eckard on
URL: http://ofbiz.116.s1.nabble.com/Multiple-images-and-thumbnail-images-tp139304p139322.html
We have an ofbiz service that handles this scenario. Once a day it
sweeps an incoming directory for image files (these are the largest,
aka detail, images), and creates the appropriate thumbnails. It also
does a few other things, like removing the product from certain
internal categories, and adding it to other internal categories. Our
naming scheme and the functionality is rather specific to our setup,
but the resize code itself is trivial. We used Jimi
(
http://java.sun.com/products/jimi/), and a resize to 350x350 would
look something like this:
Image image = Jimi.getImage(incomingFilename);
Image resizedImage = image.getScaledInstance(350, 350,
Image.SCALE_SMOOTH);
Jimi.putImage(resizedImage, outgoingFilename);
something interesting we discovered... simply processing the detail
image file (reading, then writing it out with no resize) reduces the
file size significantly. Also, the resized image quality is quite good.
-Joe
On May 18, 2006, at 8:59 AM, Daniel Kunkel wrote:
> Hi
>
> One solution is to pre-process the pictures into different sizes. This
> is good because it avoids server processing, and easy because it can be
> run as a shell script, but does involve creating 3 more files for every
> picture.
>
> For the shell script I used ImageMagick, a great open source
> commandline
> utility for processing graphics.
>
> I just wrote a linux shell script to resize the pictures.
>
> Good luck
>
> Daniel
>
>
> On Thu, 2006-05-18 at 05:48 -0700, rohit2006 wrote:
>> hi,
>>
>> Ofbiz provides great flexibility when it allows one to be able to
>> upload
>> upto 4 images of different size for a product. But many like me have
>> one
>> single big image of a product which can be used for all small,
>> medium, large
>> and detail images. As of now one would have to create 3 additional
>> image
>> from the images, which is very tiring, can it not be possible for the
>> system
>> to automatically generate smaller images from the large image if the
>> smaller
>> ones are not present (currently it show no image).
>>
>> The bigger image may be served as small images also, but it prolongs
>> the
>> page loading time and the image is not appealing at all.
>>
>> Any suggestions or ideas of how it can be done are welcome.
>>
>> rohit
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/Multiple-images-and-thumbnail-images-
>> t1642877.html#a4449827
>> Sent from the OFBiz - User forum at Nabble.com.
>>
>>
>> _______________________________________________
>> Users mailing list
>>
[hidden email]
>>
http://lists.ofbiz.org/mailman/listinfo/users> --
> Daniel
>
> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-
> Have a GREAT Day!
>
> Daniel Kunkel
[hidden email]
> BioWaves, LLC
http://www.BioWaves.com> 14150 NE 20th St. Suite F1
> Bellevue, WA 98007
> 800-734-3588 425-895-0050
>
http://www.Apartment-Pets.com http://www.Focus-Illusion.com>
http://www.Brain-Fun.com http://www.ColorGlasses.com> *-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-
>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users