Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D346211ECE for ; Thu, 25 Sep 2014 08:32:39 +0000 (UTC) Received: (qmail 73467 invoked by uid 500); 25 Sep 2014 08:32:36 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 73408 invoked by uid 500); 25 Sep 2014 08:32:36 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 73398 invoked by uid 99); 25 Sep 2014 08:32:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2014 08:32:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.138.103.87] (HELO didmemail.default.peterdsparkes.uk0.bigv.io) (213.138.103.87) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2014 08:32:09 +0000 Received: from host86-158-102-153.range86-158.btcentralplus.com ([86.158.102.153] helo=[192.168.1.64]) by didmemail.default.peterdsparkes.uk0.bigv.io with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XX4TA-000078-0y for users@cocoon.apache.org; Thu, 25 Sep 2014 09:32:08 +0100 Message-ID: <5423D30A.3000002@didm.co.uk> Date: Thu, 25 Sep 2014 09:32:10 +0100 From: Peter Sparkes Reply-To: peter@didm.co.uk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Resizing images using imgscalr References: <541AE182.4040203@didm.co.uk> <5422C79F.2060601@apache.org> In-Reply-To: <5422C79F.2060601@apache.org> Content-Type: multipart/alternative; boundary="------------090602060002000001060505" X-Virus-Checked: Checked by ClamAV on apache.org --------------090602060002000001060505 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi The importClass(Packages.problem has been fixed. I now get the following error org.mozilla.javascript.EvaluatorException: "file:///usr/share/tomcat7/instances/chinese-dev/webapps/ROOT/office/flow/upload_example.js", line 103: Can't find method org.imgscalr.Scalr.resize(java.awt.image.BufferedImage,java.lang.Integer). The problem I have is that I am not a java programmer Regards Petere On 24/09/2014 14:31, Thorsten Scherler 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 > codeBusters S.L. - web based systems > > http://www.codebusters.es/ --------------090602060002000001060505 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
Hi

The importClass(Packages.problem has been fixed.

I now get the following error

org.mozilla.javascript.EvaluatorException: "file:///usr/share/tomcat7/instances/chinese-dev/webapps/ROOT/office/flow/upload_example.js", line 103: Can't find method org.imgscalr.Scalr.resize(java.awt.image.BufferedImage,java.lang.Integer).

The problem I have is that I am not a java programmer

Regards

Petere


On 24/09/2014 14:31, Thorsten Scherler 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/

--------------090602060002000001060505--