stbImageWrapper.h 580 B

12345678910111213141516171819
  1. 
  2. #ifndef DFPSR_API_IMAGE_STB_WRAPPER
  3. #define DFPSR_API_IMAGE_STB_WRAPPER
  4. #include "../../image/Image.h"
  5. #include "../../api/stringAPI.h"
  6. namespace dsr {
  7. OrderedImageRgbaU8 image_stb_decode_RgbaU8(SafePointer<const uint8_t> data, int size);
  8. // Pre-conditions:
  9. // * The image must be packed in RGBA order at runtime, but can't be in the OrderedImageRgbaU8 format because Ordered inherits from Aligned.
  10. // * Only the PNG format may use padding in this call.
  11. Buffer image_stb_encode(const ImageRgbaU8 &image, ImageFileFormat format, int quality);
  12. }
  13. #endif