diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-04-07 19:00:32 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-05-22 12:17:11 +0200 |
commit | 6e00acca4ffe130f41d19313e5b310ae6da6358d (patch) | |
tree | 2d73621ebc56e44f195420214103918b173a8e1c /vcl | |
parent | 825ca67423eef8567edbc938fc8b65dab45781a9 (diff) |
svx: support importing PDF images
Change-Id: Id4524a30b8f9fa4228c4acb4bf8714700da3017c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index d22c61276813..8e803ab448d2 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1795,6 +1795,22 @@ bool ReadDIBV5( return ImplReadDIB(rTarget, &rTargetAlpha, rIStm, true); } +bool ReadRawDIB( + Bitmap& rTarget, + const unsigned char* pBuf, + const ScanlineFormat nFormat, + const int nHeight, + const int nStride) +{ + Bitmap::ScopedWriteAccess pWriteAccess(rTarget.AcquireWriteAccess(), rTarget); + for (int nRow = 0; nRow < nHeight; ++nRow) + { + pWriteAccess->CopyScanline(nRow, pBuf + (nStride * nRow), nFormat, nStride); + } + + return true; +} + bool WriteDIB( const Bitmap& rSource, SvStream& rOStm, |