LibreOffice Module sd (master) 1
|
This interface class provides the minimal method set for classes that implement the compression and decompression of preview bitmaps. More...
#include <SlsBitmapCompressor.hxx>
Public Member Functions | |
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... | |
Protected Member Functions | |
~BitmapCompressor () | |
This interface class provides the minimal method set for classes that implement the compression and decompression of preview bitmaps.
Definition at line 34 of file SlsBitmapCompressor.hxx.
|
inlineprotected |
Definition at line 58 of file SlsBitmapCompressor.hxx.
|
pure virtual |
Compress the given bitmap into a replacement format that is specific to the compressor class.
Implemented in sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::PngCompression, sd::slidesorter::cache::NoBitmapCompression, and sd::slidesorter::cache::ResolutionReduction.
|
pure virtual |
Decompress the given replacement data into a preview bitmap.
Depending on the compression technique the returned bitmap may differ from the original bitmap given to the Compress() method. It may even of the wrong size or empty or the NULL pointer. It is the task of the caller to create a new preview bitmap if the returned one is not as desired.
Implemented in sd::slidesorter::cache::NoBitmapCompression, sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::ResolutionReduction, and sd::slidesorter::cache::PngCompression.
|
pure virtual |
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.
Implemented in sd::slidesorter::cache::NoBitmapCompression, sd::slidesorter::cache::CompressionByDeletion, sd::slidesorter::cache::ResolutionReduction, and sd::slidesorter::cache::PngCompression.