summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/dibtools.cxx
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-04-07 19:00:32 -0400
committerJan Holesovsky <kendy@collabora.com>2018-06-07 10:45:19 +0200
commit6e1b091f29791a6716d3e43af2fe5e2debbc02f8 (patch)
treed458ef0bdba69909f659f6bad2d9431a95e635b0 /vcl/source/gdi/dibtools.cxx
parentddb881e2cc9d8f5d17ccb133d2e8a1b6203d04c3 (diff)
svx: support importing PDF images
Change-Id: Id4524a30b8f9fa4228c4acb4bf8714700da3017c
Diffstat (limited to 'vcl/source/gdi/dibtools.cxx')
-rw-r--r--vcl/source/gdi/dibtools.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 75f0c08d3bf2..f3a5456d2c93 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1821,6 +1821,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)
+{
+ BitmapScopedWriteAccess 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,