parent
ce41285290
commit
81ebb730cd
@ -0,0 +1,15 @@
|
||||
diff -wrupN podofo-0.9.6/tools/podofoimgextract/ImageExtractor.cpp podofo-0.9.6-new/tools/podofoimgextract/ImageExtractor.cpp
|
||||
--- podofo-0.9.6/tools/podofoimgextract/ImageExtractor.cpp 2018-02-25 12:48:38.000000000 +0100
|
||||
+++ podofo-0.9.6-new/tools/podofoimgextract/ImageExtractor.cpp 2020-01-17 19:43:48.619699851 +0100
|
||||
@@ -117,6 +117,11 @@ void ImageExtractor::ExtractImage( PdfOb
|
||||
//long lBitsPerComponent = pObject->GetDictionary().GetKey( PdfName("BitsPerComponent" ) )->GetNumber();
|
||||
// TODO: Handle colorspaces
|
||||
|
||||
+ if ( !pObject->GetDictionary().HasKey( PdfName("Width" ) ) || !pObject->GetDictionary().HasKey( PdfName("Height" ) ) )
|
||||
+ {
|
||||
+ PODOFO_RAISE_ERROR( ePdfError_BrokenFile );
|
||||
+ }
|
||||
+
|
||||
// Create a ppm image
|
||||
const char* pszPpmHeader = "P6\n# Image extracted by PoDoFo\n%" PDF_FORMAT_INT64 " %" PDF_FORMAT_INT64 "\n%li\n";
|
||||
|
Loading…
Reference in new issue