Crappy resize with Imagecache

bumathan - December 15, 2006 - 12:14

hi !

I use Imegecache & CCK imagefield. I'd like to display multiple size square images in my nodes. It seems to work fine, but the image quality after resize is really crappy :(

I use imagemagick so I don't understand why... Do you ?

Furthermore, do you know how I can have square cropped images with imagecache ?

Thank you.

trial and error

morphir - December 15, 2006 - 12:59

I would try out gd2(php module) in stead.

morphir.com

GD 2 has always been worse

bumathan - December 15, 2006 - 13:38

GD 2 has always been worse than Imagemagick...

Anyway, I'd really like to know where the conversion of the image is done with imagecache. I can't find any "convert" command in the imagecache.module

What's strange's that before, I used to use a flexinode with imagefield and imagemagick and the image was resized without being deteriorated. The imagecache module is nice but I don't want change to have a bad image quality...

You may need to do this in

KarenS - December 15, 2006 - 17:33

You may need to do this in more than one step, like crop and then resize. You can configure multiple steps in imagecache, so if you don't get a good quality result, try different combinations until you get what you want.

The result is the same.

bumathan - December 15, 2006 - 20:32

I tried this solution. I've created a preset that crop the image (center / center) with dimensions 100% x 100%. Then I resize the image to 110px * 110px but the result is the same :(

It's strange, it's like the module used the GD library which has always have really poor results, but the IMagemagick toolkit is enabled, not the other one. I don't understand.

I'd like to know where is the code that calls on the toolkit conversion. I know we can change the image quality with imagemagick as the "image enhanced scaling" module does but this module doesn't work with imagecache.

Am I the only one to experience such bad results with imagecache ?

Anyway, thank you for your help :)

EDIT /// If I make a preset that first crop the image (center / center) without any dimensions specified, then I resize to 110*110, It doesn't work but the result is amazing ! I get a Mondrian style picture ! :D For those who are interested in abstract painting...

I forgot to say...

bumathan - December 15, 2006 - 20:37

I forgot to say that I've tried a simple resize to 110px * 110px on a good quality image (previously resized and saved with photoshp) that already has these dimensions and after the "resize" on the fly (even if the dimensions were already right) the quality is lost and the image becomes awfull. Interesting...

That's as much help as I can

KarenS - December 15, 2006 - 22:32

That's as much help as I can be. Best bet is to post an issue on the imagecache issue queue where either dopry or someone else who knows the module well is more likely to see your question.

That's what I did :) Thank

bumathan - December 16, 2006 - 07:46

That's what I did :) Thank you :)

set image quality in two places

heartsutra - January 15, 2009 - 02:26

I was having the same problem, and it turns out I had to increase the JPEG quality settings not once but twice in the Admin area:

  • /admin/settings/image-toolkit
  • /admin/settings/imageapi/config

Thanks!

linclark - June 23, 2009 - 14:03

Thanks for posting the fix, I would never have guessed you had to change in 2 places.

I had changed the settings in /admin/settings/image-toolkit, but not in /admin/settings/imageapi/config

It's worth being sure your GD

sime - May 30, 2009 - 03:50

It's worth being sure your GD settings for jpegs are 100%. I've found that 100% is the best for nice pictures in GD and doesn't do a bad job of the resulting file size.
admin/settings/imageapi/config

 
 

Drupal is a registered trademark of Dries Buytaert.