91 bmp.write(reinterpret_cast<const char *>(&header),
sizeof(header));
97 for (
int y = 0; y <
fb.
height(); ++y) {
101 bmp.write(reinterpret_cast<const char *>(line_buffer.data()),
102 line_buffer.size() *
sizeof(line_buffer[0]));
void write(std::ostream &bmp) const override
Write the frame buffer data into the provided ostream.
Internal gem5 representation of a frame buffer.
const CompleteV1Header getCompleteHeader() const
const Pixel & pixel(unsigned x, unsigned y) const
Get a pixel from an (x, y) coordinate.
static const char * _imgExtension
unsigned area() const
Total number of pixels in frame buffer.
BmpWriter(const FrameBuffer *fb)
Create a bitmap that takes data in a given mode & size and outputs to an ostream. ...
unsigned width() const
Frame buffer width in pixels.
unsigned height() const
Frame buffer height in pixels.