cgv
Loading...
Searching...
No Matches
bmp_reader.h
1#pragma once
2
3#include "image_reader.h"
4#include <vector>
5#include <stdio.h>
6#include "lib_begin.h"
7
8namespace cgv {
9 namespace media {
10 namespace image {
11
13class CGV_API bmp_reader : public abst_image_reader
14{
15protected:
16 FILE* fp;
17 std::string last_error;
18 std::vector<unsigned char> palette;
19public:
21 bmp_reader();
25 std::string get_type_name() const;
27 abst_image_reader* clone() const;
29 const std::string& get_last_error() const;
31 bool read_palette(unsigned int i, const cgv::data::data_view& dv);
33 const char* get_supported_extensions() const;
35 bool open(const std::string& file_name, cgv::data::data_format& df, std::vector<cgv::data::data_format>* palette_formats);
37 bool supports_per_line_read() const;
39 bool read_line(const cgv::data::data_format& df, const cgv::data::data_view& dv);
41 bool read_image(const cgv::data::data_format& df, const cgv::data::data_view& dv);
43 bool close();
44};
45
46 }
47 }
48}
49
50#include <cgv/config/lib_end.h>
A data_format describes a multidimensional data block of data entries.
Definition data_format.h:17
the data view gives access to a data array of one, two, three or four dimensions.
Definition data_view.h:153
abstract interface for image readers
implements the image reader interface for bmp files
Definition bmp_reader.h:14
the cgv namespace
Definition print.h:11