cfimage: jpg that is really a gif

2009-11-17 Thread morchella
ok how do i catch this?? i have old data and images that where .uploaded. some one did a bunch of gif's but named them jpg. so i am using cfimage to display width and hieght. but it pucks when it trys to read the jpg.. cfoutput query=getPonyLogo cfif LEN(TRIM(#pony_logo#)) cfset iTempDir =

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Leigh
ok how do i catch this?? i have old data and images that where .uploaded. some one did a bunch of gif's but named them jpg. Not the best option, but you could try and read the image header in the first few bytes. If it is really a gif, it should start with GIF87a, GIF89a, etcetera

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Paul Ihrig
what i dont get is why dosnt cfimage read the header of the file. and not first look at the extension? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Peter Boughton
Not the best option What's a better option then? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive:

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Leigh
I do not know. On the one hand it would be nice if it could guess a bit better. But on the other, these images are obviously malformed/misnamed. So I guess you have to work around it. Another option might be to do a try/catch. Inside the catch, try and read in the image as binary instead:

Re: cfimage: jpg that is really a gif

2009-11-17 Thread morchella
thanks guys.. i seems we just need to reformat the images. and fix info in db.. then catch any crud on upload. On Tue, Nov 17, 2009 at 11:41 AM, Leigh cfsearch...@yahoo.com wrote: I do not know. On the one hand it would be nice if it could guess a bit better. But on the other, these images

Re: cfimage: jpg that is really a gif

2009-11-17 Thread C S
Not the best option What's a better option then? I think it depends on what they actually need to do with the image. If they just need to display it, reading the header bytes seems a bit awkward. So something more dynamic would be better. (I posted one option in another response)

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Jason Fisher
Could it be that they are coded as CYMK images? It's a jpeg format that browsers and Adobe's ColdFusion Image engine cannot handle. Save them back out as RGB (the web version vs the print version) and you may be all right.

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Leigh
Could it be that they are coded as CYMK images? Good thought. That would certainly make more sense than someone saving a .gif as a .jpg ~| Want to reach the ColdFusion community with something they want? Let them

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Paul Ihrig
Guys it's a .jpg but when I get info in ff it says it's a gif. When I renamed it to gif cfomage worked just fine. I am only using it to out put width and height and to warn users if over x y it will blow out a div. Then using cffile for existance and file size. It's just old unscoped input of bad

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Paul Ihrig
I didn't see a response. On Tuesday, November 17, 2009, C S cfsearch...@yahoo.com wrote: Not the best option What's a better option then? I think it depends on what they actually need to do with the image. If they just need to display it, reading the header bytes seems a bit awkward. So

Re: cfimage: jpg that is really a gif

2009-11-17 Thread Leigh
I didn't see a response. http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:60485#328470 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing