summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-04-09 22:16:05 -0400
committerJan Holesovsky <kendy@collabora.com>2018-06-07 10:45:22 +0200
commit3b292a6df013135a9485619acdea15062b4002e7 (patch)
tree46456014cd01c263cac5c1aab82499b42a7cee65 /svx/source
parentddbecd021e1a9722362f401084acad2bdc6a0da1 (diff)
svx: import PDF images as BGRA
This makes it trivial to support all sort of odd bit-format and 8-bit paletted images. Change-Id: I4555794eccd0ee2906f9a39bd93957ad3775432c
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdpdf.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index b90d8c700143..937e2eaf90e4 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1160,7 +1160,7 @@ void ImpSdrPdfImport::MapScaling()
void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject)
{
SAL_WARN("sd.filter", "Got page object IMAGE");
- std::unique_ptr<void, FPDFBitmapDeleter> bitmap(FPDFImageObj_GetBitmap(pPageObject));
+ std::unique_ptr<void, FPDFBitmapDeleter> bitmap(FPDFImageObj_GetBitmapBgra(pPageObject));
if (!bitmap)
{
SAL_WARN("sd.filter", "Failed to get IMAGE");
@@ -1199,7 +1199,7 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject)
SAL_WARN("sd.filter", "Got IMAGE width: " << nWidth << ", height: " << nHeight
<< ", stride: " << nStride
<< ", format: BGRx");
- ReadRawDIB(aBitmap, pBuf, ScanlineFormat::N32BitTcBgra, nHeight, nStride);
+ ReadRawDIB(aBitmap, pBuf, ScanlineFormat::N32BitTcRgba, nHeight, nStride);
break;
case FPDFBitmap_BGRA:
SAL_WARN("sd.filter", "Got IMAGE width: " << nWidth << ", height: " << nHeight