IMG_GetClipboardImage(3)

πŸ“¦
version 3.4.8 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– IMG_GetClipboardImage πŸ’–

okay bestie, welcome to the SDL_image3 FUNCTIONS section of the manual, and today's main character is IMG_GetClipboardImage β€” she grabs whatever image is chillin' in the clipboard rn. no cap, that's the whole plot πŸŽ€


✨ NAME ✨

IMG_GetClipboardImage β€” Get the image currently in the clipboard.

like, the clipboard. the one you just copied a picture into. yeah that one πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3_image/SDL_image.h>

SDL_Surface * IMG_GetClipboardImage(void);

she takes no arguments. zero. void. she simply is πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: when you're done with the surface she hands you, your app should dispose of it by calling SDL_DestroySurface().

fr fr, don't just leave it lying around β€” that's giving memory leak energy and we do not stan πŸ™ˆ clean up after yourself, bestie.


⭐ RETURN VALUE ⭐

she returns a new SDL_Surface, or NULL if no supported image is available.

so if you get NULL, it's not you, it's the clipboard β€” there was just nothing she could work with 😭


🌈 AVAILABILITY 🌈

this function is available since SDL_image 3.4.0. so if you're on something older... girl. upgrade. periodt πŸ‘‘


okay that's the whole page, you ate it, I'm obsessed 🫢 go forth and paste images responsibly πŸ’œ

this has been your girl from SDL_image, version 3.4.8 β€” signing off, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from