By Philippe on Sunday, 13 August 2017
Posted in Technical Issues
Likes 0
Views 0.9K
Votes 0
Hello,

When a photo is send in EasySocial, I noticed that the quality of the picture is less good.
There is less sharpness, the colors are less brilliant, and especially the weight is superior to the original.
How to remedy this?

If the resolution of the original photo is 1280 pixels wide, there is no loss of sharpness in the final photo. But always a loss of color.
On the other hand, if the resolution of the original photo is 2000 pixels wide for example, there is a loss of sharpness and also color.

I specify that my original photos are in Adobe Rgb (color profile).
Why not use ImageMagick which is more powerful?
Because GD Library does not support color profiles...

Thank you
Yes, it would be nice if ImageMagick is used by EasySocial (EasyBlog and EasyDiscuss too).

But in the meantime I found the solutions to all the problems !

GD Library does not support color profiles for images :
To fix this, we need to send the images are in sRGB format.
Thus the colors are perfectly preserved.

GD Library does not resize images properly. If the original image is more than 1280 pixels wide, the final image will be much sharper, a little blurred.
To avoid this, before sending an image it is necessary to resize it manually (with Photoshop for example) to the final size. That is, 1280 pixels (default).

GD Library does not compress images properly. Currently the final image (large for example) is much heavier than the original image.
The solution is to change the value of the quality in :
administrator/components/com_easysocial/includes/image/adapters/asido/class.driver.gd.php

// Prior to 2.0, photo quality is always 100
$quality = (int) 100;
With a 90 value, the final weight is almost the same as the weight of the original image !!

Philippe
·
Monday, 14 August 2017 21:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Philippe,

If i recall correctly the reason why we choose GD Library in Easysocial 1.0 initialise is because ImageMagick is not supported as well as GD by many hosting providers previously, and most of the hosting providers not installed ImageMagick library by default from their server, that is why we choose GD library.

In EasySocial 2, we also did implemented to use ImageMagick library for animated GIF processing, but we will see if there a lot of user also request this to use ImageMagick library for normal image, we will definitely consider this implement this in the future.
·
Monday, 14 August 2017 11:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Philippe
·
Tuesday, 15 August 2017 11:39
·
0 Likes
·
0 Votes
·
0 Comments
·
It might be a good idea to put that value by default, right ?
Because everyone would be delighted to lighten his server and speed up the loading of the pages.

But why have you removed the ability to choose the resolution of images and the quality level in the EasySocial backend ?

Thank you.
Philippe
·
Tuesday, 15 August 2017 16:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually when you mention `final weight` is the image file size right?

If yes, i did tried to compare with 100 and 90 value when i upload 2 same image, but it seems like that large image file size didn't larger than original image file size, you can check my attached screenshot below.

Am i tested wrongly?

But why have you removed the ability to choose the resolution of images and the quality level in the EasySocial backend ?

I believe who using EasySocial also would like to show more quality image on the page, like your case maybe you can try configure to use PageSpeed Modules from your server, the purpose of this PageSpeed Modules is to optimize your images to minimise their size and thus reduce their load time, this is what i usually see other users also using this.

Hope this method will help.
·
Tuesday, 15 August 2017 18:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, final weight is the image file size.

It is very surprising. I do not have the same results at all
I just try on your own demo http://easysocial.stackideas.com/albums/108-tests-philippe

_large photos are much heavier than the original photos
·
Tuesday, 15 August 2017 18:43
·
0 Likes
·
0 Votes
·
0 Comments
·
it seems like I was unable to access your album now.

Perhaps you can try access just i created a test album.
http://easysocial.stackideas.com/albums/106-test

Then i manually view that image on the browser then download it, it seems like that large image size didn't larger than original image you can check my attached screenshot below.
http://xcdn.easysocial.stackideas.com/media/com_easysocial/photos/106/236/1920x1200-data-out-22-4073819-nissan-gtr-wallpaper_large.jpg
http://xcdn.easysocial.stackideas.com/media/com_easysocial/photos/106/236/1920x1200-data-out-22-4073819-nissan-gtr-wallpaper_original.jpg

Can you attach that image which you uploaded on our demo site?
·
Tuesday, 15 August 2017 22:40
·
0 Likes
·
0 Votes
·
0 Comments
·
I can not understand
At one point I thought I had solved the riddle, comparing your car photo of my photos.
There is a difference of DPI (72 vs 300).
But in the end it does not change anything. The size of the picture is the same in 72 or 300.

I tried with lots of other pictures from Google Images, with different sizes / dpi / resolutions (pixels) : it's always the same scenario. The size of the final image is always about twice as high compared to the original image.

Your car photo is a curious exception.

http://easysocial.stackideas.com/albums/106-test
I have tested with Google Chrome and Safari.
·
Wednesday, 16 August 2017 02:19
·
0 Likes
·
0 Votes
·
0 Comments
·
It seems like our demo site will automatically restore back to previous backup in certain time, so I was unable to view back this album page what you provided http://easysocial.stackideas.com/albums/106-test today .

Perhaps you can attach those image in your next response as what you tested yesterday, so I can test it on my locally with Chrome browser as well.
·
Wednesday, 16 August 2017 10:46
·
0 Likes
·
0 Votes
·
0 Comments
·
I tried again with other random images from Google, by typing house, garden, beach, etc.
The size of the _large images is always doubled compared to the original images...

http://easysocial.stackideas.com/albums/106-philippe

The solution is nos this ?

// Prior to 2.0, photo quality is always 100
$quality = (int) 90;
·
Wednesday, 16 August 2017 15:59
·
0 Likes
·
0 Votes
·
0 Comments
·
I finally understand the logic of the system !!!

To have the original and final size equal, you must :
- The GD Library should be set to 100 and the Jpeg image quality level should be 12 in Photoshop.
- Or that the GD Library is set to 90 and the Jpeg image quality level is 8 in Photoshop.

See attached images for better understanding.

So in all cases, I think it is better to have GD Library set to 90.
To not overload the server and slow down the loading of the pages.
·
Wednesday, 16 August 2017 17:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Philippe,

Thanks for took your time to test this out, based on what i tested upload your photo in my locally, it did show the large image file size larger than original image if the GD quality set to 100.

And I also tested with some of my image, but the large image file size didn't larger than original image even that image resolution same as you attached those photo at above.

If I recall correctly, so far we never receive any our customer complain about this image quality, but you are the first user complain this image quality.

For now, you have to manually modify this image quality from that php file.

We will see what is the best way to cater for all these who want image quality to 100 or 90 in the future.
·
Wednesday, 16 August 2017 18:12
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Arlex

The loading time of a website is an essential criterion these days, especially as the traffic is concentrating more and more on mobile.

I think you should put again the possibilities of media settings in the EasySocial backend.
On the same model as EasyBlog.

Thank you for your assistance.
Philippe
·
Wednesday, 16 August 2017 22:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your suggestion Philippe

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Thursday, 17 August 2017 11:49
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post