Maybe it's how you're doing the convert?  I'm taking the uploaded gif and
resizing it and saving it as a jpg and it works fine.  Try doing that.  

Russ

> -----Original Message-----
> From: Jake Churchill [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 16, 2006 12:22 PM
> To: CF-Talk
> Subject: image.cfc convert issue
> 
> I'm having an issue with .gif images and the image.cfc component.  I
> have an application that has to be able to dynamically resize images and
> now it has to handle .gif images.  I can read them fine but cannot write
> them.  So I'm attempting to use the convert function built in to convert
> the image from a .gif to .jpg, then do the resize.  I get it
> successfully converted and saved back to the directory under the same
> name, just different extension.  Then I update my database with the new
> image.  Then I start the resize and get the error that I copied below.
> Any ideas as to why this is happening or any suggestions to help me
> accomplish the same thing without finding a completely new image tool
> and having to recode a bunch of stuff?
> 
> 
>   Object Instantiation Exception.
> 
> An exception occurred when instantiating a java object. The cause of
> this exception was that: .
> 
> The error occurred in *D:\websites\ChridGIS\com\image.cfc: line 223*
> *Called from* D:\websites\ChridGIS\toolkit\display\dspPropDetails.cfm:
> line 329
> *Called from* D:\websites\ChridGIS\toolkit\display\dspDetails.cfm: line
> 250
> *Called from* D:\websites\ChridGIS\toolkit\display\dspDetails.cfm: line 1
> *Called from* D:\websites\ChridGIS\toolkit\resourceSearch.cfm: line 42
> *Called from* D:\websites\ChridGIS\toolkit\Application.cfc: line 113
> *Called from* D:\websites\ChridGIS\com\image.cfc: line 223
> *Called from* D:\websites\ChridGIS\toolkit\display\dspPropDetails.cfm:
> line 329
> *Called from* D:\websites\ChridGIS\toolkit\display\dspDetails.cfm: line
> 250
> *Called from* D:\websites\ChridGIS\toolkit\display\dspDetails.cfm: line 1
> *Called from* D:\websites\ChridGIS\toolkit\resourceSearch.cfm: line 42
> *Called from* D:\websites\ChridGIS\toolkit\Application.cfc: line 113
> 
> 221 :                         return retVal;
> 222 :                 }
> *223 :
>       resizedImage.init(javacast("int",w),javacast("int",h),img.getType())
> ;*
> 224 :
> 225 :                 w = w / img.getWidth();
> 
> 
> ------------------------------------------------------------------------
> Resources:
> 
>     * Check the ColdFusion documentation
>       <http://www.macromedia.com/go/proddoc_getdoc> to verify that you
>       are using the correct syntax.
>     * Search the Knowledge Base
>       <http://www.macromedia.com/support/coldfusion/> to find a solution
>       to your problem.
> 
> Browser       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
> CLR 1.1.4322; .NET CLR 2.0.50727)
> Remote Address        10.0.0.87
> Referrer
> Date/Time     16-Oct-06 10:43 AM
> 
> Stack Trace (click to expand) <javascript:;>
> at
> cfimage2ecfc740018796$funcRESIZE.runFunction(D:\websites\ChridGIS\com\imag
> e.cfc:223)
> at
> cfdspPropDetails2ecfm611613558.runPage(D:\websites\ChridGIS\toolkit\displa
> y\dspPropDetails.cfm:329)
> at
> cfdspDetails2ecfm1198259780._factor6(D:\websites\ChridGIS\toolkit\display\
> dspDetails.cfm:250)
> at
> cfdspDetails2ecfm1198259780.runPage(D:\websites\ChridGIS\toolkit\display\d
> spDetails.cfm:1)
> at
> cfresourceSearch2ecfm1520973003.runPage(D:\websites\ChridGIS\toolkit\resou
> rceSearch.cfm:42)
> at
> cfApplication2ecfc1806409534$funcONREQUEST.runFunction(D:\websites\ChridGI
> S\toolkit\Application.cfc:113)
> at
> cfimage2ecfc740018796$funcRESIZE.runFunction(D:\websites\ChridGIS\com\imag
> e.cfc:223)
> at
> cfdspPropDetails2ecfm611613558.runPage(D:\websites\ChridGIS\toolkit\displa
> y\dspPropDetails.cfm:329)
> at
> cfdspDetails2ecfm1198259780._factor6(D:\websites\ChridGIS\toolkit\display\
> dspDetails.cfm:250)
> at
> cfdspDetails2ecfm1198259780.runPage(D:\websites\ChridGIS\toolkit\display\d
> spDetails.cfm:1)
> at
> cfresourceSearch2ecfm1520973003.runPage(D:\websites\ChridGIS\toolkit\resou
> rceSearch.cfm:42)
> at
> cfApplication2ecfc1806409534$funcONREQUEST.runFunction(D:\websites\ChridGI
> S\toolkit\Application.cfc:113)
> 
> 
> java.lang.reflect.InvocationTargetException
>       at sun.reflect.GeneratedConstructorAccessor809.newInstance(Unknown
> Source)
>       at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstr
> uctorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>       at
> coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:128)
>       at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:56)
>       at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
>       at
> cfimage2ecfc740018796$funcRESIZE.runFunction(D:\websites\ChridGIS\com\imag
> e.cfc:223)
>       at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
>       at
> coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
>       at
> coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.jav
> a:254)
>       at
> coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56
> )
>       at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
>       at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
>       at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
>       at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
>       at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
>       at
> cfdspPropDetails2ecfm611613558.runPage(D:\websites\ChridGIS\toolkit\displa
> y\dspPropDetails.cfm:329)
>       at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
>       at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
>       at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
>       at
> cfdspDetails2ecfm1198259780._factor6(D:\websites\ChridGIS\toolkit\display\
> dspDetails.cfm:250)
>       at
> cfdspDetails2ecfm1198259780.runPage(D:\websites\ChridGIS\toolkit\display\d
> spDetails.cfm:1)
>       at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
>       at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
>       at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
>       at
> cfresourceSearch2ecfm1520973003.runPage(D:\websites\ChridGIS\toolkit\resou
> rceSearch.cfm:42)
>       at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
>       at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
>       at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
>       at
> cfApplication2ecfc1806409534$funcONREQUEST.runFunction(D:\websites\ChridGI
> S\toolkit\Application.cfc:113)
>       at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
>       at
> coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.jav
> a:254)
>       at
> coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56
> )
>       at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
>       at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
>       at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
>       at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
>       at
> coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:72)
>       at
> coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:178)
>       at
> coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:215)
>       at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
>       at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
>       at
> coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
>       at
> coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersisten
> ceFilter.java:28)
>       at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
>       at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
>       at
> coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
>       at
> coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:
> 115)
>       at coldfusion.CfmServlet.service(CfmServlet.java:107)
>       at
> coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
>       at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
>       at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
>       at
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
>       at
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
>       at
> jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:20
> 4)
>       at
> jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.jav
> a:318)
>       at
> jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:4
> 26)
>       at
> jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:
> 264)
>       at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> Caused by: java.lang.IllegalArgumentException: Unknown image type 0
>       at java.awt.image.BufferedImage.<init>(BufferedImage.java:428)
>       ... 59 more
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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

Reply via email to