LibreOffice Module sd (master) 1
|
Compress a preview bitmap by reducing its resolution. More...
#include <SlsBitmapCompressor.hxx>
Classes | |
class | ResolutionReducedReplacement |
Store a scaled down bitmap together with the original size. More... | |
Public Member Functions | |
virtual | ~ResolutionReduction () |
virtual std::shared_ptr< BitmapReplacement > | Compress (const BitmapEx &rpBitmap) const override |
Compress the given bitmap into a replacement format that is specific to the compressor class. More... | |
virtual BitmapEx | Decompress (const BitmapReplacement &rBitmapData) const override |
Scale the replacement bitmap up to the original size. More... | |
virtual bool | IsLossless () const override |
Return whether the compression and decompression is lossless. More... | |
virtual std::shared_ptr< BitmapReplacement > | Compress (const BitmapEx &rBitmap) const =0 |
Compress the given bitmap into a replacement format that is specific to the compressor class. More... | |
virtual BitmapEx | Decompress (const BitmapReplacement &rBitmapData) const =0 |
Decompress the given replacement data into a preview bitmap. More... | |
virtual bool | IsLossless () const =0 |
Return whether the compression and decompression is lossless. More... | |
Static Private Attributes | |
static const sal_Int32 | mnWidth = 100 |
Additional Inherited Members | |
![]() | |
~BitmapCompressor () | |
Compress a preview bitmap by reducing its resolution.
While the aspect ratio is maintained the horizontal resolution is scaled down to 100 pixels. This compressor is not lossless.
Definition at line 108 of file SlsBitmapCompressor.hxx.
|
inlinevirtual |
Definition at line 114 of file SlsBitmapCompressor.hxx.
|
overridevirtual |
Compress the given bitmap into a replacement format that is specific to the compressor class.
Implements sd::slidesorter::cache::BitmapCompressor.
Definition at line 102 of file SlsBitmapCompressor.cxx.
References BitmapEx::GetSizePixel(), Size::Height(), mnWidth, and Size::Width().
|
overridevirtual |
Scale the replacement bitmap up to the original size.
Implements sd::slidesorter::cache::BitmapCompressor.
Definition at line 118 of file SlsBitmapCompressor.cxx.
References mnWidth, pData, and BitmapEx::Scale().
|
overridevirtual |
Return whether the compression and decompression is lossless.
This value is used by the caller of Decompress() to decide whether to use the returned bitmap as is or if a new preview has to be created.
Implements sd::slidesorter::cache::BitmapCompressor.
Definition at line 135 of file SlsBitmapCompressor.cxx.
|
staticprivate |
Definition at line 111 of file SlsBitmapCompressor.hxx.
Referenced by Compress(), and Decompress().