By Josh Lewis on Thursday, 15 May 2014
Posted in Technical Issues
Replies 15
Likes 0
Views 809
Votes 0
I have image quality set to 100 in hopes to have the best quality images I can possibly provide for my users. It appears that their is a big reduction in quality with the resized photos. Compare the original with the large. In the large you can see graininess above the mountain, loss of sharpness, big grainy blocks, and loss of detail. But the stock photo looks fine.

We both know that resizing a photo typically reduces the quality, however I have a powerful counter argument in this case to that being the real reason for the quality reduction. Here is ES's 1280px photo and here is one I manually resized to 1280px. When looking at the file sizes the lower quality one is 68.3 KB while the other one is 251 KB. So I know for a fact that the resize photos are losing a lot of details, more so than what is ideal. It's not just sharpness we are losing, I can see the graininess in the processed photo. In my manually resized one it has very little grainy details.

Is this my image processor's fault? Does this happen on your dev site? Is there some sort of compression going on?
Hi Josh, it appears to be a regression from a Feb 16 fix when we were trying to fix an issue where images would fail to resize on server that runs on suexec.
But nevertheless, I am providing you the fix right here and it will be included in the next 1.2.12 release.

Extract and replace the original file at:
administrator/components/com_easysocial/includes/image/adapters/asido/class.driver.gd_hack.php
·
Thursday, 15 May 2014 13:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Josh, I've been reviewing the resizing process while overhauling the image processor in EasySocial (not slated for 1.3 not sure when it will see the light of day).

There might be something I can bring in quickly for 1.2. I'll update you on this in a bit once I get the other issue on the other thread resolved.
·
Thursday, 15 May 2014 11:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Jensen, the photo quality increase will mean a lot to me. Not just a casual fix that makes me happy for a moment. (although smaller fixes go appreciated too) I get excited when I see new minor releases of ES now.
·
Thursday, 15 May 2014 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
I really appreciate the effort on this, I feel that we are close on cracking this case. Unfortunately when I upload any photos it says "HTTP Error." regardless to the size. Here is what it looks like:



You can replicate the issue here: http://www.test.alpineascent.com/galleries/item/48-mount-rainier-may-2014/user/josh
Let me know if there is any server info that you need, or other configurations.
·
Thursday, 15 May 2014 15:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Josh, the error was:
"Asido driver file "administrator/components/com_easysocial/includes/image/adapters/asido/class.driver.gd_hack.php" (for driver "gd_hack")" not found.
I'll get into the FTP to verify if the file exists hold on :-)
·
Thursday, 15 May 2014 15:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Turns out the file wasn't extracted Josh. Give it a spin.
·
Thursday, 15 May 2014 15:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Wow! It looks so much better now. The quality is now exactly where I want it to be. Now it's looking good as seen here:



Thanks Jensen, I really appreciate this fix.
·
Thursday, 15 May 2014 16:02
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.
·
Thursday, 15 May 2014 16:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Image quality has been an issue since the beginning for me too, and is the single most important thing that prevents me to go live with my project (apart from other things as choosing a theme I like or making it myself). And quality is not just a question of compression: quality set to 100 is not the solution, as you would get files bigger than originals; quality is also a matter of color. GD is BAD! It messes up details and colours.
Mark said, in response to one of my posts here, that they would do something to fix image quality issue by adopting a new image engine or something similar. I myself suggested many times Image Magick and Mark was quite positive with that (He said that in 1.3 they would have done something nice with Image Magick).
Now you say "... overhauling the image processor is not slated for 1.3 not sure when it will see the light of day".

I'm happy with ES, even though I purchased version 1.0 with the promise of monthly updates (and after 6 months we only got 1.2), but I'm ok with that and with bi-monthly updates, I know that good software needs time and, again, I'm perfectly ok with that. But how long should I wait for this issue to be fixed?

I digged into the code (I'm not a programmer, my knowledge of php is very limited) and I found that your current image adapter supports a few GD implementations and Image Magick too, it just needs to be tweaked and tell the system to use one instead of the other. Can someone help me in doing that while we all wait for a more complete "image adapter overhauling" ?
·
Thursday, 15 May 2014 17:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Antonio, I'm sorry to may have mentioned it that way in my previous post, here's a clearer explanation of what's going on.

ImageMagick is part of the overhaul and while it is true it was initially targeted for the 1.3 milestone, I have been now tasked to handle certain rewrites of EasyBlog 4.0 as well, which has well, forced me (in a good way) to release bits and pieces of the overhaul over the course of all these minor version releases throughout 1.2 and 1.3.

So it will now start with pure image tags and small image handling for 1.2.11, and one or two more image layout configuration for 1.2.12 and we'll see what goes out as we go along. :-)

I hope that is okay for you.
·
Thursday, 15 May 2014 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, I will wait, given that I can't do otherwise.
·
Thursday, 15 May 2014 18:18
·
0 Likes
·
0 Votes
·
0 Comments
·
In the meanwhile, can anyone help me with this tweaking?

I'm trying to do a bit of a hacking as I already did elsewhere, that is forcing the image adapter to load an icc profile and write it into the file. I did this with timthumb ad it works perfectly. I'm sure it can be done here too but I get errors; there must be something I do wrong.

This is the code to be inserted.

require_once('class.jpeg_icc.php'); - THIS is inserted at the beginning of the adapter and loads the class that does what I said.

This following code loads the profile and writes it into the file. $source_file is an image from which the icc profile is loaded. This is fine and works.
$destination_file is the file to be written, I think this should be a variable as $tmp->target, but it does not work.

$icc = new JPEG_ICC();
$icc->LoadFromJPEG($source_file);
$icc->SaveToJPEG($destination_file);


This is where the image adapter writes the image (where Jensen did the tweaking that already achieved better quality).
case 'image/jpeg' :
ob_start();
imageJPEG( $tmp->target, null, ASIDO_GD_JPEG_QUALITY );
$contents = ob_get_contents();
ob_end_clean();
break;

Question is: where to insert and how to fix those 3 lines of code to make it work?
·
Thursday, 15 May 2014 19:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Antonio, great ICC lib!

I made an untested hack for you. I think you can work from there.
http://screencast.com/t/moPGmuyjxxG
http://screencast.com/t/LCJQ2bwguT
·
Thursday, 15 May 2014 21:50
·
0 Likes
·
0 Votes
·
0 Comments
·
OH MY!!!!!!! I COULD CRY!!!!!!!! IT WORKS!!!!!!!!

THANK YOU JENSEN!!!!
·
Thursday, 15 May 2014 22:14
·
0 Likes
·
0 Votes
·
0 Comments
·
@Antonio Pleasure is all mine~
·
Friday, 16 May 2014 19:04
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post