diff --git a/docs/cornell.png b/docs/cornell.png index 9eb79b9..0df2316 100644 Binary files a/docs/cornell.png and b/docs/cornell.png differ diff --git a/docs/cornell_smoke.png b/docs/cornell_smoke.png index d4e202c..2078917 100644 Binary files a/docs/cornell_smoke.png and b/docs/cornell_smoke.png differ diff --git a/docs/simple.png b/docs/simple.png index 85b2312..16e9e7c 100644 Binary files a/docs/simple.png and b/docs/simple.png differ diff --git a/docs/squares.png b/docs/squares.png index f66d4d1..890dcb4 100644 Binary files a/docs/squares.png and b/docs/squares.png differ diff --git a/src/main/java/eu/jonahbauer/raytracing/render/ImageFormat.java b/src/main/java/eu/jonahbauer/raytracing/render/ImageFormat.java index 6a92e53..c486dbb 100644 --- a/src/main/java/eu/jonahbauer/raytracing/render/ImageFormat.java +++ b/src/main/java/eu/jonahbauer/raytracing/render/ImageFormat.java @@ -41,6 +41,7 @@ public enum ImageFormat { private static final int IHDR_TYPE = 0x49484452; private static final int IDAT_TYPE = 0x49444154; private static final int IEND_TYPE = 0x49454E44; + private static final int IEND_CRC = 0xAE426082; @Override public void write(@NotNull Canvas image, @NotNull OutputStream out) throws IOException { @@ -101,7 +102,7 @@ public enum ImageFormat { private void writeIEND(@NotNull Canvas image, @NotNull DataOutputStream data) throws IOException { data.writeInt(0); data.writeInt(IEND_TYPE); - data.writeInt(0); + data.writeInt(IEND_CRC); } private static class NoCloseDataOutputStream extends DataOutputStream {