58 const uint32_t pixel_array_size(
sizeof(
PixelType) *
fb.area());
94 bmp.write(
reinterpret_cast<const char *
>(&
header),
sizeof(
header));
100 for (
int y = 0; y <
fb.height(); ++y) {
101 for (
unsigned x = 0;
x <
fb.width(); ++
x)
102 line_buffer[
x] =
fb.pixel(
x,
fb.height() - y - 1);
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.
ImgWriter(const FrameBuffer *_fb)
Copyright (c) 2024 Arm Limited All rights reserved.