Merge branch 'master' into streamify
[nikiroo-utils.git] / src / be / nikiroo / utils / Image.java
index cfcaa74e2c1b8e2f1cd280f687afbfd7e8ad51bf..ace43dedc59d52b596442575ac75fefae2ef99a7 100644 (file)
@@ -7,6 +7,8 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
+import be.nikiroo.utils.streams.MarkableFileInputStream;
+
 /**
  * This class represents an image data.
  * 
@@ -91,7 +93,7 @@ public class Image implements Closeable {
         *             in case of I/O error
         */
        public InputStream newInputStream() throws IOException {
-               return new FileInputStream(data);
+               return new MarkableFileInputStream(new FileInputStream(data));
        }
 
        /**