icetImageNull(3)

πŸ’– icetImageNull(3) β€” IceT Reference πŸ’–

okay bestie, gather round, because we're talking about icetImageNull β€” the little function that hands you a placeholder for an empty image, and honestly? she's serving "nothing" in the most useful way possible. 🫢


✨ NAME ✨

icetImageNull β€” retrieve a placeholder for an empty image. that's it, that's the whole job. iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <IceT.h>

IceTImage icetImageNull(   void   );

yes, void in, IceTImage out. no args, no notes, no drama. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: images get created internally by the IceT library. you don't make them yourself. but sometimes it's genuinely convenient to have a placeholder for a "null" image β€” and a null image is one that does not and cannot hold data. like, it's not just empty, bestie, it's structurally incapable of holding pixels. and the best part? null images require no allocated memory to function. zero. none. free. πŸŽ€

now, if your code has the potential of using an IceTImage image object that might not otherwise be initialized β€” you know the vibe, that uninitialized variable lurking in the corner 😭 β€” use icetImageNull to set it to a null object. this will ensure that IceT image functions that operate on it will behave deterministically. no chaos, no mystery behavior, just predictable slay. ✨

a null image simply looks like an image with no pixels and has no color buffers. and here's what that means in practice:

  • icetImageGetWidth, icetImageGetHeight, and icetImageGetNumPixels all return 0 for a null image.
  • icetSetColorFormat and icetSetDepthFormat return ICET_IMAGE_COLOR_NONE and ICET_IMAGE_DEPTH_NONE, respectively.

and if you ever need to check whether the image you're holding is one of these little ghosts, you can identify a null image with the icetImageIsNull function. vibe check complete. πŸ”


πŸ’œ RETURN VALUE πŸ’œ

a null image object. 🫧


🌈 ERRORS 🌈

none. not a single one. flawless behavior only. 😌


⭐ WARNINGS ⭐

none. no red flags here, she's safe. πŸ’–


πŸ’€ BUGS πŸ’€

none known. (known being the key word, bestie β€” but the docs say we're good. πŸ™ˆ)


Copyright (C)2010 Sandia Corporation

Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This source code is released under the New BSD License.


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie!! this was written for the IceT Reference, and the version we're looking at is dated September 20, 2010 β€” a true vintage icon, still eating after all these years. mwah, go forth and initialize your images responsibly πŸ’…βœ¨