1 | //======================================================================== |
2 | // |
3 | // ImageEmbeddingUtils.h |
4 | // |
5 | // Copyright (C) 2021 Georgiy Sgibnev <georgiy@sgibnev.com>. Work sponsored by lab50.net. |
6 | // |
7 | // This file is licensed under the GPLv2 or later |
8 | // |
9 | //======================================================================== |
10 | |
11 | #ifndef IMAGE_EMBEDDING_UTILS_H |
12 | #define IMAGE_EMBEDDING_UTILS_H |
13 | |
14 | #include <string> |
15 | |
16 | #include "poppler_private_export.h" |
17 | |
18 | class GooFile; |
19 | struct Ref; |
20 | class XRef; |
21 | |
22 | namespace ImageEmbeddingUtils { |
23 | |
24 | // Creates a new base image (an object of type XObject referred to in a resource dictionary). |
25 | // Supported formats: PNG, JPEG. |
26 | // Args: |
27 | // xref: Document's xref. |
28 | // imageFile: An image file to embed. |
29 | // Returns ref to a new object or Ref::INVALID. |
30 | Ref POPPLER_PRIVATE_EXPORT embed(XRef *xref, const GooFile &imageFile); |
31 | |
32 | // Same as above, but imagePath is a path to an image file. |
33 | Ref POPPLER_PRIVATE_EXPORT embed(XRef *xref, const std::string &imagePath); |
34 | |
35 | } |
36 | #endif |
37 | |