IMG_SaveBMP(3)
πΎ IMG_SaveBMP(3) πΎ
okay bestie, welcome to the SDL_image3 corner of the man pages β this one's called IMG_SaveBMP, and it's literally just "put this surface in a BMP file, go off". β¨
πΈ NAME πΈ
IMG_SaveBMP β save an SDL_Surface into a BMP image file. that's it, that's the whole job. π
π SYNOPSIS π
#include <SDL3_image/SDL_image.h>
bool IMG_SaveBMP(SDL_Surface *surface, const char *file);
π¦ DESCRIPTION π¦
you hand it a surface, you hand it a path, it writes a BMP. no cap.
and listen β if the file already exists, it gets overwritten. like, no "are you sure?", no little prompt asking if you meant it. it's giving "main character energy" and it's just gonna replace whatever was there. so maybe double check that filename, bestie. π
β¨ FUNCTION PARAMETERS β¨
surfaceβ theSDL_Surfaceyou wanna save. your little pixel baby. π«Άfileβ the path on the filesystem to write the new file to. where it's gonna live. π
π RETURN VALUE π
returns true on success or false on failure. and if it fails? call SDL_GetError() for more information β that's where the tea is. β
β AVAILABILITY β
this function is available since SDL_image 3.4.0. so if you're on something older... nope, not there yet, sorry. π
π SEE ALSO π
IMG_SaveBMP_IO(3)β same vibe, but with anSDL_IOStreaminstead of a filename. iykyk. π
tiny reminder from your favorite unix girlie: overwriting is real and it is permanent. check twice, save once. π
and that's the page!! π this one came to you from SDL_image, version SDL_image 3.4.8, filed under SDL_image in the IMG_SaveBMP(3) slot. mwah, go save some bitmaps, bestie. πππ¦πΈ
π¦ where this page comes from
- fedora 43: SDL3_image-devel 3.4.8-1.fc43 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 43: SDL3_image-devel 3.4.8-1.fc43 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 44: SDL3_image-devel 3.4.8-1.fc44 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 44: SDL3_image-devel 3.4.8-1.fc44 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms