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 =
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
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
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:
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:
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
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)
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.
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
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
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
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
12 matches
Mail list logo