MeshLib
 
Loading...
Searching...
No Matches
MRPng.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4#ifndef MRIOEXTRAS_NO_PNG
5#include "exports.h"
6
7#include <MRMesh/MRExpected.h>
8#include <MRMesh/MRImage.h>
9
10#include <filesystem>
11
12namespace MR
13{
14
15namespace ImageLoad
16{
17
19MRIOEXTRAS_API Expected<Image> fromPng( const std::filesystem::path& path );
20MRIOEXTRAS_API Expected<Image> fromPng( std::istream& in );
21
22} // namespace ImageLoad
23
24namespace ImageSave
25{
26
28MRIOEXTRAS_API Expected<void> toPng( const Image& image, const std::filesystem::path& path );
29MRIOEXTRAS_API Expected<void> toPng( const Image& image, std::ostream& os );
30
31} // namespace ImageSave
32
33} // namespace MR
34#endif
MRIOEXTRAS_API Expected< Image > fromPng(const std::filesystem::path &path)
loads from .png format
MRIOEXTRAS_API Expected< void > toPng(const Image &image, const std::filesystem::path &path)
saves in .png format
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRImage.h:15