summaryrefslogtreecommitdiff
path: root/poppler/ImageEmbeddingUtils.h
blob: 7fafa7f5a1214f4dd66b3678f492063316dd1342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//========================================================================
//
// ImageEmbeddingUtils.h
//
// Copyright (C) 2021 Georgiy Sgibnev <georgiy@sgibnev.com>. Work sponsored by lab50.net.
//
// This file is licensed under the GPLv2 or later
//
//========================================================================

#ifndef IMAGE_EMBEDDING_UTILS_H
#define IMAGE_EMBEDDING_UTILS_H

#include <string>

#include "poppler_private_export.h"

class GooFile;
struct Ref;
class XRef;

namespace ImageEmbeddingUtils {

// Creates a new base image (an object of type XObject referred to in a resource dictionary).
// Supported formats: PNG, JPEG.
// Args:
//     xref: Document's xref.
//     imageFile: An image file to embed.
// Returns ref to a new object or Ref::INVALID.
Ref POPPLER_PRIVATE_EXPORT embed(XRef *xref, const GooFile &imageFile);

// Same as above, but imagePath is a path to an image file.
Ref POPPLER_PRIVATE_EXPORT embed(XRef *xref, const std::string &imagePath);

}
#endif