Support image compression for bitmap tables
See original GitHub issuehttps://github.com/google/zopfli/blob/master/README.zopflipng can make images considerably smaller. Nice for shipping CBDT or sbix; currently our image files are very big. I suspect we might have excessively high quality as well. For example:
Listing table info for "build/NotoColorEmojiCompatTest-Regular.ttf":
tag checksum length offset
---- ---------- -------- --------
CBDT 0xBB8DA37D 30225326 3482756
CBLC 0x76F3F7E5 14828 33708084
COLR 0x6E5EB864 1089721 33722912
CPAL 0xC0B3EDC4 23530 34812636
GSUB 0x8BFC763D 26672 34836168
OS/2 0x43FEF87B 96 392
SVG 0x1E9C01BB 23859748 34862840
cmap 0xF9B4AED1 8214 78988
glyf 0xBF51858B 3238177 244148
head 0x2087B4EA 54 268
hhea 0x08B50431 36 324
hmtx 0x793A03E8 78498 488
loca 0x2C18967D 156944 87204
maxp 0x9C353564 32 360
name 0x20463653 396 3482328
post 0xFFB60033 32 3482724
Contrast with the Noto Emoji CBDT build:
Listing table info for "/usr/local/google/home/rsheeter/oss/noto-emoji/fonts/NotoColorEmoji.ttf":
tag checksum length offset
---- ---------- -------- --------
CBDT 0x8BF55200 9784376 15024
CBLC 0x7EB6271C 14836 9799400
GSUB 0xE04A3DE5 45382 9814236
OS/2 0x760467D7 96 344
cmap 0xAABC3BDB 2865 10780
head 0x146639B6 54 220
hhea 0x11640DAB 36 276
hmtx 0xD2F60000 10340 440
maxp 0x0ECE0039 32 312
name 0x7340A570 1344 13648
post 0xFB270084 32 14992
vhea 0x0E5E04CC 36 9859620
vmtx 0x13880000 7450 9859656
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Bitmap Compression - Win32 apps - Microsoft Learn
Windows supports formats for compressing bitmaps that define their colors with 8 or 4 bits-per-pixel. Compression reduces the disk and ...
Read more >Image File and Compression Formats for Use With Oracle ...
This appendix describes the image file and compression formats supported by ... that Oracle Multimedia supports BMPF, the Microsoft Windows bitmap format.
Read more >Bitmap Image File (BMP), Version 5 - Library of Congress
Although compression is supported, most BMP images are not compressed. Self-documentation, No support for embedded metadata.
Read more >Bitmap image compression method - Ricoh
The bitmap images to be printed using RTIFF must be coded using one of the following ... This tag is not included, or...
Read more >Bitmap Images
The bitmap format generally supports compression (either lossless or lossy). ... bitmaps are coded on 8 bits and the pixels are indexed on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding zopflipng to https://github.com/fonttools/py-zopfli/blob/master/src/zopflimodule.c seems pretty straightforward?
In addition to zopflipng, we should also look into integrating https://github.com/wanadev/imagequant-python, the python bindings to libimagequant, the library that powers pngquant utility used in noto-emoji to quantize PNGs. They already publish binary wheels to PyPI which helps us a lot. I think we also need something like Pillow to be able to read/write the PNGs.