diff --git a/lib/include/cuttlefish/Image.h b/lib/include/cuttlefish/Image.h index 0caf145..0e86cad 100644 --- a/lib/include/cuttlefish/Image.h +++ b/lib/include/cuttlefish/Image.h @@ -122,7 +122,7 @@ class CUTTLEFISH_EXPORT Image * @param colorSpace The color space of the image. * @remark The image will be invalid if it failed to load. */ - Image(const std::uint8_t* data, std::size_t size, ColorSpace colorSpace = ColorSpace::Linear); + Image(const void* data, std::size_t size, ColorSpace colorSpace = ColorSpace::Linear); /** * @brief Initializes an empty image. @@ -169,8 +169,7 @@ class CUTTLEFISH_EXPORT Image * @param colorSpace The color space of the image. * @return False if the image couldn't be loaded. */ - bool load(const std::uint8_t* data, std::size_t size, - ColorSpace colorSpace = ColorSpace::Linear); + bool load(const void* data, std::size_t size, ColorSpace colorSpace = ColorSpace::Linear); /** * @brief Saves an image to a file. diff --git a/lib/src/Image.cpp b/lib/src/Image.cpp index 5994478..c4e4016 100644 --- a/lib/src/Image.cpp +++ b/lib/src/Image.cpp @@ -539,7 +539,7 @@ Image::Image(const char* fileName, ColorSpace colorSpace) load(fileName, colorSpace); } -Image::Image(const std::uint8_t* data, std::size_t size, ColorSpace colorSpace) +Image::Image(const void* data, std::size_t size, ColorSpace colorSpace) : Image() { load(data, size, colorSpace); @@ -621,7 +621,7 @@ bool Image::load(const char* fileName, ColorSpace colorSpace) return m_impl != nullptr; } -bool Image::load(const std::uint8_t* data, std::size_t size, ColorSpace colorSpace) +bool Image::load(const void* data, std::size_t size, ColorSpace colorSpace) { reset();