blob: 7fafa7f5a1214f4dd66b3678f492063316dd1342 [file] [log] [blame]
// ImageEmbeddingUtils.h
// Copyright (C) 2021 Georgiy Sgibnev <>. Work sponsored by
// This file is licensed under the GPLv2 or later
#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);