diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/osx/graphics/quartz/Convert.h | 1 | ||||
-rw-r--r-- | include/cru/osx/graphics/quartz/ImageFactory.h | 2 | ||||
-rw-r--r-- | include/cru/platform/graphics/ImageFactory.h | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/cru/osx/graphics/quartz/Convert.h b/include/cru/osx/graphics/quartz/Convert.h index 8d486069..be56b959 100644 --- a/include/cru/osx/graphics/quartz/Convert.h +++ b/include/cru/osx/graphics/quartz/Convert.h @@ -20,4 +20,5 @@ CGRect Convert(const Rect& rect); Rect Convert(const CGRect& rect); CGDataProviderRef ConvertStreamToCGDataProvider(io::Stream* stream); +CGDataConsumerRef ConvertStreamToCGDataConsumer(io::Stream* stream); } // namespace cru::platform::graphics::osx::quartz diff --git a/include/cru/osx/graphics/quartz/ImageFactory.h b/include/cru/osx/graphics/quartz/ImageFactory.h index 19e9c8c1..23d14332 100644 --- a/include/cru/osx/graphics/quartz/ImageFactory.h +++ b/include/cru/osx/graphics/quartz/ImageFactory.h @@ -15,6 +15,8 @@ class QuartzImageFactory : public OsxQuartzResource, public: std::unique_ptr<IImage> DecodeFromStream(io::Stream* stream) override; + void EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format, + float quality) override; std::unique_ptr<IImage> CreateBitmap(int width, int height) override; }; } // namespace cru::platform::graphics::osx::quartz diff --git a/include/cru/platform/graphics/ImageFactory.h b/include/cru/platform/graphics/ImageFactory.h index 2339a069..cd868087 100644 --- a/include/cru/platform/graphics/ImageFactory.h +++ b/include/cru/platform/graphics/ImageFactory.h @@ -3,7 +3,7 @@ #include "cru/common/io/Stream.h" namespace cru::platform::graphics { -enum class ImageFormat { Jpeg, Png }; +enum class ImageFormat { Jpeg, Png, Gif }; struct CRU_PLATFORM_GRAPHICS_API IImageFactory : public virtual IGraphicsResource { @@ -15,7 +15,7 @@ struct CRU_PLATFORM_GRAPHICS_API IImageFactory * \param stream The stream to write to. * \param format The format to encode to. * \param quality The quality to encode to. - * \todo Implement on macOS and Windows. + * \todo Implement on Windows. */ virtual void EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format, float quality) = 0; |