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?

CommentFileSizeAuthor
#8 imce.module.scale__0.patch1.08 KBufku
#6 imce.module.scale_.patch741 bytesufku

Comments

ufku’s picture

IMCE 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?

cybertron1’s picture

Well, I have the GD library installed, do I have to have any other drupal module for it to work?

cybertron1’s picture

which image resize form?

cybertron1’s picture

Jus 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

cybertron1’s picture

ok, 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..

ufku’s picture

StatusFileSize
new741 bytes

can you please try the attached patch and comment on the result?

cybertron1’s picture

hi, tried the patch, doesn't seem to make a difference.

sorry

ufku’s picture

StatusFileSize
new1.08 KB

hmm, 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.

cybertron1’s picture

Hmm, 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?

ufku’s picture

tmp 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?

jastraat’s picture

Version: 5.x-1.x-dev » 5.x-1.0

I 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!

WeRockYourWeb.com’s picture

Make sure you have both width and height specified under "dimensions for scaling" in IMCE settings.

Cheers,
Alex
----------
Contract Web Development, Inc.

emdalton’s picture

We're seeing this problem now, when I'm pretty sure resizing worked on previous versions of IMCE.

ufku’s picture

Status: Active » Closed (won't fix)