4#include "../renderable.hpp"
5#include <initializer_list>
40 static bool hasSequence(uint8_t *
const bytes,
size_t length,
const std::initializer_list<uint8_t> &&sequence,
size_t index);
69 unsigned int getInt(
size_t index, uint8_t count)
const;
77 unsigned int getIntLE(
size_t index, uint8_t count)
const;
The common interface for images read from raw data.
Definition image_file.hpp:23
static ImageType getType(uint8_t *const bytes, size_t length)
Determine the image type based on the file data.
ImageFile(uint8_t *const bytes, size_t length)
Constructor.
uint8_t *const bytes
The buffer that the image data is stored in.
Definition image_file.hpp:48
unsigned int getInt(size_t index, uint8_t count) const
Read a big-endian integer from raw bytes.
size_t length
The size of the data buffer.
Definition image_file.hpp:53
unsigned int getIntLE(size_t index, uint8_t count) const
Read a little-endian integer from raw bytes.
static bool hasSequence(uint8_t *const bytes, size_t length, const std::initializer_list< uint8_t > &&sequence, size_t index)
Check if a buffer contains a specific sequence of bytes at the given index.
An abstract interface for arbitrary renderable objects.
Definition renderable.hpp:55