[wp-trac] [WordPress Trac] #30402: WordPress does not respect the bit-depth of the original image when resizing
WordPress Trac
noreply at wordpress.org
Thu Feb 25 06:05:26 UTC 2016
#30402: WordPress does not respect the bit-depth of the original image when
resizing
--------------------------+------------------------------
Reporter: qdinar | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.9.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Comment (by qdinar):
{{{
// Limit the bit depth of resized images to 8 bits per channel.
if ( 8 < $this->image->getImageDepth() ) {
$this->image->setImageDepth( 8 );
}
}}}
without additional conditions - it is in try {} in function
thumbnail_image {} - i think this is probably not very well because
probably jpeg resizes to jpeg with 24 bit rgb image, and only indexed
images should be resized to indexed images. but i do not know and think
probably setImageDepth ( 8 ) sets 8 bit indexed image. anyway , 8 bit is
probably too small for jpeg or not supported, and, if it is 8 bit rgb
image, it is also not optimal, probably 8 bit indexed image is better,
because it can better fit needed colors.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30402#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list