stbImageWrapper.h 611 B

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