Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Resizing of a png resulted in a much larger filesize using the gd2 library.
Proposed resolution
Two things helped reduce the filesize when resizing:
1) Discard transparency
2) Convert true color png image to a 256-color palette image
So I am proposing that we add these options to the imageapi admin form for the gd2 library, and then add this to the close/save method. Patch will be attached in first comment.
Comment | File | Size | Author |
---|---|---|---|
#1 | allow-admin-disable-transparency-convert-to-palette-1839778-1.patch | 1.72 KB | djbobbydrake |
Comments
Comment #1
djbobbydrake CreditAttribution: djbobbydrake commentedAttached is the patch.
Comment #2
djbobbydrake CreditAttribution: djbobbydrake commentedI was able to get this done without the patch by writing a custom action for a custom preset.