#include <cstdint>#include <memory_resource>#include <nk/value/value.hpp>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Functions | |
| Value | nk::image::imread (const std::string &path, std::pmr::memory_resource *mr=nullptr) |
| Read an image from disk (A = imread(path)). | |
| void | nk::image::imwrite (const Value &A, const std::string &path, std::pmr::memory_resource *mr=nullptr) |
| Write an image to disk (imwrite(A, path)). | |
| std::string | nk::image::imwriteToBytes (const Value &A, const std::string &ext, std::pmr::memory_resource *mr=nullptr) |
| Encode an image to in-memory bytes (companion to imwrite). | |
| Value | nk::image::imfinfo (const std::string &path, std::pmr::memory_resource *mr=nullptr) |
| Read image header metadata without decoding pixels (S = imfinfo(path)). | |
| Value | nk::image::imfinfoFromBytes (const std::string &bytes, const std::string &filename, std::pmr::memory_resource *mr=nullptr) |
| imfinfo from already-loaded bytes (the engine entry feeds these from the VFS so it works on the virtual + real filesystem). | |
| Value | nk::image::readTiff (const std::string &path, std::pmr::memory_resource *mr=nullptr) |
| Minimal TIFF reader for the formats stb doesn't decode. | |
| Value | nk::image::readTiff (const std::string &path, std::uint32_t page, std::pmr::memory_resource *mr=nullptr) |
| Multi-page form: read the page-th IFD (1-based). | |
| Value | nk::image::readTiff (std::vector< std::uint8_t > buf, std::uint32_t page, std::pmr::memory_resource *mr=nullptr) |
| Buffer overloads — decode TIFF from already-loaded bytes (the IDE feeds these from the VFS so reads work on the virtual + real filesystem). | |
| std::pair< Value, Value > | nk::image::readTiffWithMap (std::vector< std::uint8_t > buf, std::uint32_t page, std::pmr::memory_resource *mr=nullptr) |
| std::pair< Value, Value > | nk::image::readTiffWithMap (const std::string &path, std::uint32_t page, std::pmr::memory_resource *mr=nullptr) |
| Two-output read for palette TIFFs: returns (indices, colormap). | |
| void | nk::image::peekTiff (const std::string &path, std::uint32_t &W, std::uint32_t &H, std::uint16_t &bits, std::uint16_t &channels) |
| Peek a TIFF file's first-IFD metadata without decoding pixels. | |
| void | nk::image::peekTiff (const std::vector< std::uint8_t > &buf, std::uint32_t &W, std::uint32_t &H, std::uint16_t &bits, std::uint16_t &channels) |
| Buffer overload — peek metadata from already-loaded TIFF bytes (the IDE feeds these from the VFS so imfinfo works on the virtual + real FS). | |
| std::uint32_t | nk::image::tiffNumPages (const std::string &path) |
| Count the number of IFDs (pages) in a TIFF file. | |
| void | nk::image::writeTiff (const Value &A, const std::string &path, const std::string &compression="none", bool appendMode=false) |
| Write A to path as a baseline TIFF. | |
| std::vector< std::uint8_t > | nk::image::writeTiffToBytes (const Value &A, const std::string &compression="none", const std::vector< std::uint8_t > *existing=nullptr) |
| Buffer form — encode A to a TIFF byte vector (the engine entry writes these through the VFS). | |