ImageLoader(3)

πŸ“¦ version 0.1.0, in fedora 43, fedora 44

πŸ’– ImageLoader(3) πŸ’–

okay so bestie, welcome to the Library Functions Manual entry for ImageLoader β€” she's an abstract class and she's the blueprint energy of the whole squad, no cap. πŸ¦‹


✨ NAME ✨

ImageLoader β€” this is an abstract class that defines the interface of all image loaders. she doesn't do the work herself, she just tells everyone else what work needs doing. main character energy fr. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <SILLYImageLoader.h>

Inherited by JPGImageLoader, PNGImageLoader, and TGAImageLoader. the girls are all her daughters πŸ’…

🌈 Public Member Functions 🌈

  • void destroyContext (ImageContext *context) β€” Destroy the image context. bye bye context 🫢
  • const char * getIdentifierString () const β€” Return the name of the loader. like a name tag but for a class ✨
  • virtual ImageContext * loadHeader (PixelFormat &formatSource, DataSource *data)=0 β€” Parse the header of the image and fill the header struct. (pure virtual, so she's not doing it herself β€” her kids have to πŸ‘€)
  • virtual bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context)=0 β€” Parse the pixels data of the image and fill the header struct. also pure virtual, also a group project 😭
  • virtual ~ImageLoader () β€” Destructor. she's logging off, respectfully πŸ’€

πŸŽ€ Protected Member Functions πŸŽ€

  • ImageLoader (const char *name) β€” Constructor. protected, so only the family gets to call it πŸ”’

🧚 Detailed Description 🧚

This is an abstract class that define the interface of all image loader.

In order to add support for new image format one have to inherits this class and implement all required function. that's it, that's the whole vibe check β€” inherit and implement, periodt. πŸ’…

Definition at line 46 of file SILLYImageLoader.h.

⭐ Member Function Documentation ⭐

πŸ’œ void destroyContext (ImageContext * context)

Destroy the image context. literally just clean up after yourself bestie, it's giving basic hygiene 🧼

Parameters

  • context β€” a pointer to the context
Definition at line 47 of file SILLYImageLoader.cpp.

πŸ¦‹ virtual ImageContext * loadHeader (PixelFormat & formatSource, DataSource * data) [pure virtual]

Parse the header of the image and fill the header struct. this is the little sneak peek before the whole picture shows up, iykyk πŸ‘€

Parameters

  • formatSource β€” this var should contains the pixel format used to store the image initialy
  • data β€” the input of the image data

Returns

  • Context for the rest of the parsing or 0 if an error occured

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader. all three of them ate πŸ”₯


🌸 virtual bool loadImageData (PixelOrigin origin, DataSource * data, ImageContext * context) [pure virtual]

Parse the pixels data of the image and fill the header struct. this is the actual pixels, the moment we've all been waiting for ✨

Parameters

  • origin β€” the layout of the pixel in the resulting pixel array
  • data β€” the input of the image data
  • context β€” the data associated to the image parsing

Returns

  • true on success false on error

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader. iconic behavior from all of them πŸ’–


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Simple Image Loading LibrarY from the source code. not a human wrote this, a robot did, and honestly? she slayed. πŸ€–πŸ’…


okay that's the whole page, bestie πŸŽ€ β€” and just so you know, this was the ImageLoader(3) page from Simple Image Loading LibrarY, Version 0.1.0, so go forth and inherit responsibly. mwah πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from