PaletteExpander.h#

Parent directory (textureio)

Internally used by some texture readers.

Includes#

  • cstdint

Namespaces#

Classes#

Source Code#

#pragma once

#include <cstdint>

namespace pvr {
class PaletteExpander
{
public:
    PaletteExpander(const uint8_t* paletteData, uint32_t paletteSize, uint32_t bytesPerEntry);

    void getColorFromIndex(uint32_t index, unsigned char* outputData) const;

private:
    const uint8_t* _paletteData;
    const uint32_t _paletteSize;
    const uint32_t _bytesPerEntry;

    // Declare this as private to avoid warnings - the compiler can't generate it because of the const members
    const PaletteExpander& operator=(const PaletteExpander&);
};
} // namespace pvr