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 lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328483
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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  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 
> something more dynamic would be better. (I posted one option in another 
> response)
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328482
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 data. When I get time it will be addressed.

On Tuesday, November 17, 2009, Leigh  wrote:
>
>> 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 know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328481
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328480
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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.

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328479
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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)


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328474
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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  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 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:
>
> 
> 
> 
> 
>... if it is an image, do something here ...
> 
>
>
>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328472
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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:





... if it is an image, do something here ...





  

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328470
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328469
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328464
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 

http://www.w3.org/Graphics/GIF/spec-gif89a.txt


  

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328463
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4