stb: exposed error messages
This commit is contained in:
@@ -31,24 +31,24 @@
|
||||
|
||||
namespace Image::STB
|
||||
{
|
||||
class RawImage : public IRawImage
|
||||
{
|
||||
public:
|
||||
RawImage(const std::byte* encodedData, std::size_t encodedDataSize);
|
||||
RawImage(const std::filesystem::path& path);
|
||||
class RawImage : public IRawImage
|
||||
{
|
||||
public:
|
||||
RawImage(const std::byte* encodedData, std::size_t encodedDataSize);
|
||||
RawImage(const std::filesystem::path& path);
|
||||
|
||||
void resize(ImageSize width) override;
|
||||
std::unique_ptr<IEncodedImage> encodeToJPEG(unsigned quality) const override;
|
||||
void resize(ImageSize width) override;
|
||||
std::unique_ptr<IEncodedImage> encodeToJPEG(unsigned quality) const override;
|
||||
|
||||
ImageSize getWidth() const;
|
||||
ImageSize getHeight() const;
|
||||
const std::byte* getData() const;
|
||||
ImageSize getWidth() const;
|
||||
ImageSize getHeight() const;
|
||||
const std::byte* getData() const;
|
||||
|
||||
private:
|
||||
int _width;
|
||||
int _height;
|
||||
using UniquePtrFree = std::unique_ptr<unsigned char, decltype(&std::free)>;
|
||||
UniquePtrFree _data {nullptr, std::free};
|
||||
};
|
||||
private:
|
||||
int _width;
|
||||
int _height;
|
||||
using UniquePtrFree = std::unique_ptr<unsigned char, decltype(&std::free)>;
|
||||
UniquePtrFree _data{ nullptr, std::free };
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user