Picture quality degraded after upload...

Picture quality degraded after upload...

by Fernando Oliveira -
Number of replies: 4
Picture of Plugin developers

One of my students has been trying for some time to upload a pic for his group profile. He tried saving it both as a Jpeg and PNG (100x100) and though it's fine on his computer, the quality is severely affected once it's posted.

I know that profile pics are cropped to 100x100, but does it also downgrade the quality? I've attached a screen shot of the problem.

Any suggestions would be appreciated.

Thanks in advance,

Fernando

Average of ratings: -
In reply to Fernando Oliveira

Re: Picture quality degraded after upload...

by Fernando Oliveira -
Picture of Plugin developers

No takers, eh? sad

Perhaps someone with a Moodle test course could be kind enough to upload the attached pic to one of their Group Profile area (just to make sure it's not a local problem). The funny thing is that once I change the text colour from blue to white, there is no degradation... it seems the combination of black and blue causes the blurriness (maybe other colour combinations too?).

Thanks in advance. 

The pic is 100x100 and, as you can see, it looks fine when uploaded outside of the profile areas.

Attachment moodle_pic_test.jpg
In reply to Fernando Oliveira

Re: Picture quality degraded after upload...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Images are converted to 70% JPEG format, so some information is lost.  This routine is optimised for photos, obviously.  Also, the scaling is worse when your PHP is using GD1 (GD2 is much better).
In reply to Martin Dougiamas

Re: Picture quality degraded after upload...

by Fernando Oliveira -
Picture of Plugin developers

Thanks for your response, Martin.

Is it possible to set the pic conversion rate  to 100% and, if so, could someone please direct me to the file that I need to change?

Fernando

In reply to Fernando Oliveira

Re: Picture quality degraded after upload...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Actually, I need to correct myself ... the numbers are currently 90% for large images and 95% for small ones (I'd changed them a long time ago and forgotten). See cvs:/moodle/lib/gdlib.php near the bottom.

You might want to add more contrast to that original image.