typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
image.hpp
[詳解]
1#ifndef TYPESET_IMAGE_IMAGE_HPP
2#define TYPESET_IMAGE_IMAGE_HPP
3
4#include <memory>
5#include <string>
6
8
16namespace typeset::image {
17
18std::shared_ptr<dl::Image> loadFile(const std::string& path);
19std::shared_ptr<dl::Image> loadMemory(const void* data, size_t size);
20
22std::shared_ptr<dl::Image> fromRgba(int width, int height, const uint8_t* rgba);
23
25std::string encodePng(const uint8_t* rgba, int width, int height);
26
28std::string toPng(const dl::Image& img);
29
30std::string base64(const std::string& bytes);
31
33bool hasAlpha(const dl::Image& img);
34
35} // namespace typeset::image
36
37#endif // TYPESET_IMAGE_IMAGE_HPP
image — 画像の読み込みとエンコード
Definition image.hpp:16
std::shared_ptr< dl::Image > loadMemory(const void *data, size_t size)
std::string encodePng(const uint8_t *rgba, int width, int height)
RGBA8888 → PNG バイト列(zlib)
std::shared_ptr< dl::Image > loadFile(const std::string &path)
std::string base64(const std::string &bytes)
std::shared_ptr< dl::Image > fromRgba(int width, int height, const uint8_t *rgba)
RGBA8888 から生成した画像(テスト・サンプル用)
std::string toPng(const dl::Image &img)
画像 → PNG(encoded が PNG ならそれをそのまま返す)
bool hasAlpha(const dl::Image &img)
画像に不透明でない画素があるか
画像(RGBA8888、非前乗算)