Home
|
Develop
|
Download
|
Contact
src
headers
Pds
RaBmp.hpp
1
/*
2
* RaBmp.hpp
3
*
4
* Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
* MA 02110-1301, USA.
20
*
21
*/
22
30
#ifndef __PDS_RABMP_HPP__
31
#define __PDS_RABMP_HPP__
32
33
#include <string>
34
#include <cstdio>
35
#include <list>
36
46
namespace
Pds
{
51
namespace
Ra{
52
53
typedef
struct
{
// Total: 54 bytes
54
// Cabecera BMP
55
unsigned
char
type[2];
// Magic identifier: 0x4d42
56
uint32_t
size
;
// File size in bytes
57
uint16_t
reserved1
;
// Not used
58
uint16_t
reserved2
;
// Not used
59
uint32_t
offset
;
// Offset to image data in bytes from beginning of file (54 bytes)
60
// Encabezado DIB
61
uint32_t
dib_header_size
;
// DIB Header size in bytes (40 bytes)
62
int32_t
width_px
;
// Width of the image
63
int32_t
height_px
;
// Height of image
64
uint16_t
num_planes
;
// Number of color planes
65
uint16_t
bits_per_pixel
;
// Bits per pixel
66
uint32_t
compression
;
// Compression type
67
uint32_t
image_size_bytes
;
// Image size in bytes
68
int32_t
x_resolution_ppm
;
// Pixels per meter
69
int32_t
y_resolution_ppm
;
// Pixels per meter
70
uint32_t
num_colors
;
// Number of colors
71
uint32_t
important_colors
;
// Important colors
72
}
BmpHeader
;
// 54 bytes
73
74
87
Pds::Ra::BmpHeader
ReadBmpHeader
(FILE *fd);
88
96
Pds::Ra::BmpHeader
ReadBmpHeader
(
const
std::string &filename);
97
104
void
PrintBmpHeader
(
Pds::Ra::BmpHeader
Header);
105
106
107
113
}
// namespace Ra
114
}
// namespace Pds
115
116
121
#endif
/* __PDS_RABMP_HPP__ */
Pds::Ra::PrintBmpHeader
void PrintBmpHeader(Pds::Ra::BmpHeader Header)
Imprime los datos de una estructura con los datos de cabecera de un archivo bmp.
Pds::Ra::ReadBmpHeader
Pds::Ra::BmpHeader ReadBmpHeader(FILE *fd)
Retorna una estructura con los datos de cabecera de un archivo bmp.
Pds
Nombre de espacion para PDS (Procesamiento Digital de Senales)
Definition:
RaFile.hpp:46
Pds::Ra::BmpHeader
Definition:
RaBmp.hpp:53
Pds::Ra::BmpHeader::reserved1
uint16_t reserved1
Definition:
RaBmp.hpp:57
Pds::Ra::BmpHeader::bits_per_pixel
uint16_t bits_per_pixel
Definition:
RaBmp.hpp:65
Pds::Ra::BmpHeader::x_resolution_ppm
int32_t x_resolution_ppm
Definition:
RaBmp.hpp:68
Pds::Ra::BmpHeader::size
uint32_t size
Definition:
RaBmp.hpp:56
Pds::Ra::BmpHeader::image_size_bytes
uint32_t image_size_bytes
Definition:
RaBmp.hpp:67
Pds::Ra::BmpHeader::reserved2
uint16_t reserved2
Definition:
RaBmp.hpp:58
Pds::Ra::BmpHeader::important_colors
uint32_t important_colors
Definition:
RaBmp.hpp:71
Pds::Ra::BmpHeader::offset
uint32_t offset
Definition:
RaBmp.hpp:59
Pds::Ra::BmpHeader::width_px
int32_t width_px
Definition:
RaBmp.hpp:62
Pds::Ra::BmpHeader::num_planes
uint16_t num_planes
Definition:
RaBmp.hpp:64
Pds::Ra::BmpHeader::dib_header_size
uint32_t dib_header_size
Definition:
RaBmp.hpp:61
Pds::Ra::BmpHeader::compression
uint32_t compression
Definition:
RaBmp.hpp:66
Pds::Ra::BmpHeader::height_px
int32_t height_px
Definition:
RaBmp.hpp:63
Pds::Ra::BmpHeader::num_colors
uint32_t num_colors
Definition:
RaBmp.hpp:70
Pds::Ra::BmpHeader::y_resolution_ppm
int32_t y_resolution_ppm
Definition:
RaBmp.hpp:69
Enlaces de interés
Manual de referencia generado el Domingo, 28 de Noviembre de 2021 01:25:50 para la biblioteca
libpdsramm
usando Generado el Domingo, 28 de Noviembre de 2021 01:25:50 para libpdsramm por
1.9.2