I need to warm this thread up again - I am soooo close...

As explained before I was able to use the .NET Bitmap's save method to save an 
image:

<cfobject type=".NET" name="presentation" class="Aspose.Slides.Presentation" 
assembly="#slidesDLL#">
<cfset presentation.init("#Expandpath('./')#ppt\test2.ppt")>
<cfset slide = presentation.GetSlideByPosition(1)>
<cfset img = slide.GetThumbnail(1,1)>
<cfset i = img.Save("#Expandpath('./')#ppt\myfile.jpg")>

The resulting image appears to be a valid JPG image. I say appears because the 
CFIMAGE tag falls over if I try to read it back into CF. 

<cfimage action = "info" source = "#Expandpath('./')#ppt\myfile.jpg" structname 
= "objImage">
Error:
ColdFusion was unable to create an image from the specified source file.
Ensure that the file is a valid image file. 


So I thought ok, let's try and pass an Imageformat to the Bitmap's save method. 
http://msdn.microsoft.com/en-us/library/aa903826%28v=VS.71%29.aspx

I can do this:
<cfobject type=".NET" name="imageformat" 
class="System.Drawing.Imaging.ImageFormat" 
assembly="C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" >
<cfset v = imageformat.Get_Jpeg()>

But if I then try to pass that to the Save method it errors again:
The Save method was not found.
Either there are no methods with the specified method name and argument types 
or the Save method is overloaded with argument types that ColdFusion cannot 
decipher reliably. ColdFusion found 0 methods that match the provided arguments.


I'm banging my head now. I also tried imageformat.Jpeg
but no dice.
Element JPEG is undefined in IMAGEFORMAT. 


Any tips appreciated.

Stefan




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338937
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to