vil_bmp_core_header.cxx
Go to the documentation of this file.
1 // This is core/vil/file_formats/vil_bmp_core_header.cxx
2 //:
3 // \file
4 // \author fsm
5 
6 #include <iostream>
7 #include "vil_bmp_core_header.h"
8 
9 #ifdef _MSC_VER
10 # include <vcl_msvc_warnings.h>
11 #endif
12 
13 #include <vil/vil_stream.h>
14 #include <vil/vil_stream_read.h>
15 #include <vil/vil_stream_write.h>
16 
18 {
20  width = 0;
21  height = 0;
22  planes = 1;
23  bitsperpixel = 8;
24 }
25 
27 {
33  // allowed values for bitsperpixel are 1 4 8 16 24 32; currently we only support 8 and 24
34 }
35 
37 {
43 }
44 
45 void vil_bmp_core_header::print(std::ostream &s) const
46 {
47  s << "vil_bmp_core_header:\n"
48  << " header_size : " << header_size << std::endl
49  << " width : " << width << std::endl
50  << " height : " << height << std::endl
51  << " planes : " << planes << std::endl
52  << " bitsperpixel : " << bitsperpixel << std::endl << std::endl;
53 }
Stream interface for VIL image loaders.
void vil_stream_write_little_endian_uint_32(vil_stream *s, vxl_uint_32 w)
read numbers from vil_stream
vxl_int_32 vil_stream_read_little_endian_int_32(vil_stream *s)
Stream interface for VIL image loaders.
Definition: vil_stream.h:21
write integers to vil_stream
void vil_stream_write_little_endian_int_32(vil_stream *s, vxl_int_32 w)
void vil_stream_write_little_endian_uint_16(vil_stream *s, vxl_uint_16 w)
void read(vil_stream *)
vxl_uint_32 vil_stream_read_little_endian_uint_32(vil_stream *s)
void print(std::ostream &) const
vxl_uint_16 vil_stream_read_little_endian_uint_16(vil_stream *s)
void write(vil_stream *) const