> I've been using cf_gifgd from the tag gallery
> works good for me, but progressive jpg's will
> break it. If anyone has any better solutions I'd
> like to know also.
I too have been stuck with cfx_gifgd and its problems with progressive
JPEGs. I've looked, but haven't found anything that is a good replacement.
If anyone knows of a good alternative, I too would be very interested.
However, I do know how to test for progressive JPEGs before resizing them.
The problem is that when CFX_GIFGD is called to resize a progressive JPEG it
causes the entire CF service to crash and restart, which is obviously a bad
thing. I don't know enough about JPEGs (or the CFX code) to know why this
is.
To ensure that this won't happen, use CFX_GIFGD to read the file before you
resize it. The READ action returns a series of variables about the image,
one of which is the file type. If the image is a progressive JPEG the type
variable will contain an empty string. Just wrap the resize action in a
CFIF that checks the length of the type variable.
For example:
<!--- check the file type --->
<CFX_GIFGD ACTION="read" FILE="#yourFile#">
<CFIF NOT Len(Trim(Variables.IMG_TYPE))>
<!--- progressive JPEG! put some sort of error message here --->
<CFELSE>
<!--- image can be safely resized --->
<CFX_GIFGD ACTION="resize" blah blah>
</CFIF>
Just a little workaround I discovered. Hope it helps.
Regards,
Seth Petry-Johnson
Argo Enterprise and Associates
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.