LIBEUNOMIA
読み取り中…
検索中…
一致する文字列を見つけられません
pngio.h
[詳解]
1/*
2 * Copyright 2021 oZ/acy (名賀月晃嗣)
3 * Redistribution and use in source and binary forms,
4 * with or without modification,
5 * are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 */
36#ifndef INCLUDE_GUARD_EUNOMIA_PNG_INPUT_OUTPUT_H
37#define INCLUDE_GUARD_EUNOMIA_PNG_INPUT_OUTPUT_H
38
39#include <filesystem>
40#include "picture.h"
41#include "picture_rgba.h"
42#include "picture_indexed.h"
43
44
45namespace eunomia
46{
47
66bool loadPng(
67 const std::filesystem::path& path,
68 std::unique_ptr<Picture>& uppict,
69 std::unique_ptr<PictureRgba>& uprgba,
70 std::unique_ptr<PictureIndexed>& upindx);
71
72
81bool savePng(const Picture& pict, const std::filesystem::path& path);
82
91bool
92savePng(const PictureRgba& pict, const std::filesystem::path& path);
93
104bool
105savePng(
106 const PictureIndexed& pict, const std::filesystem::path& path,
107 bool trns = false, std::uint8_t tpal = 0);
108
109
110}// end of namespace eunomia
111
112
113
114
115#endif // INCLUDE_GUARD_EUNOMIA_PNG_INPUT_OUTPUT_H
Definition colour.h:49
bool loadPng(const std::filesystem::path &path, std::unique_ptr< Picture > &uppict, std::unique_ptr< PictureRgba > &uprgba, std::unique_ptr< PictureIndexed > &upindx)
PNGファイルの讀み込み
Definition pngin.cpp:349
bool savePng(const Picture &pict, const std::filesystem::path &path)
PNGファイルの保存
Definition pngout.cpp:99
RGB24bitの畫像バッファクラス
RGB24bit256インデックスの畫像バッファクラス
RGBA32bitの畫像バッファクラス