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