<cfset image =slide.getThumbNail(javacast("int" "290,230"))>
<cfset imageIO.write(image,"jpeg", ("c:\theimageFile.jpg"))> 

The problem might be in these 2 lines.  You are passing 290,230 to javacast and 
I'm not certain that will work.  Plus, the getThumbNail function was expecting 
a Dimension object which you should create.  Also, on the imageIO.write() 
function you were creating a File object as the 3rd parameter and you aren't 
here.
----------

Jake Churchill 
 Team Leader
11204 Davenport, Ste. 100
Omaha, NE  68154 
http://www.cfwebtools.com   
 402-408-3733 x103 

----------------------------------------
From: "Abigail Coker" <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2008 7:55 PM
To: CF-Talk <[email protected]>
Subject: From Java to ColdFusion, a newbie 

Hi all,

I'm a newbie to CF (2 months old).I've read up and research a lot in how to 
convert Java to CF but I seem to have hit a brick wall in converting a simple a 
5 line code of Java into CF, please see the code in Java and the attempt at 
converting it below, any help will be appreciated, thanks:
JAVA:

//Instantiate a Presentation object that represents a PPT file 
Presentation pres = new Presentation(new FileInputStream(new 
File("c:\test\test.ppt")));

//Accessing a slide using its slide position
Slide slide = pres.getSlideByPosition(1);

//Getting the thumbnail image of the slide of a specified size
BufferedImage image=slide.getThumbnail(new Dimension(290,230));

//Saving the thumbnail image in jpeg format
ImageIO.write(image,"jpeg", new File("C:\\theimagefile.jpg"));

CF:



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296875
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to