SDL_HINT_BMP...LEGACY_FORMAT(3)
π SDL_HINT_BMP_SAVE_LEGACY_FORMAT π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_HINT_BMP_SAVE_LEGACY_FORMAT β she's here to stop SDL from pulling out version 4 of the bitmap header when it's saving your BMPs. no cap.
β¨ NAME β¨
SDL_HINT_BMP_SAVE_LEGACY_FORMAT β prevent SDL from using version 4 of the bitmap header when saving BMPs. literally that's her whole job and she ate π
π SYNOPSIS π
#include <SDL3/SDL_hints.h>
#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
like, that's the include and that's the define, copy them exactly, no editing your faves π«Ά
π¦ DESCRIPTION π¦
so here's the tea β: the bitmap header version 4 is required for proper alpha channel support, and SDL will use it when it's required. that's just facts.
but should this not be desired β like, if you're out here not wanting that β this hint can force the use of the 40 byte header version which is supported everywhere. universal icon behaviour honestly π
the variable can be set to the following values:
"0"β surfaces with a colorkey or an alpha channel are saved to a 32-bit BMP file with an alpha mask. SDL will use the bitmap header version 4 and set the alpha mask accordingly. this is the default, bestie, she's the baseline β¨"1"β surfaces with a colorkey or an alpha channel are saved to a 32-bit BMP file without an alpha mask. the alpha channel data will be in the file, but applications are going to ignore it. like... the data is there, it's just getting ghosted π
this hint can be set anytime. no timing drama, no scheduling trauma, she's flexible π
π AVAILABILITY π
this hint is available since SDL 3.2.0. so if you're on something older... girl. upgrade. π
that's the whole vibe, bestie β go forth and save your BMPs however you like π
Simple Directmedia Layer Β· SDL 3.4.18 β mwah, love you, bye ππβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms