Image library (GD) resize problem |
[eluser]RaBu[/eluser]
Hi, I'm trying to re-size a newly uploaded image-file in a controller function, I get no errors and the image get re-sized just fine, but the quality is crap. The image get very dusty and with a low amount of colors (in the blue-, gray-, white-ish scale). Code: $imageconfig['image_library'] = 'GD'; Anyone else have experienced this problem? Kind regards, Rasmus
[eluser]RaBu[/eluser]
Here you can see an example of the re-sized files: http://rabu.dk/temp/example1.jpg http://rabu.dk/temp/example2.JPG
[eluser]brianw1975[/eluser]
Quote:$imageconfig['quality'] = "100%"; did you try and take out the % from 100%? in the code there is no percent sign, and since text won't convert to an int very easily it'd get converted to 0 i believe. Code: class CI_Image_lib {
[eluser]RaBu[/eluser]
Yes, I have the exact same problem - even if I completely leave out the "quality" parameter.
[eluser]RaBu[/eluser]
Of course, my phpinfo() says: GD Version: bundled (2.0.28 compatible) So changing to GD2 fixed the problem. Code: $imageconfig['image_library'] = 'GD2'; Thanks for the pointer
[eluser]Vijusoft[/eluser]
Thanks a lot, Same problem in my project get solved.
[eluser]quexal[/eluser]
I had the same exact problem... even after switching to GD2 it was still doing it! Solved by adding the line to my config: $config['quality'] = '90'; Hope this helps someone else running in to this problem.
[eluser]devbro[/eluser]
I was there done that. basically forget about GD and GD2 if quality of images are important to you. use imagemagick instead. |
Welcome Guest, Not a member yet? Register Sign In |