Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: public/fpdf_edit.h

Issue 2529543003: Add inline JPEGs. (Closed)
Patch Set: Fix extra arg Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfeditimg.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/fpdf_edit.h
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index dabdbedd48d061a07625540f75c411856a81cca5..640d97ed05fe220ac30078d64599773955e9a358 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -201,6 +201,28 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
FPDF_PAGEOBJECT image_object,
FPDF_FILEACCESS* fileAccess);
+// Load an image from a JPEG image file and then set it into |image_object|.
+//
+// pages - pointer to the start of all loaded pages, may be NULL.
+// nCount - number of |pages|, may be 0.
+// image_object - handle to an image object.
+// fileAccess - file access handler which specifies the JPEG image file.
+//
+// Returns TRUE on success.
+//
+// The image object might already have an associated image, which is shared and
+// cached by the loaded pages. In that case, we need to clear the cached image
+// for all the loaded pages. Pass |pages| and page count (|nCount|) to this API
+// to clear the image cache. If the image is not previously shared, or NULL is a
+// valid |pages| value. This function loads the JPEG image inline, so the image
+// content is copied to the file. This allows |fileAccess| and its associated
+// data to be deleted after this function returns.
+DLLEXPORT FPDF_BOOL STDCALL
+FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
+ int nCount,
+ FPDF_PAGEOBJECT image_object,
+ FPDF_FILEACCESS* fileAccess);
+
// Set the transform matrix of |image_object|.
//
// image_object - handle to an image object.
« no previous file with comments | « fpdfsdk/fpdfeditimg.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698