MeshLib C++ Docs
Loading...
Searching...
No Matches
MRJpeg.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4#ifndef MRIOEXTRAS_NO_JPEG
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
23MRIOEXTRAS_API Expected<Image> fromJpeg( const std::filesystem::path& path, bool ignoreDecompressErrors = false );
24MRIOEXTRAS_API Expected<Image> fromJpeg( std::istream& in, bool ignoreDecompressErrors = false );
25MRIOEXTRAS_API Expected<Image> fromJpeg( const char* data, size_t size, bool ignoreDecompressErrors = false );
26
27}
28
29namespace ImageSave
30{
31
33MRIOEXTRAS_API Expected<void> toJpeg( const Image& image, const std::filesystem::path& path );
34
35}
36
37}
38#endif
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
MRIOEXTRAS_API Expected< void > toJpeg(const Image &image, const std::filesystem::path &path)
saves in .jpg format
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRIOEXTRAS_API Expected< Image > fromJpeg(const std::filesystem::path &path, bool ignoreDecompressErrors=false)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRImage.h:19