[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 15:01:13 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 siliconforks):

 Replying to [comment:75 SirLouen]:
 > If its not simply fine, to stick to 256 for quantization, as most
 Indexed images don't have more than 256 colors.

 I think an indexed PNG can't possibly contain more than 256 colors,
 because that number is defined in the PNG specification, isn't it?

 https://libpng.org/pub/png/spec/1.2/PNG-Introduction.html
 https://libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.PLTE

 I would think it would be fine to call `quantizeImage( 256, ... )` with
 the number 256 just a hard-coded fixed value, unless someone knows of an
 image where that doesn't work well for some reason...?

 Keep in mind - even if you start with an image with only 8 colors, it will
 probably have more colors than that after you resize the image.

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


More information about the wp-trac mailing list