image resize library issues |
[eluser]bennyhill[/eluser]
I am using the image resize upon upload library. After the picture is resized, the quality is really bad. It's pixelated and sometimes the colors are off. Here is my config array: Code: $config['upload_path'] = './productImages/'; And then I have a resize function which is called from the upload function: Code: function resizeImage($image)
[eluser]pistolPete[/eluser]
Are you sure you use GD instead of GD2? Try Code: $config['image_library'] = 'gd2';
[eluser]TheFuzzy0ne[/eluser]
I'd recommend using ImageMagick where available. Also, can you confirm that you're scaling your image down and not up? If you're trying to make a smaller image bigger, then pixelation will occur.
[eluser]steward[/eluser]
Processing photos in a loop: Took me longer than I wanted. Docs are missing an entry for image_lib->initialize(), and that is the key. The information is there, but you have to read the page slowly and carefully, like a gripping novel. I prefer griping. Which is not novel. Just in case another has the same issue, here is what worked for me: load lib begin loop clear set options initialize invoke method end loop Code: // resize all pics in a folder (replace existing). We want a max size of 10K per thumb PS: If you are using phpFox, take a look at your video image folder. Some of them thumbnails are .5MB !
[eluser]bennyhill[/eluser]
I tried gd2 and put $config['quality'] = 100 in the config array but still I get image degradation. Below are links to the before and after of the upload and resize. The before was a 200 x 200 and the resize is a 100 x 100. Before After I can't understand what is happening. Does anyone else have this problem?
[eluser]TheFuzzy0ne[/eluser]
The resulting image is 126x125. I don't know if this is your problem. I thought you were going for 100x100, in any case, the aspect ration is slightly out by 1 pixel, which might explain the blurriness.
[eluser]bennyhill[/eluser]
Sorry, the after picture was a screen shot so I didn't crop it exactly. I don't know why I didn't just right click save as...(so frustrated with this I stop thinking right). Indeed when I right click save as it is 100 x 100. So I think it is resizing correctly it just becomes blurry. Has no one else used this the image library? If so did it work right? Could it be my crappy 1and1.com web server?
[eluser]TheFuzzy0ne[/eluser]
Well, to my knowledge, image manipulation can consume a lot of memory, so there might be a chance that the server configuration is stopping you from using too much memory, although I think that's unlikely. Are you unable to use ImageMagick? If I can find some time, I might run some experiments later on, but it won't be for at least another 8 hours.
[eluser]bennyhill[/eluser]
I can use ImageMagick but I have to use SSH to install it. I never delt with SSH before so I am nervous I might screw something up big time. But if I have to, I might have to risk it.
[eluser]TheFuzzy0ne[/eluser]
What OS/distro are you running on your server? Usually, you can just install from a repository, which is very simple. No need for compiling or any of that nonsense. On my system, I just type this: sudo aptitude install imagemagick And then it's pretty much done. |
Welcome Guest, Not a member yet? Register Sign In |