diff options
| author | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
|---|---|---|
| committer | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
| commit | 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 (patch) | |
| tree | 46f3701832d70b420eb0fc0eb93261f9da45db3f /print/XpsRasFilter/src/BitmapHandler.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'print/XpsRasFilter/src/BitmapHandler.h')
| -rw-r--r-- | print/XpsRasFilter/src/BitmapHandler.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/print/XpsRasFilter/src/BitmapHandler.h b/print/XpsRasFilter/src/BitmapHandler.h new file mode 100644 index 00000000..3f78dc30 --- /dev/null +++ b/print/XpsRasFilter/src/BitmapHandler.h @@ -0,0 +1,64 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright (c) Microsoft Corporation. All rights reserved +// +// File Name: +// +// BitmapHandler.h +// +// Abstract: +// +// Abstract class that encapsulates the processing done to each +// individual band bitmap, as well as the concrete implemention +// that streams the bands as Tiffs to the output stream. +// + +#pragma once + +namespace xpsrasfilter +{ + +class TiffStreamBitmapHandler +{ +public: + + static + TiffStreamBitmapHandler_t + CreateTiffStreamBitmapHandler( + const IPrintWriteStream_t &pStream + ); + + void + ProcessBitmap( + const IWICBitmap_t &bitmap + ); + + void + WriteFooter(); + +private: + IWICImagingFactory_t m_pWICFactory; + IPrintWriteStream_t m_pWriter; // output stream + + // + // Members to keep track of where each Tiff + // starts in the output stream + // + ULONGLONG m_nextTiffStart; + ULONGLONG m_numTiffs; + std::vector<ULONGLONG> m_tiffStarts; + + // + // Constructor is private; use CreateTiffStreamBitmapHandler + // to create instances + // + TiffStreamBitmapHandler( + const IWICImagingFactory_t &pWICFactory, + const IPrintWriteStream_t &pStream + ); +}; + +} // namespace xpsrasfilter |
