Closed (fixed)
Project:
IMCE
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 May 2008 at 22:05 UTC
Updated:
2 Aug 2009 at 14:42 UTC
When I uploaded an image file, the thumbnail generation did create a smaller-sized image automatically (if I select the thumbnail option), the the generated image is not a shrinked version of the 'whole' image, but a cropped image (I mean, only grab 'portion' of the image which size id the given thumbnail size).
-Derek
Comments
Comment #1
huayen commentedI tested on the project demo page, same problem occurred for V6 demo, not occurred for V5 demo.
So, it is confirmed that this is a bug for IMCE V6.
Comment #2
ufku commentedIMCE uses Drupal's image_scale_and_crop() function to create thumbnails. It first scales the image and then crops it getting rid of excess parts.
You can change the issue category to feature request, requesting image_scale() function to be an optional or the default thumbnail generator.
Comment #3
ufku commentedmaking this a feature request
Comment #4
drubeedoo commentedHi ufku, thanks for adding this to your active list.
I've been searching for good image upload/resize functionality without the bloat of images as nodes, and IMCE is almost perfect, and would be so if aspect ratio was respected as an option in setup.
Thank you for all the work you've put into this great module! It is much appreciated.
Comment #5
Ignas commentedinsert this code in page.inc file function imce_resize_image above "//create file object"
But this code forces all images scale proportionally - not square as in original IMCE.
Comment #6
andreiashu commentedIf you want just to scale the image (not scale_and_crop it) then just search in page.inc file for "scale_and_crop" and replace it with "scale". Just that simple.
We should have an option to select the type of resizing for that particular resizing operation. Maybe a drop down box ?
Comment #7
yang_yi_cn commentedinterested, subscribing
Comment #8
codemannVery interesting, subscribing too.
I hope this will become a new feature to have the choice to scale or scale and crop.
Comment #9
ssm2017 Binder commentedsubscribing
Comment #10
neek commentedor just crop like in imagecache..
Comment #11
nschloe commentedsubscribing
Comment #12
ufku commentedthis was implemented on 6.x branch. wait for the next release.
Comment #14
iantresman commentedCan you just clarify what was implemented, and whether it made it into IMCE 6.x-1.2.
The ability to scale thumbnails? Preserve aspect ratio? Choosing between scaling, and, scaling and cropping?
Comment #15
iantresman commentedOK, just found where this is implemented in the current IMCE 6.x-1.2, on the IMCE Admin page, at the bottom, there is a section "Common settings" where you can choose between:
Unfortunately, it still doesn't preserve the image aspect ratio, which would be invaluable.
Comment #16
ufku commentedThe first option does so.
What exactly do you expect it to do?
It scales the image[100x80] to [20x16](instead of [20x20]) for the thumb[20x20].
And an image[100x200] becomes [10x20] for the same thumb.
Comment #17
iantresman commentedThanks for your reply. I don't think I was getting this effect. So I'll go and double check all my settings, and report back.
Comment #18
iantresman commentedSomething is not quite right. Here's what I did, and the results:
However, the thumbnail created by IMCE looks distorted
I had expected the image to be exactly 196 pixels wide (rather than 195), and 95 pixels wide, without any cropping.
On request, I'd be happy to give you access to my site, together with a set of instructions, so you can reproduce the behavior. Is contact via the Drupal contact form secure enough?
Comment #19
iantresman commentedI just deleted the image on which I was creating the thumbnail, uploaded it again, and now everything works as expected.
Very bizarre. So please consider this resolved, and sorry for the hand-waiving.