Skip to content

Commit 524268d

Browse files
committed
fixed #115
1 parent cac5292 commit 524268d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 0.6.9
22

3-
* Fixed crash on weird URLs on Windows
3+
* Fixed a crash on weird URLs on Windows
4+
* Fixed maxPaintingResolution lower than 32
45

56
# 0.6.8
67

common/src/main/java/immersive_paintings/client/gui/ImmersivePaintingScreen.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ private void rebuildScreenshots() {
629629
if (currentImage != null) {
630630
currentImagePixelZoomCache = -1;
631631
currentImageName = file.getName();
632-
settings = new PixelatorSettings(currentImage);
632+
settings = new PixelatorSettings(currentImage, maxResolution);
633633
setPage(Page.CREATE);
634634
pixelateImage();
635635
}
@@ -737,7 +737,7 @@ private void loadImage(String path) {
737737
currentImagePixelZoomCache = -1;
738738
if (currentImage != null) {
739739
currentImageName = URI.create(path).getPath().replaceFirst(".*/", "").replaceFirst("[.][^.]+$", "");
740-
settings = new PixelatorSettings(currentImage);
740+
settings = new PixelatorSettings(currentImage, maxResolution);
741741
setPage(Page.CREATE);
742742
pixelateImage();
743743
}
@@ -893,8 +893,8 @@ public PixelatorSettings(double dither, int colors, int resolution, int width, i
893893
this.pixelArt = pixelArt;
894894
}
895895

896-
PixelatorSettings(ByteImage currentImage) {
897-
this(0.25, 10, 32, 1, 1, 0.5, 0.5, 1, false);
896+
PixelatorSettings(ByteImage currentImage, int maxResolution) {
897+
this(0.25, 10, Math.min(32, maxResolution), 1, 1, 0.5, 0.5, 1, false);
898898

899899
double target = currentImage.getWidth() / (double) currentImage.getHeight();
900900
double bestScore = 100;

0 commit comments

Comments
 (0)