Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimise bitmap mini/bmp.bmp #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Minimise bitmap mini/bmp.bmp
Smashed the 334 bytes original down to a slim 60 bytes, by hand crafting a v1.x BMP file.

All versions of the BMP format begin with a basic 14 byte file header.
Next is the secondary DIB header; 12 bytes is the smallest possible (IBM OS/2 – v1.x BMP files).

Avoiding the more ‘advanced’ / modern bitmap file formats has a big impact for small files, while still widely supported and well documented.

Sources:
http://www.fileformat.info/format/os2bmp/egff.htm
http://www.fileformat.info/format/bmp/egff.htm
http://en.wikipedia.org/wiki/BMP_file_format
https://msdn.microsoft.com/en-us/library/dd183372(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/dd183374(v=vs.85).aspx
  • Loading branch information
ace-dent committed May 17, 2021
commit 75f8ee4175af8a5e1fa5d29c3c0e7ffaecab1d8e
Binary file modified mini/bmp.bmp
Binary file not shown.