Download & Extend

Image quality reduced after cropping

Project:Imagefield Crop
Version:7.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I am having problems with image quality after cropping.
I will describe my situation as shortly as I can:
I have a content type for News with a picture field.
This picture field is set to use widget type "Image with cropping". Crop resolution:457x341;Enforce crop box ratio- checked;Enforce minimum crop size based on the output size- checked;The resolution of the cropping area: 0x0;Permitted upload file extensions: png, gif, jpg, jpeg (I use jpg);Maximum resolution for Images: 1024x768;Minimum resolution for Images: 457x341.

When I upload an image that is already in correct resolution (457x341) the quality is not changed (see attached file quality_test.jpg) and the image is displayed on the front page in perfect resolution.

In the next test I have created 800x600 image that contains the quality_test.jpg image in the middle (see quality_test_big.jpg). I upload this image and crop out the center of it.
In the result the image that is displayed on front page has a reduced quality (see quality_test_big_after_cropping.jpg)

I have set the JPEG quality in admin/settings/image-toolkit and in admin/settings/imageapi/config to 100%

I hope that there is a solution for this problem... When the cropping is used for good quality images the quality change is visible and it causes some problems...

AttachmentSize
quality_test.jpg6.28 KB
quality_test_big.jpg9.95 KB
quality_test_big_after_cropping.jpg7.43 KB

Comments

#1

Does anyone have ideas regarding this issue? May be I have posted it in the wrong issue queue?

Thank You in advance!
Krisjanis

#2

Try to set the jpeg image quality to 100% under http://your.site/admin/settings/image-toolkit

#3

Thank You for Your replay, yhager!
I have already set the image quality in this section to 100% as I described in my first post.
any other ideas ?

#4

Oh, sorry I missed that in your text.

The code uses standard PHP image manipulation API, so any problem you have with the quality must come from your graphic library. Make sure you use the latest stable of PHP/GD, or try a different graphics library (like imagemagick).

#5

I am curious if someone can repeat this.
yhager, grat thanks for the advice!
Cheers,
Krisjanis

#6

same problem here.. im on D7 image_crop image quality degraded degrading after crop.

screenshot: http://prntscr.com/38nrp

nvm i changed image toolkit to 100% from 75 ... http://prntscr.com/38nxz

#7

Yip having the same problem busy tring some tweaks will share if I find some joy.

#8

Version:6.x-1.0-rc2» 7.x-1.0

I have tried Epsa Crop which does not reduce the quality of the image. This would suggest that the issue is with the Image crop module.

I was unable to try Image crop with imagemagick as I was having problems with the binary path in a local host environment.

AttachmentSize
Image after cropping.jpg 90.39 KB
Image before cropping.jpg 33.83 KB

#9

Version:7.x-1.0» 7.x-2.x-dev

I tried this recipe and found some joy.
7.x-2.x-dev image filed crop appear to crop images without reducing the quality and I am running D7.8. with GD tool kit JPEG Quality 100%.

Hope this helps

#11

This "low res" problem is still occurring with GD tool kit @ 100% and Drupal 7.10 and 7.x-2x-dev.

AttachmentSize
GD Library is at 100 percent 28.69 KB
Upload is good image 62.95 KB
Result is bad image 80.95 KB

#12

I've found the same problem when i set the "The resolution to crop the image onto" lower than the final resolution due to client requiremnt i suppose the 2 sizes (preview during crop operation and final result) cannot be unrelated.
I couldn't disable resize after crop as the field description suggested, so i've increased the resolution value to the final requested size.

Have you tried increasing that resolution to the frontend needs?

I hope I was quite understandable.

nobody click here