diff options
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/pngread.hxx | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/include/vcl/pngread.hxx b/include/vcl/pngread.hxx index 8513a1a6c446..3954f5cba0ab 100644 --- a/include/vcl/pngread.hxx +++ b/include/vcl/pngread.hxx @@ -24,40 +24,38 @@ #include <vcl/bitmapex.hxx> #include <vector> - -// - PNGReader - - - namespace vcl { - class PNGReaderImpl; - class VCL_DLLPUBLIC PNGReader - { - PNGReaderImpl* mpImpl; +class PNGReaderImpl; - public: +class VCL_DLLPUBLIC PNGReader +{ + std::unique_ptr<PNGReaderImpl> mpImpl; - /* the PNG chunks are read within the c'tor, so the stream will - be positioned at the end of the PNG */ - explicit PNGReader( SvStream& rStm ); - ~PNGReader(); +public: - /* an empty preview size hint (=default) will read the whole image - */ - BitmapEx Read( const Size& i_rPreviewHint = Size() ); + /* the PNG chunks are read within the c'tor, so the stream will + be positioned at the end of the PNG */ + explicit PNGReader(SvStream& rStream); + ~PNGReader(); - // retrieve every chunk that resides inside the PNG - struct ChunkData - { - sal_uInt32 nType; - std::vector< sal_uInt8 > aData; - }; - const std::vector< ChunkData >& GetChunks() const; + /* an empty preview size hint (=default) will read the whole image + */ + BitmapEx Read(const Size& i_rPreviewHint = Size()); - void SetIgnoreGammaChunk( bool b ); + // retrieve every chunk that resides inside the PNG + struct ChunkData + { + sal_uInt32 nType; + std::vector<sal_uInt8> aData; }; -} + const std::vector<ChunkData>& GetChunks() const; + + void SetIgnoreGammaChunk(bool bIgnoreGammaChunk); +}; + +} // end namespace vcl #endif // INCLUDED_VCL_PNGREAD_HXX |