diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-08 16:52:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-08 19:20:40 +0200 |
commit | e8a05109d91bb9e82fcec5204514766f4bdbbee8 (patch) | |
tree | 76009a4aa599708ce4a7d07252d52f789249fe8d | |
parent | b88103c74293dd6d3cfa83639a8a4eab644905a1 (diff) |
vcl: split jpeg import into two parts
Split the import into two:
1) Just create the bitmap, this part is not thread-safe (e.g.
OpenGLContext::makeCurrent() is called when OpenGL is enabled).
2) Import the image into an existing bitmap.
The point is that the second part takes much more time than the first,
and in the future that part may be executed on a thread, while without
such a split the whole ImportJPEG() can't do that. For now
GraphicFilter::ImportGraphic() simply invokes the two parts after each
other, so no real functional changes yet.
Change-Id: Iee742a2cd3c581aeaf1a1ed9f55cd543955a85e0
Reviewed-on: https://gerrit.libreoffice.org/37397
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | include/vcl/bitmapex.hxx | 2 | ||||
-rw-r--r-- | include/vcl/graph.hxx | 2 | ||||
-rw-r--r-- | include/vcl/graphicfilter.hxx | 6 | ||||
-rw-r--r-- | vcl/inc/impgraph.hxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 13 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.cxx | 44 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.hxx | 13 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.h | 5 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.hxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.cxx | 24 | ||||
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 5 | ||||
-rw-r--r-- | vcl/workben/fftester.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/jpgfuzzer.cxx | 2 |
16 files changed, 101 insertions, 38 deletions
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index d7bedddb8606..58395fe7d0e4 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -71,6 +71,8 @@ public: TransparentType GetTransparentType() const { return eTransparent; } Bitmap GetBitmap( const Color* pTransReplaceColor = nullptr ) const; + /// Gives direct access to the contained bitmap. + const Bitmap& GetBitmapRef() const; Bitmap GetMask() const; bool IsAlpha() const; diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index 8509670dca41..8dcf5925f87f 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -147,6 +147,8 @@ public: // before. Bitmap GetBitmap(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; BitmapEx GetBitmapEx(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; + /// Gives direct access to the contained BitmapEx. + const BitmapEx& GetBitmapExRef() const; Animation GetAnimation() const; const GDIMetaFile& GetGDIMetaFile() const; diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index c0bbb3d62a77..8b8a7cef3008 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -56,10 +56,14 @@ enum class GraphicFilterImportFlags DontSetLogsizeForJpeg = 0x002, ForPreview = 0x004, AllowPartialStreamRead = 0x010, + /// Only create a bitmap, do not read pixel data. + OnlyCreateBitmap = 0x020, + /// Read pixel data into an existing bitmap. + UseExistingBitmap = 0x040, }; namespace o3tl { - template<> struct typed_flags<GraphicFilterImportFlags> : is_typed_flags<GraphicFilterImportFlags, 0x0017> {}; + template<> struct typed_flags<GraphicFilterImportFlags> : is_typed_flags<GraphicFilterImportFlags, 0x0077> {}; } #define IMP_BMP "SVBMP" diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 574a907346b5..6260a62e874e 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -85,6 +85,8 @@ private: Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; + /// Gives direct access to the contained BitmapEx. + const BitmapEx& ImplGetBitmapExRef() const; Animation ImplGetAnimation() const; const GDIMetaFile& ImplGetGDIMetaFile() const; diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 274126dd920a..1638ae023eb9 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1493,10 +1493,19 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat if( !( nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg ) ) nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg; - if( !ImportJPEG( rIStream, rGraphic, nImportFlags ) ) + sal_uInt64 nPosition = rIStream.Tell(); + if( !ImportJPEG( rIStream, rGraphic, nImportFlags | GraphicFilterImportFlags::OnlyCreateBitmap, nullptr ) ) nStatus = GRFILTER_FILTERERROR; else - eLinkType = GfxLinkType::NativeJpg; + { + Bitmap& rBitmap = const_cast<Bitmap&>(rGraphic.GetBitmapExRef().GetBitmapRef()); + Bitmap::ScopedWriteAccess pWriteAccess(rBitmap); + rIStream.Seek(nPosition); + if( !ImportJPEG( rIStream, rGraphic, nImportFlags | GraphicFilterImportFlags::UseExistingBitmap, &pWriteAccess ) ) + nStatus = GRFILTER_FILTERERROR; + else + eLinkType = GfxLinkType::NativeJpg; + } } else if( aFilterName.equalsIgnoreAsciiCase( IMP_SVG ) ) { diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index b7136d6442c2..014cdfd5d772 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -161,13 +161,19 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input) source->pub.next_input_byte = nullptr; /* until buffer loaded */ } -JPEGReader::JPEGReader( SvStream& rStream, bool bSetLogSize ) : +JPEGReader::JPEGReader( SvStream& rStream, GraphicFilterImportFlags nImportFlags ) : mrStream ( rStream ), mnLastPos ( rStream.Tell() ), mnLastLines ( 0 ), - mbSetLogSize ( bSetLogSize ) + mbSetLogSize ( nImportFlags & GraphicFilterImportFlags::SetLogsizeForJpeg ) { maUpperName = "SVIJPEG"; + + if (!(nImportFlags & GraphicFilterImportFlags::UseExistingBitmap)) + { + mpBitmap.reset(new Bitmap()); + mpIncompleteAlpha.reset(new Bitmap()); + } } JPEGReader::~JPEGReader() @@ -185,7 +191,7 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam) Size aSize(rParam.nWidth, rParam.nHeight); bool bGray = rParam.bGray; - maBitmap = Bitmap(); + mpBitmap.reset(new Bitmap()); sal_uInt64 nSize = aSize.Width() * aSize.Height(); @@ -202,11 +208,11 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam) aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray ); } - maBitmap = Bitmap(aSize, 8, &aGrayPal); + mpBitmap.reset(new Bitmap(aSize, 8, &aGrayPal)); } else { - maBitmap = Bitmap(aSize, 24); + mpBitmap.reset(new Bitmap(aSize, 24)); } if (mbSetLogSize) @@ -221,8 +227,8 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam) MapMode aMapMode( nUnit == 1 ? MapUnit::MapInch : MapUnit::MapCM, aEmptyPoint, aFractX, aFractY ); Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MapUnit::Map100thMM ); - maBitmap.SetPrefSize(aPrefSize); - maBitmap.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); + mpBitmap->SetPrefSize(aPrefSize); + mpBitmap->SetPrefMapMode(MapMode(MapUnit::Map100thMM)); } } @@ -232,12 +238,12 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam) Graphic JPEGReader::CreateIntermediateGraphic(long nLines) { Graphic aGraphic; - const Size aSizePixel(maBitmap.GetSizePixel()); + const Size aSizePixel(mpBitmap->GetSizePixel()); if (!mnLastLines) { - maIncompleteAlpha = Bitmap(aSizePixel, 1); - maIncompleteAlpha.Erase(Color(COL_WHITE)); + mpIncompleteAlpha.reset(new Bitmap(aSizePixel, 1)); + mpIncompleteAlpha->Erase(Color(COL_WHITE)); } if (nLines && (nLines < aSizePixel.Height())) @@ -247,21 +253,21 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines) if (nNewLines > 0) { { - Bitmap::ScopedWriteAccess pAccess(maIncompleteAlpha); + Bitmap::ScopedWriteAccess pAccess(*mpIncompleteAlpha); pAccess->SetFillColor(Color(COL_BLACK)); pAccess->FillRect(tools::Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines))); } - aGraphic = BitmapEx(maBitmap, maIncompleteAlpha); + aGraphic = BitmapEx(*mpBitmap, *mpIncompleteAlpha); } else { - aGraphic = maBitmap; + aGraphic = *mpBitmap; } } else { - aGraphic = maBitmap; + aGraphic = *mpBitmap; } mnLastLines = nLines; @@ -269,7 +275,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines) return aGraphic; } -ReadState JPEGReader::Read( Graphic& rGraphic ) +ReadState JPEGReader::Read( Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, Bitmap::ScopedWriteAccess* ppAccess ) { ReadState eReadState; bool bRet = false; @@ -279,9 +285,10 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) // read the (partial) image long nLines; - ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() ); + ReadJPEG( this, &mrStream, &nLines, GetPreviewSize(), nImportFlags, ppAccess ); - if (!maBitmap.IsEmpty()) + auto bUseExistingBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::UseExistingBitmap); + if (bUseExistingBitmap || !mpBitmap->IsEmpty()) { if( mrStream.GetError() == ERRCODE_IO_PENDING ) { @@ -289,7 +296,8 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) } else { - rGraphic = maBitmap; + if (!bUseExistingBitmap) + rGraphic = *mpBitmap; } bRet = true; diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx index 58ba82cf342d..6c4f1dc3803b 100644 --- a/vcl/source/filter/jpeg/JpegReader.hxx +++ b/vcl/source/filter/jpeg/JpegReader.hxx @@ -21,10 +21,13 @@ #define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX #include <vcl/graph.hxx> +#include <vcl/bitmap.hxx> #include <vcl/fltcall.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> +enum class GraphicFilterImportFlags; + enum ReadState { JPEGREAD_OK, @@ -46,8 +49,8 @@ struct JPEGCreateBitmapParam class JPEGReader : public GraphicReader { SvStream& mrStream; - Bitmap maBitmap; - Bitmap maIncompleteAlpha; + std::unique_ptr<Bitmap> mpBitmap; + std::unique_ptr<Bitmap> mpIncompleteAlpha; long mnLastPos; long mnLastLines; @@ -56,14 +59,14 @@ class JPEGReader : public GraphicReader Graphic CreateIntermediateGraphic(long nLines); public: - JPEGReader( SvStream& rStream, bool bSetLogSize ); + JPEGReader( SvStream& rStream, GraphicFilterImportFlags nImportFlags ); virtual ~JPEGReader() override; - ReadState Read(Graphic& rGraphic); + ReadState Read(Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, Bitmap::ScopedWriteAccess* ppAccess); bool CreateBitmap(JPEGCreateBitmapParam& param); - Bitmap& GetBitmap() { return maBitmap; } + Bitmap& GetBitmap() { return *mpBitmap; } }; #endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx index f1cb2eb2ed65..5b067153dc30 100644 --- a/vcl/source/filter/jpeg/jpeg.cxx +++ b/vcl/source/filter/jpeg/jpeg.cxx @@ -25,7 +25,7 @@ #include <vcl/FilterConfigItem.hxx> #include <vcl/graphicfilter.hxx> -VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags ) +VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, Bitmap::ScopedWriteAccess* ppAccess ) { bool bReturn = true; @@ -34,7 +34,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, Graphi JPEGReader* pJPEGReader = dynamic_cast<JPEGReader*>( pContext.get() ); if (!pJPEGReader) { - pContext = std::make_shared<JPEGReader>( rInputStream, bool( nImportFlags & GraphicFilterImportFlags::SetLogsizeForJpeg ) ); + pContext = std::make_shared<JPEGReader>( rInputStream, nImportFlags ); pJPEGReader = static_cast<JPEGReader*>( pContext.get() ); } @@ -47,7 +47,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, Graphi pJPEGReader->DisablePreviewMode(); } - ReadState eReadState = pJPEGReader->Read( rGraphic ); + ReadState eReadState = pJPEGReader->Read( rGraphic, nImportFlags, ppAccess ); if( eReadState == JPEGREAD_ERROR ) { diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index bb6c73fc5834..9e9a23c549c0 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -25,6 +25,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <sal/types.h> #include <basegfx/vector/b2dsize.hxx> +#include <vcl/bitmap.hxx> #include <jpeglib.h> @@ -35,6 +36,7 @@ class JPEGReader; class JPEGWriter; class Size; class SvStream; +enum class GraphicFilterImportFlags; void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); @@ -46,7 +48,8 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, css::uno::Reference<css::task::XStatusIndicator> const & status); void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, - Size const & previewSize ); + Size const & previewSize, GraphicFilterImportFlags nImportFlags, + Bitmap::ScopedWriteAccess* ppAccess ); void Transform(void* pInputStream, void* pOutputStream, long nAngle); diff --git a/vcl/source/filter/jpeg/jpeg.hxx b/vcl/source/filter/jpeg/jpeg.hxx index f8f900ace03d..776e7d60042f 100644 --- a/vcl/source/filter/jpeg/jpeg.hxx +++ b/vcl/source/filter/jpeg/jpeg.hxx @@ -23,11 +23,12 @@ #include <vcl/graph.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/fltcall.hxx> +#include <vcl/bitmap.hxx> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> -VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags ); +VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, Bitmap::ScopedWriteAccess* ppAccess ); bool ExportJPEG(SvStream& rOutputStream, const Graphic& rGraphic, diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 2e836ade2b8b..694c0c2cd7ab 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -36,6 +36,7 @@ extern "C" { #include <JpegWriter.hxx> #include <memory> #include <vcl/bitmapaccess.hxx> +#include <vcl/graphicfilter.hxx> extern "C" void errorExit (j_common_ptr cinfo) { @@ -81,7 +82,8 @@ private: }; void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, - Size const & previewSize ) + Size const & previewSize, GraphicFilterImportFlags nImportFlags, + Bitmap::ScopedWriteAccess* ppAccess ) { try { @@ -159,11 +161,23 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, aCreateBitmapParam.Y_density = cinfo.Y_density; aCreateBitmapParam.bGray = bGray; - bool bBitmapCreated = pJPEGReader->CreateBitmap(aCreateBitmapParam); + const auto bOnlyCreateBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::OnlyCreateBitmap); + const auto bUseExistingBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::UseExistingBitmap); + bool bBitmapCreated = bUseExistingBitmap; + if (!bBitmapCreated) + bBitmapCreated = pJPEGReader->CreateBitmap(aCreateBitmapParam); - if (bBitmapCreated) + if (bBitmapCreated && !bOnlyCreateBitmap) { - Bitmap::ScopedWriteAccess pAccess(pJPEGReader->GetBitmap()); + std::unique_ptr<Bitmap::ScopedWriteAccess> pScopedAccess; + + if (nImportFlags & GraphicFilterImportFlags::UseExistingBitmap) + // ppAccess must be set if this flag is used. + assert(ppAccess); + else + pScopedAccess.reset(new Bitmap::ScopedWriteAccess(pJPEGReader->GetBitmap())); + + Bitmap::ScopedWriteAccess& pAccess = bUseExistingBitmap ? *ppAccess : *pScopedAccess.get(); if (pAccess) { @@ -251,7 +265,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, } } - if (bBitmapCreated) + if (bBitmapCreated && !bOnlyCreateBitmap) { jpeg_finish_decompress( &cinfo ); } diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index edcaebddc807..a2034944ae88 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -235,6 +235,11 @@ bool BitmapEx::IsAlpha() const return( IsTransparent() && bAlpha ); } +const Bitmap& BitmapEx::GetBitmapRef() const +{ + return aBitmap; +} + Bitmap BitmapEx::GetBitmap( const Color* pTransReplaceColor ) const { Bitmap aRetBmp( aBitmap ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 54bcc706f987..d863a2413506 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -352,6 +352,11 @@ const GDIMetaFile& Graphic::GetGDIMetaFile() const return mxImpGraphic->ImplGetGDIMetaFile(); } +const BitmapEx& Graphic::GetBitmapExRef() const +{ + return mxImpGraphic->ImplGetBitmapExRef(); +} + uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const { uno::Reference< graphic::XGraphic > xRet; diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index acebb4d5521a..dd88c7047221 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -584,6 +584,11 @@ Animation ImpGraphic::ImplGetAnimation() const return aAnimation; } +const BitmapEx& ImpGraphic::ImplGetBitmapExRef() const +{ + return maEx; +} + const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const { if (GraphicType::Bitmap == meType && !maMetaFile.GetActionSize()) diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 33b25847a0c1..0251274b0ee9 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -120,7 +120,7 @@ try_again: { Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = (int) ImportJPEG(aFileStream, aGraphic, GraphicFilterImportFlags::NONE); + ret = (int) ImportJPEG(aFileStream, aGraphic, GraphicFilterImportFlags::NONE, nullptr); } else if (strcmp(argv[2], "gif") == 0) { diff --git a/vcl/workben/jpgfuzzer.cxx b/vcl/workben/jpgfuzzer.cxx index c5fddc150043..5fa270b69e7e 100644 --- a/vcl/workben/jpgfuzzer.cxx +++ b/vcl/workben/jpgfuzzer.cxx @@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); Graphic aGraphic; - (void)ImportJPEG(aStream, aGraphic, GraphicFilterImportFlags::NONE); + (void)ImportJPEG(aStream, aGraphic, GraphicFilterImportFlags::NONE, nullptr); return 0; } |