1#ifndef __FACADE_PAYLOAD_HPP
2#define __FACADE_PAYLOAD_HPP
35 PNGPayload(
const void *ptr, std::size_t size) : png::Image(ptr, size) {}
36 PNGPayload(
const std::vector<std::uint8_t> &vec) : png::Image(vec) {}
37 PNGPayload(
const std::string &filename) : png::Image(filename) {}
50 png::Text &add_text_payload(
const std::string &keyword,
const void *ptr, std::size_t size);
61 png::Text &add_text_payload(
const std::string &keyword,
const std::vector<std::uint8_t> &data);
67 void remove_text_payload(
const png::Text &payload);
74 std::vector<png::Text> get_text_payloads(
const std::string &keyword)
const;
82 std::vector<std::vector<std::uint8_t>> extract_text_payloads(
const std::string &keyword)
const;
94 png::ZText &add_ztext_payload(
const std::string &keyword,
const void *ptr, std::size_t size);
105 png::ZText &add_ztext_payload(
const std::string &keyword,
const std::vector<std::uint8_t> &data);
111 void remove_ztext_payload(
const png::ZText &payload);
119 std::vector<png::ZText> get_ztext_payloads(
const std::string &keyword)
const;
128 std::vector<std::vector<std::uint8_t>> extract_ztext_payloads(
const std::string &keyword)
const;
142 std::vector<std::uint8_t> read_stego_data(std::size_t bit_offset, std::size_t size)
const;
155 void write_stego_data(
const void *ptr, std::size_t size, std::size_t bit_offset);
167 void write_stego_data(
const std::vector<std::uint8_t> &data, std::size_t bit_offset);
173 bool has_stego_payload()
const;
181 PNGPayload create_stego_payload(
const void *ptr, std::size_t size)
const;
188 PNGPayload create_stego_payload(
const std::vector<std::uint8_t> &data)
const;
194 std::vector<std::uint8_t> extract_stego_payload()
const;
208 std::optional<std::size_t> _index;
209 std::optional<PNGPayload> _payload;
213 ICOPayload(
const void *ptr, std::size_t size) : ico::Icon(ptr, size) { this->find_png(); }
214 ICOPayload(
const std::vector<std::uint8_t> &vec) : ico::Icon(vec) { this->find_png(); }
215 ICOPayload(
const std::string &filename) : ico::Icon(filename) { this->find_png(); }
238 void reset_png(
void);
An icon file containing a payload.
Definition: payload.hpp:207
ICOPayload()
Definition: payload.hpp:212
ICOPayload(const ICOPayload &other)
Definition: payload.hpp:216
ICOPayload(const std::vector< std::uint8_t > &vec)
Definition: payload.hpp:214
ICOPayload(const void *ptr, std::size_t size)
Definition: payload.hpp:213
ICOPayload(const std::string &filename)
Definition: payload.hpp:215
A PNG-based payload helper class.
Definition: payload.hpp:32
PNGPayload(const std::string &filename)
Definition: payload.hpp:37
PNGPayload(const void *ptr, std::size_t size)
Definition: payload.hpp:35
PNGPayload()
Definition: payload.hpp:34
PNGPayload(const PNGPayload &other)
Definition: payload.hpp:38
PNGPayload(const std::vector< std::uint8_t > &vec)
Definition: payload.hpp:36
A Windows icon file.
Definition: ico.hpp:55
A class for loading and manipulating PNG images.
Definition: png.hpp:1305
A tEXt chunk object.
Definition: png.hpp:906
A compressed text chunk.
Definition: png.hpp:958
Code functionality for handling Windows icon files.
Definition: exception.hpp:14
Code functionality for dealing with PNG images.