Skip to content

Commit

Permalink
Restore previously removed PngFileWriter and TiffFileWriter construct…
Browse files Browse the repository at this point in the history
…ors. (#585)
  • Loading branch information
leMaik authored May 10, 2020
1 parent 5dc674d commit 3c682e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chunky/src/java/se/llbit/png/PngFileWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package se.llbit.png;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import se.llbit.util.TaskTracker;

Expand Down Expand Up @@ -45,6 +47,13 @@ public PngFileWriter(OutputStream out) throws IOException {
this.out.writeLong(PNG_SIGNATURE);
}

/**
* @throws IOException
*/
public PngFileWriter(File file) throws IOException {
this(new FileOutputStream(file));
}

/**
* @throws IOException
*/
Expand Down
9 changes: 9 additions & 0 deletions chunky/src/java/se/llbit/tiff/TiffFileWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package se.llbit.tiff;

import java.io.File;
import java.io.FileOutputStream;
import se.llbit.chunky.renderer.scene.Scene;
import se.llbit.util.TaskTracker;

Expand Down Expand Up @@ -47,6 +49,13 @@ public TiffFileWriter(OutputStream out) throws IOException {
out.write(0x2A);
}

/**
* @throws IOException
*/
public TiffFileWriter(File file) throws IOException {
this(new FileOutputStream(file));
}

/**
* @throws IOException
*/
Expand Down

0 comments on commit 3c682e8

Please sign in to comment.