Skip to Content Skip to Menu

CB gallery image quality could be better

  • jhaines
  • jhaines
  • ONLINE
  • Posts: 21
  • Thanks: 2
  • Karma: 1
1 day 14 hours ago #339924 by jhaines
CB gallery image quality isn't great. It doesn't seem to be related to the uploaded images or stored resolution. I guess it's a compression problem.

The left-hand image shown below is the original whilst the right-hand has been uploaded to CB gallery (through groups) and subsequently downloaded using the gallery button. The pixelation in the right-hand image is very evident. Although I've expanded the images here to see clearly what's happening, the pixelation is definitely quite visible when displayed within CB gallery.

 

These are the gallery settings used for upload of the trial image above.
 

Is there any way to configure improved image quality, presumably at the expense of file size / speed?

Joomla! 5.2.1 Stable [ Uthabiti ] 7-November-2024 17:00 GMT
CB: 2.9.3+build.2024.11.13.16.05.36.66aec4952
CBGropJive: 3.6.0

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48662
  • Thanks: 8310
  • Karma: 1446
1 day 6 hours ago #339929 by krileon
Replied by krileon on topic CB gallery image quality could be better
Is that the thumbnail or full size image you're comparing to? Try turning off client size resizing and see if that improves it. If it doesn't you'll need to adjust your max height/width parameters as the image is being shrunk too much resulting in pixelation. You're not going to get photoshop quality resizing so expect some image loss.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jhaines
  • jhaines
  • ONLINE
  • Posts: 21
  • Thanks: 2
  • Karma: 1
23 hours 20 minutes ago #339945 by jhaines
Replied by jhaines on topic CB gallery image quality could be better
The original image is 3000 x 4000px as shown here:
 

The downloaded image is 810 x 1080px, matching the configured maximum size configured after upload.
 

The pixelated image shown in my first posting is not the thumbnail, it's the resized downloaded image, ie. CB gallery stored quality.

I'll try turning off resampling and resizing now to see what happens.

Please Log in or Create an account to join the conversation.

  • jhaines
  • jhaines
  • ONLINE
  • Posts: 21
  • Thanks: 2
  • Karma: 1
22 hours 26 minutes ago #339946 by jhaines
Replied by jhaines on topic CB gallery image quality could be better
Here's the same picture comparison, original on the left, download on the right after upload with resizing turned off. In comparison to same in my original posting, the image quality is clearly much improved for the same resolution, but there are still compression artifacts present. There must still be some resizing happening on the server. Is it possible to adjust the settings there to improve quality?
 

I did the same thing again with both resizing and resampling turned off. I couldn't see any different in the picture versus resampling turned on. Interestingly, the file size on the disk is actually smaller with resizing turned off than it is with it enabled! So it looks like the only drawback is the initial upload size when client-side resizing is off.

With resizing and resampling: filesize 157982, quality poor
Without resampling, without resizing:127970, quality much better
Without either resample or resizing:127970, quality much better (as above)

I haven't figured out what the resampling option is actually doing. I can't see any effect on picture quality or file size. Perhaps you could let me know please?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48662
  • Thanks: 8310
  • Karma: 1446
6 hours 27 minutes ago #339948 by krileon
Replied by krileon on topic CB gallery image quality could be better
Resampling results in the image being processed and compressed even if the image is smaller than the size limits. It will always resize and resample the image if it's larger than the size limits so there is no truly turning off resampling. You are always going to get some degree of artifacts when it resamples as you're effectively shrinking and deleting pixels. If you want clearer images then you need to use software designed for this when uploading large images like photoshop as it has a significantly better compression algorithm than PHPs built in image processing. I will review the compression settings, but there is likely no room for improvement here other than adding smoothing, which would just blur some pixels.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48662
  • Thanks: 8310
  • Karma: 1446
6 hours 2 minutes ago #339950 by krileon
Replied by krileon on topic CB gallery image quality could be better
Ok, tested the compression and the compression is fine. It's just a lack of smoothing, which may or may not result in some images being blurry. Since this needs to be install by install based will review adding an option to turn smoothing on. We also support ImageMagik so if installed on your server you can enable it within CB > Configuration > Images for better server side compression.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum