[wp-trac] [WordPress Trac] #63448: Image quality significantly degrades for resized PNGs with transparency in WordPress 6.8.1

WordPress Trac noreply at wordpress.org
Wed May 28 13:57:22 UTC 2025


#63448: Image quality significantly degrades for resized PNGs with transparency in
WordPress 6.8.1
-------------------------------------------------+-------------------------
 Reporter:  elvismdev                            |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.8.2
Component:  Media                                |     Version:  6.8
 Severity:  critical                             |  Resolution:
 Keywords:  has-patch has-test-info dev-         |     Focuses:
  feedback has-unit-tests commit fixed-major     |
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Following [https://core.trac.wordpress.org/ticket/63481#comment:9 from the
 last comment] from @siliconforks

 > This is the result I got:

 > Size: 505955
 > Elapsed time: 0.526
 > Size (quantizeImage): 185245
 > Elapsed time: 0.558
 > Size (getImageColors): 185245
 > Elapsed time: 10.328

 As I commented, I'm wondering two things:

 1. If there is a way to ask `getImageColors` to stop once it finds a
 number of colors during the histogram creation. I doubt there is an
 alternative for this, but it would significantly reduce the operation time
 for most cases.

 2. If its not simply fine, to stick to 256 for quantization, as most
 Indexed images don't have more than 256 colors. How much impactful is to
 quantize an 8 color image with a 256 fixed-set parameter?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63448#comment:75>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list