aboutsummaryrefslogtreecommitdiff
path: root/src/BMPImage.cpp
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-05-06 15:55:37 +1200
committerDylan <boss@tehbox.org>2026-05-06 15:55:51 +1200
commit4d5d07beeef8ae4b7daf602bf66216ed8ff81442 (patch)
tree77decab5aedd2650e0678c3845a27c8e18ef8909 /src/BMPImage.cpp
parentd60976a70e68e1cd312b0e56fe6fbe6c7428cbaa (diff)
downloadtehimage-4d5d07beeef8ae4b7daf602bf66216ed8ff81442.tar.gz
tehimage-4d5d07beeef8ae4b7daf602bf66216ed8ff81442.zip
feat: Started on PNG writing implementation
Diffstat (limited to 'src/BMPImage.cpp')
-rw-r--r--src/BMPImage.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/BMPImage.cpp b/src/BMPImage.cpp
index a22e65d..3e3f675 100644
--- a/src/BMPImage.cpp
+++ b/src/BMPImage.cpp
@@ -117,6 +117,7 @@ namespace TehImage
for(int y = height-1; y >= 0; y--)
{
+ writer.flushBuffer();
for(int x = 0; x < width; x++)
{
Pixel& pixel = (*this)[x,y];
@@ -125,6 +126,7 @@ namespace TehImage
writer.writeData(pixel.r);
}
writer.zeroBytes((4-((width * 3)%4))%4);
+ writer.flushBuffer();
}
writer.close();