mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-03 23:53:15 -04:00
Now correctly uses Image*Input*Stream instead of ImageOutputStream...
This commit is contained in:
@@ -35,7 +35,7 @@ public class EXIFUtilities {
|
|||||||
* @throws IOException if an error occurs during reading.
|
* @throws IOException if an error occurs during reading.
|
||||||
*/
|
*/
|
||||||
public static IIOImage readWithOrientation(final URL input) throws IOException {
|
public static IIOImage readWithOrientation(final URL input) throws IOException {
|
||||||
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
|
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
|
||||||
return readWithOrientation(stream);
|
return readWithOrientation(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ public class EXIFUtilities {
|
|||||||
* @throws IOException if an error occurs during reading.
|
* @throws IOException if an error occurs during reading.
|
||||||
*/
|
*/
|
||||||
public static IIOImage readWithOrientation(final InputStream input) throws IOException {
|
public static IIOImage readWithOrientation(final InputStream input) throws IOException {
|
||||||
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
|
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
|
||||||
return readWithOrientation(stream);
|
return readWithOrientation(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ public class EXIFUtilities {
|
|||||||
* @throws IOException if an error occurs during reading.
|
* @throws IOException if an error occurs during reading.
|
||||||
*/
|
*/
|
||||||
public static IIOImage readWithOrientation(final File input) throws IOException {
|
public static IIOImage readWithOrientation(final File input) throws IOException {
|
||||||
try (ImageInputStream stream = ImageIO.createImageOutputStream(input)) {
|
try (ImageInputStream stream = ImageIO.createImageInputStream(input)) {
|
||||||
return readWithOrientation(stream);
|
return readWithOrientation(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user