YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
ImageFile.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef YARP_SIG_IMAGEFILE_H
8
#define YARP_SIG_IMAGEFILE_H
9
10
#include <string>
11
#include <
yarp/sig/Image.h
>
12
13
namespace
yarp::sig::file
{
14
enum
image_fileformat
15
{
16
FORMAT_NULL
,
17
FORMAT_ANY
,
18
FORMAT_PGM
,
19
FORMAT_PPM
,
20
FORMAT_JPG
,
21
FORMAT_NUMERIC
,
22
FORMAT_NUMERIC_COMPRESSED
,
23
FORMAT_PNG
24
};
25
26
// read methods
27
bool
YARP_sig_API
read
(
ImageOf<PixelRgb>
& dest,
const
std::string& src,
image_fileformat
format =
FORMAT_ANY
);
28
bool
YARP_sig_API
read
(
ImageOf<PixelBgr>
& dest,
const
std::string& src,
image_fileformat
format =
FORMAT_ANY
);
29
bool
YARP_sig_API
read
(
ImageOf<PixelRgba>
& dest,
const
std::string& src,
image_fileformat
format =
FORMAT_ANY
);
30
bool
YARP_sig_API
read
(
ImageOf<PixelMono>
& dest,
const
std::string& src,
image_fileformat
format =
FORMAT_ANY
);
31
bool
YARP_sig_API
read
(
ImageOf<PixelFloat>
& dest,
const
std::string& src,
image_fileformat
format =
FORMAT_ANY
);
32
33
// write methods
34
bool
YARP_sig_API
write
(
const
ImageOf<PixelRgb>
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_PPM
);
35
bool
YARP_sig_API
write
(
const
ImageOf<PixelBgr>
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_PPM
);
36
bool
YARP_sig_API
write
(
const
ImageOf<PixelRgba>
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_PPM
);
37
bool
YARP_sig_API
write
(
const
ImageOf<PixelMono>
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_PGM
);
38
bool
YARP_sig_API
write
(
const
ImageOf<PixelFloat>
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_NUMERIC
);
39
bool
YARP_sig_API
write
(
const
Image
& src,
const
std::string& dest,
image_fileformat
format =
FORMAT_PPM
);
40
}
// namespace yarp::sig::file
41
42
#endif
// YARP_SIG_IMAGEFILE_H
Image.h
yarp::sig::ImageOf
Typed image class.
Definition
Image.h:616
yarp::sig::Image
Base class for storing images.
Definition
Image.h:79
yarp::sig::file
Definition
ImageFile.h:13
yarp::sig::file::read
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition
ImageFile.cpp:915
yarp::sig::file::image_fileformat
image_fileformat
Definition
ImageFile.h:15
yarp::sig::file::FORMAT_NUMERIC_COMPRESSED
@ FORMAT_NUMERIC_COMPRESSED
Definition
ImageFile.h:22
yarp::sig::file::FORMAT_NULL
@ FORMAT_NULL
Definition
ImageFile.h:16
yarp::sig::file::FORMAT_PNG
@ FORMAT_PNG
Definition
ImageFile.h:23
yarp::sig::file::FORMAT_ANY
@ FORMAT_ANY
Definition
ImageFile.h:17
yarp::sig::file::FORMAT_NUMERIC
@ FORMAT_NUMERIC
Definition
ImageFile.h:21
yarp::sig::file::FORMAT_PGM
@ FORMAT_PGM
Definition
ImageFile.h:18
yarp::sig::file::FORMAT_JPG
@ FORMAT_JPG
Definition
ImageFile.h:20
yarp::sig::file::FORMAT_PPM
@ FORMAT_PPM
Definition
ImageFile.h:19
yarp::sig::file::write
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition
ImageFile.cpp:1091
YARP_sig_API
#define YARP_sig_API
Definition
api.h:18
YARP
3.9.0+216-20240913.4+git627c4e30d
src
libYARP_sig
src
yarp
sig
ImageFile.h
Generated on Sat Sep 14 2024 02:26:32 for YARP by
1.9.8