cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandor Szatmari <admin.szatmari....@gmail.com>
Subject Re: Resizing images using imgscalr
Date Wed, 24 Sep 2014 15:18:16 GMT
Yes, I would second my own recommendation for using JAI.  It works great for this.  I store
large TIFF images in Postgres as blobs and scale them on the fly based on the HTTP request
params.  I have fixed sizes, like thumbnail, and info, but also support support arbitrary
sizes.  Only specify x, or y and the scaling is proportional.

Sandor Szatmari

> On Sep 24, 2014, at 09:31, Thorsten Scherler <thorsten@apache.org> wrote:
> 
>> On 18/09/14 15:43, Peter Sparkes wrote:
>> Hi,
>> 
>> Cocoon 2.1.12
>> 
>>  I use the following javascript ( Text in Black )with the Cocoon "Upload widget"
uploading images to the upload-dir and then move them to the "lodgeimage300px" directory.
This works
>> 
>> I now want to scale the images using imgscalr , http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/#source
>> 
>> I, therefore, added the code in red
>> 
>> The BufferedImage   in BufferedImage scaledImage =Scalr.resize(file, 200); gave me
a syntax error.
>> 
>> On removing  BufferedImage   I get the following error "Scalr" is not defined
>> 
>> Can anyone help me Please
>> 
>> Peter
>> 
>> importClass(Packages.java.io.File);
>> importClass(Packages.java.io.FileOutputStream);
>> importClass(Packages.java.io.FileNotFoundException);
>> 
>> importClass(org.imgscalr.Scalr);
> 
> This does not have the "importClass(Packages." prefix that explains why later this class
is not defiened. However I personally would solve that with java.
> 
> salu2
> -- 
> Thorsten Scherler <thorsten.at.apache.org>
> codeBusters S.L. - web based systems
> <consulting, training and solutions>
> http://www.codebusters.es/

Mime
View raw message