Now correctly uses Image*Input*Stream instead of ImageOutputStream...

(cherry picked from commit 4e69efce280c7caa2ce454ef0ddbafd9ca7083e2)
This commit is contained in:
Harald Kuhr 2020-11-13 15:52:17 +01:00
parent bd3700ea59
commit 74718f1ffb

View File

@ -35,7 +35,7 @@ public class EXIFUtilities {
* @throws IOException if an error occurs during reading.
*/
public static IIOImage readWithOrientation(final URL input) throws IOException {
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
return readWithOrientation(stream);
}
}
@ -48,7 +48,7 @@ public class EXIFUtilities {
* @throws IOException if an error occurs during reading.
*/
public static IIOImage readWithOrientation(final InputStream input) throws IOException {
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
return readWithOrientation(stream);
}
}
@ -61,7 +61,7 @@ public class EXIFUtilities {
* @throws IOException if an error occurs during reading.
*/
public static IIOImage readWithOrientation(final File input) throws IOException {
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
return readWithOrientation(stream);
}
}