Skip to content

Commit b2005c7

Browse files
committed
Crop, Resize, Scale, Rotate support for S3.
1 parent 935af8c commit b2005c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

java/src/main/java/com/genexus/GxImageUtil.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class GxImageUtil {
1414
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(GxImageUtil.class);
1515
private static int INVALID_CODE = -1;
16-
16+
1717
private static InputStream getInputStream(String imageFile) throws IOException {
1818
return new GXFile(imageFile).getStream();
1919
}
@@ -78,7 +78,9 @@ private static void writeImage(BufferedImage croppedImage, String destinationFil
7878
try (ByteArrayOutputStream outStream = new ByteArrayOutputStream()) {
7979
ImageIO.write(croppedImage, CommonUtil.getFileType(destinationFilePathOrUrl), outStream);
8080
try (ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray())) {
81-
new GXFile(destinationFilePathOrUrl).create(inStream, true);
81+
GXFile file = new GXFile(destinationFilePathOrUrl);
82+
file.create(inStream, true);
83+
file.close();
8284
}
8385
}
8486
}

0 commit comments

Comments
 (0)