Reply to topic
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
Comment out your write and put this under the call to aspectcrop.

<cfdump var="#aspect#">
<cfimage action="writeToBrowser" source="#aspect#">

Does the dump show your image properties and does the image display?
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
I got this from the output


struct
colormodel struct
alpha_channel_support NO
alpha_premultiplied NO
bits_component_1 8
bits_component_2 8
bits_component_3 8
colormodel_type ComponentColorModel
colorspace Any of the family of RGB color spaces
num_color_components 3
num_components 3
pixel_size 24
transparency OPAQUE

height 150
source C:\Websites\em47126e\babyimg\halloween.jpg
width 120

access denied (java.io.FilePermission C:\Coldfusion8\tmpCache\CFFileServlet\_cf_image read)
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
the image does not display
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
Now we're finally somewhere. Its a problem related to sandbox security and tmp directory permissions. You need to talk to HMS or your host. Theres nothing wrong with your code or the imageutils.

Let me know how it goes.
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
I don't know if it helps you, but if I got to any website and right click on the image and do a save as and try to upload this image to the website it works.
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
The imageutils are nothing more than built in image functionality mashups. Your getting an access denied message which still throws this back to the server config. Copy your error with the java stack to HMS support and they should be able to remedy it.
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
HMS gave me the permissions to the tmp folder and now I can upload the image, but I still get some problems.

when I remove the line
Code:

<cfimage action="write" source="#aspect#" destination="#MediaPath##file.serverFile#" overwrite="true">


and replace with
Code:

<cfdump var="#aspect#">
<cfimage action="writeToBrowser" source="#aspect#">


I get the image to display on the screen but it does not resize the image

and when I put it back
Code:

<cfimage action="write" source="#aspect#" destination="#MediaPath##file.serverFile#" overwrite="true">


and upload the image I get an error in the cftry

An exception occured while trying to write the image.

I'm using the #cfcatch.message#
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
whats the exception? full error with java stack.
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
emmet,

It doesn't give me the full error all I got is

An exception occured while trying to write the image.


and when I do this

Code:

<cfdump var="#aspect#">
<cfimage action="writeToBrowser" source="#aspect#">


It works but it does not resize the image.
Writing images on the server after resize doesn't work
viaRomania


Joined: 21 Apr 2008
Posts: 2
Location: Brasov
Reply with quote
Definitely there are some issues happening these days on the HMS servers since our images upload/resize functions stopped working since Friday.

I tried a lot of ways to fix this but seems to be a server related problem. We setup a test script trying to do this:

1. Upload a JPG file with a size greater than 640 x 480 on the server
2. Create a "thumbnail" of the images (150 x Y) and save it to "thumbs/" folder
3. Create a "big version" of the images (640 x Y) and save it to "images/" folder
4. Delete the original file

It crashes on the 3rd step, and saves only part of the resize JPG file. The error we are getting is this one:


An exception occured while trying to write the image.
Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : coldfusion.image.ImageWriter$ImageWritingException: An exception occured while trying to write the image.


Later edit:

- This is acting totally strange... for some JPG files it works fine, for some of them it crashes when trying to write the resized image on the server and for some of them it is crashing when trying to delete the original file from the disk. I just don't get it!

If you want to test it, download this image: http://www.viaromania.eu/upload/PICT0238.jpg

And try the script with it. It should crash on RESIZE.

Next, download this image: http://www.viaromania.eu/upload/_2422339695_237906822d_b.jpg

And try the script with it. It should crash on DELETE original file.

And download this image: http://www.flickr.com/photos/24769044@N08/2422339695/sizes/l/

And it will work fine...

What is going on? Does anyone else experienced the same problems?
viaRomania


Joined: 21 Apr 2008
Posts: 2
Location: Brasov
Reply with quote
Seems to be a bug in ColdFusion 8.0.1
Check this out:

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=1355471&enterthread=y

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=1355060&enterthread=y
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
I haven't run into any issues on any of our servers. I agree that its a server config or cf bug issue though.

Sorry i cant really help you further but I know the code your using is sound. That leaves the support to HMS.
Ennio


Joined: 17 Nov 2006
Posts: 98
Location: Scotch Plains, NJ
Reply with quote
Sad

I will try to contact HMS to see if they can solve that.

Thanks for your help all.
koellerk


Joined: 15 May 2008
Posts: 4
Location: San Francisco
Reply with quote
Hi, I've been wrangling with this issue for about three weeks now. Its really got the team at HMS confounded. It appears to have started with the Adobe patch mentioned earlier. They have moved my code over to another server yet the CFIMAGE write issue persists.

For reference, I have an unpatched test box here and its works everytime without fail. I have another hosting account and tried the code there and it also works. So, waiting patiently on HMS engineers.

Curious if anyone has developed a workaround?
emmet


Joined: 16 Nov 2004
Posts: 27
Reply with quote
Adobe released a Hotfix for this this week. http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403622&sliceId=1

Get it while its hot.
Image resize.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 2 of 3  

  
  
 Reply to topic