Hi!
I just started using IMCE for Drupal 5.1 and I have no upload quota, 0777 permissions on the folder, and it works perfectly unless I check "scale if neccessary"...
What might be wrong? is it something with my setup? The file I am trying to upload and rescale is 358x204 px, and i have set autoscale to 320x320 px,
I assume it works so that the first width/height that meats any of these numbers get resized. in my case, the 204 is smaller so it doesn't have to resized or it should resize the hight from 358 to 320. But it doesn't.
Doesn't work with any image i try with.
any ideas?
Comments
Comment #1
ufku commentedIMCE uses drupal's built-in image_scale function. It requires at least GD image library installed on the server. Do you have it? Check your administration page's image handling section.
Can you resize images by using the image resize form?
Comment #2
cybertron1 commentedWell, I have the GD library installed, do I have to have any other drupal module for it to work?
Comment #3
cybertron1 commentedwhich image resize form?
Comment #4
cybertron1 commentedJus ttried your demo on your site, and that resize form that is there, I don't have it.
SO something must be wrong, I'll try and reinstall imce and see what happens
Comment #5
cybertron1 commentedok, i'm a bit embarresed, I had forgot to turn on the custom resize option _;:D
although, i can manually resize images, but the "resize on upload" still gives me the error..
Comment #6
ufku commentedcan you please try the attached patch and comment on the result?
Comment #7
cybertron1 commentedhi, tried the patch, doesn't seem to make a difference.
sorry
Comment #8
ufku commentedhmm, i thought it was a file permission issue :(
scaling, actually, is resizing after calculating the appropriate dimensions based on width/height ratio.
One difference is that custom resizing is done on a temporary file and scaling is done on the file itself.
here is another patch that does the scaling using a temp file.
Comment #9
cybertron1 commentedHmm, almost works!
First time it seemed that it worked, although when trying one more time it didn't work...might be the tmp file that is stopping it? i don't think it is deleted is it?
Comment #10
ufku commentedtmp file isnt deleted. but i dont think it could block any subsequent scaling operations. For each operation a new unique named tmp file is created in your temporary directory. by the way, what is your temporary directory for drupal. did you try changing it?
Comment #11
jastraat commentedI am having this same issue. Scaling on upload is not working. This applies when 'scale if necessary' is checked, and the image is larger than the maximum allowed size. It also applies when I attempt to check 'create thumbnail'. I tried the patch above, but it did not fix the problem. It looks like the resizing is occurring in the temporary directory, and I imagine the file is locked. If I do not do initial resizing, uploads work successfully.
I am using the default /tmp directory with a multi-site install, with files going into the /files directory for each site respectively.
Any help would be appreciated!
Comment #12
WeRockYourWeb.com commentedMake sure you have both width and height specified under "dimensions for scaling" in IMCE settings.
Cheers,
Alex
----------
Contract Web Development, Inc.
Comment #13
emdalton commentedWe're seeing this problem now, when I'm pretty sure resizing worked on previous versions of IMCE.
Comment #14
ufku commented