Windows compilation fix
This commit is contained in:
parent
30ae586b98
commit
de9c695a7a
1 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ namespace psemek::gfx
|
||||||
void write_image_pgm(pixmap_monochrome const & p, io::ostream && os)
|
void write_image_pgm(pixmap_monochrome const & p, io::ostream && os)
|
||||||
{
|
{
|
||||||
char header_buffer[256];
|
char header_buffer[256];
|
||||||
int header_size = std::snprintf(header_buffer, 256, "P5\n%lu %lu\n255\n", p.width(), p.height());
|
int header_size = std::snprintf(header_buffer, 256, "P5\n%lu %lu\n255\n", (unsigned long)p.width(), (unsigned long)p.height());
|
||||||
os.write(header_buffer, header_size);
|
os.write(header_buffer, header_size);
|
||||||
os.write(reinterpret_cast<char const *>(p.data()), p.width() * p.height());
|
os.write(reinterpret_cast<char const *>(p.data()), p.width() * p.height());
|
||||||
}
|
}
|
||||||
|
|
@ -127,7 +127,7 @@ namespace psemek::gfx
|
||||||
void write_image_ppm(pixmap_rgb const & p, io::ostream && os)
|
void write_image_ppm(pixmap_rgb const & p, io::ostream && os)
|
||||||
{
|
{
|
||||||
char header_buffer[256];
|
char header_buffer[256];
|
||||||
int header_size = std::snprintf(header_buffer, 256, "P6\n%lu %lu\n255\n", p.width(), p.height());
|
int header_size = std::snprintf(header_buffer, 256, "P6\n%lu %lu\n255\n", (unsigned long)p.width(), (unsigned long)p.height());
|
||||||
os.write(header_buffer, header_size);
|
os.write(header_buffer, header_size);
|
||||||
os.write(reinterpret_cast<char const *>(p.data()), p.width() * p.height() * 3);
|
os.write(reinterpret_cast<char const *>(p.data()), p.width() * p.height() * 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue