OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef PUBLIC_FPDF_EDIT_H_ | 7 #ifndef PUBLIC_FPDF_EDIT_H_ |
8 #define PUBLIC_FPDF_EDIT_H_ | 8 #define PUBLIC_FPDF_EDIT_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // cached by the loaded pages. In that case, we need to clear the cached image | 194 // cached by the loaded pages. In that case, we need to clear the cached image |
195 // for all the loaded pages. Pass |pages| and page count (|nCount|) to this API | 195 // for all the loaded pages. Pass |pages| and page count (|nCount|) to this API |
196 // to clear the image cache. If the image is not previously shared, or NULL is a | 196 // to clear the image cache. If the image is not previously shared, or NULL is a |
197 // valid |pages| value. | 197 // valid |pages| value. |
198 DLLEXPORT FPDF_BOOL STDCALL | 198 DLLEXPORT FPDF_BOOL STDCALL |
199 FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages, | 199 FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages, |
200 int nCount, | 200 int nCount, |
201 FPDF_PAGEOBJECT image_object, | 201 FPDF_PAGEOBJECT image_object, |
202 FPDF_FILEACCESS* fileAccess); | 202 FPDF_FILEACCESS* fileAccess); |
203 | 203 |
| 204 // Load an image from a JPEG image file and then set it into |image_object|. |
| 205 // |
| 206 // pages - pointer to the start of all loaded pages, may be NULL. |
| 207 // nCount - number of |pages|, may be 0. |
| 208 // image_object - handle to an image object. |
| 209 // fileAccess - file access handler which specifies the JPEG image file. |
| 210 // |
| 211 // Returns TRUE on success. |
| 212 // |
| 213 // The image object might already have an associated image, which is shared and |
| 214 // cached by the loaded pages. In that case, we need to clear the cached image |
| 215 // for all the loaded pages. Pass |pages| and page count (|nCount|) to this API |
| 216 // to clear the image cache. If the image is not previously shared, or NULL is a |
| 217 // valid |pages| value. This function loads the JPEG image inline, so the image |
| 218 // content is copied to the file. This allows |fileAccess| and its associated |
| 219 // data to be deleted after this function returns. |
| 220 DLLEXPORT FPDF_BOOL STDCALL |
| 221 FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages, |
| 222 int nCount, |
| 223 FPDF_PAGEOBJECT image_object, |
| 224 FPDF_FILEACCESS* fileAccess); |
| 225 |
204 // Set the transform matrix of |image_object|. | 226 // Set the transform matrix of |image_object|. |
205 // | 227 // |
206 // image_object - handle to an image object. | 228 // image_object - handle to an image object. |
207 // a - matrix value. | 229 // a - matrix value. |
208 // b - matrix value. | 230 // b - matrix value. |
209 // c - matrix value. | 231 // c - matrix value. |
210 // d - matrix value. | 232 // d - matrix value. |
211 // e - matrix value. | 233 // e - matrix value. |
212 // f - matrix value. | 234 // f - matrix value. |
213 // | 235 // |
(...skipping 22 matching lines...) Expand all Loading... |
236 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, | 258 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, |
237 int nCount, | 259 int nCount, |
238 FPDF_PAGEOBJECT image_object, | 260 FPDF_PAGEOBJECT image_object, |
239 FPDF_BITMAP bitmap); | 261 FPDF_BITMAP bitmap); |
240 | 262 |
241 #ifdef __cplusplus | 263 #ifdef __cplusplus |
242 } // extern "C" | 264 } // extern "C" |
243 #endif // __cplusplus | 265 #endif // __cplusplus |
244 | 266 |
245 #endif // PUBLIC_FPDF_EDIT_H_ | 267 #endif // PUBLIC_FPDF_EDIT_H_ |
OLD | NEW |