Medium-Size Image Quality / Scaling Issues - Printable Version +- MyBBHacks.com Plugins for MyBB (https://www.mybbhacks.com) +-- Forum: ezGallery Pro for MyBB (https://www.mybbhacks.com/forumdisplay.php?fid=8) +--- Forum: Support (https://www.mybbhacks.com/forumdisplay.php?fid=10) +--- Thread: Medium-Size Image Quality / Scaling Issues (/showthread.php?tid=3576) Pages:
1
2
|
Medium-Size Image Quality / Scaling Issues - elizabeth - 02-15-2021 I have “generate medium-sized images” turned on presently and “Reduce Image if Too Large” as well. I had a user complain that her images looked washed out. I went and looked at the image that loads by default on the photo page, and when I clicked on the intermediate image, the color exploded. Thinking it was a “medium-sized image” setting issue, I turned that setting off and reloaded the page, and the default image was no longer washed out. And it was in fact an issue with the "medium-sized" image being washed out: https://www.ponybytes.com/forum/gallery/medium_33027_kz_liztest.jpeg https://www.ponybytes.com/forum/gallery/33027_kz_liztest.jpeg https://www.ponybytes.com/forum/gallery/medium_407_14_02_21_5_39_45_2.jpeg https://www.ponybytes.com/forum/gallery/407_14_02_21_5_39_45_2.jpeg With “generate medium-sized image” turned off, however, users began to complain about distorted images. When I looked at an example, the default (that is, full-sized) image was in fact distorted. I believe the page was sizing the image down to both of the maximum ezGallery image display dimensions instead of scaling it: https://ponybytes.com/other/misc/distorted.png (screen cap of distortion on page) https://www.ponybytes.com/forum/gallery/32998_class337turtleslegacy.jpeg (undistorted) My sample user said that her default photo page image started to load an undistorted "medium-sized image" after the setting was reenabled but my copy of the same image, uploaded while medium-sized image was off, remains distorted. So I think I understand why “generated on the web” medium-sized images might be lower quality. But what I need to figure out is how I can adjust the settings so that I am getting full image vibrancy and pictures that are not distorted. Thanks in advance for any help. RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 We use MyBB's generate thumbnail function currently. The default quality is at 75,% Found in inc\functions_image.php(21): function generate_thumbnail($file, $path, $filename, $maxheight, $maxwidth) Code: switch($imgtype) You would need to change imagejpeg($thumbim, $path."/".$filename); To imagejpeg($thumbim, $path."/".$filename,100); 100 keeps it the original quality RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 I will override that function in a future update and set the default to be 100 RE: Medium-Size Image Quality / Scaling Issues - elizabeth - 02-15-2021 Thanks! Alas, I added '100' to that line and I've still got the same problem with vibrancy: https://www.ponybytes.com/forum/gallery/medium_34106_kz_liztest.jpeg https://www.ponybytes.com/forum/gallery/34106_kz_liztest.jpeg RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 Do an experiment for quick test. Change imagejpeg to imagepng($thumbim, $path."/".$filename); In both spots and see if any difference. RE: Medium-Size Image Quality / Scaling Issues - elizabeth - 02-15-2021 I changed both instances of @imagejpeg to @imagepng and removed the '100' I put in earlier in this part of the code: PHP Code: else With this change, the medium-sized image seems to render the colors correctly. I put it back to imagejpeg and restored the '100,' though because I didn't know what it was doing to my galleries in the meantime (we have a corporate-sponsored event going on and people are uploading like mad). What have we just illustrated? RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 That the JPG image function causes the loss versus the imagepng function RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 Adjusted in latest update to use png and our own thumbnail function so you won't need to do mybb file edits 5.5.1 !Fixed who is viewing inside categories for both public/user galleries !Fixed rating display on main categories inside the gallery was not showing the rating stars !Fixed sorting inside main gallery categories. !Image quality fix for jpeg image thumbnails/medium sized images set to 100 instead of default of 75 for jpg RE: Medium-Size Image Quality / Scaling Issues - elizabeth - 02-15-2021 Thanks! Boy that is bananas. Should I leave it at PNG? And how the heck does SmugMug get around this? Alternatively, can I get the "non-medium," large images to scale themselves? RE: Medium-Size Image Quality / Scaling Issues - MyBBHacks - 02-15-2021 Check above did an update so no longer needed to do the file edit. |