MeshLib Documentation
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{
14
15namespace ImageLoad
16{
17
19MRIOEXTRAS_API Expected<Image> fromJpeg( const std::filesystem::path& path );
20MRIOEXTRAS_API Expected<Image> fromJpeg( std::istream& in );
21MRIOEXTRAS_API Expected<Image> fromJpeg( const char* data, size_t size );
22
23} // namespace ImageLoad
24
25namespace ImageSave
26{
27
29MRIOEXTRAS_API Expected<void> toJpeg( const Image& image, const std::filesystem::path& path );
30
31} // namespace ImageSave
32
33} // namespace MR
34#endif
MRIOEXTRAS_API Expected< Image > fromJpeg(const std::filesystem::path &path)
loads from .jpg format
MRIOEXTRAS_API Expected< void > toJpeg(const Image &image, const std::filesystem::path &path)
saves in .jpg format
Definition MRCameraOrientationPlugin.h:8
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRImage.h:15