forked from j62/ctbrec
1
0
Fork 0

Scale down images to 360px to prevent OutOfMemoryErrors

This commit is contained in:
0xboobface 2019-12-31 12:54:27 +01:00
parent abef15a5f7
commit 25fc51521a
1 changed files with 7 additions and 7 deletions

View File

@ -363,7 +363,7 @@ public class ThumbCell extends StackPane {
.build();
try (Response resp = CamrecApplication.httpClient.execute(req)) {
if (resp.isSuccessful()) {
Image img = new Image(resp.body().byteStream());
Image img = new Image(resp.body().byteStream(), 0, 360, true, true);
if (img.progressProperty().get() == 1.0) {
Platform.runLater(() -> {
iv.setImage(img);