MeshLib C++ Docs
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{
16
17
18namespace ImageLoad
19{
20
22MRIOEXTRAS_API Expected<Image> fromPng( const std::filesystem::path& path );
23MRIOEXTRAS_API Expected<Image> fromPng( std::istream& in );
24
25}
26
27namespace ImageSave
28{
29
31MRIOEXTRAS_API Expected<void> toPng( const Image& image, const std::filesystem::path& path );
32MRIOEXTRAS_API Expected<void> toPng( const Image& image, std::ostream& os );
33
34}
35
36}
37#endif
MRIOEXTRAS_API Expected< void > toPng(const Image &image, const std::filesystem::path &path)
saves in .png format
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRIOEXTRAS_API Expected< Image > fromPng(const std::filesystem::path &path)
loads from .png format
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRImage.h:19