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