Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 927 by
vijayana...@gmail.com: Extract images in the PDF
https://bugs.chromium.org/p/pdfium/issues/detail?id=927I am trying to extract the images available in the PDF from Pdfium public methods. I am accessing pdfium from c# using DllImport option. I am using the below lines of code:
var bmHandle = NativeMethods.FPDFImageObj_GetBitmap(imageObj);
var width = NativeMethods.FPDFBitmap_GetWidth(bmHandle);
var height = NativeMethods.FPDFBitmap_GetHeight(bmHandle);
var stride = NativeMethods.FPDFBitmap_GetStride(bmHandle);
var buffer = NativeMethods.FPDFBitmap_GetBuffer(bmHandle);
var bitmap = new Bitmap(width, height, stride, PixelFormat.Format32bppArgb, buffer);
bitmap.Save("image.png");
I am getting error "A generic error occurred in GDI+". Not sure if i'm doing something wrong. I really appreciate if there is any help.
I am using Windows 7 and the latest pdfium.dll
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings