mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 05:46:59 -04:00
Adjust faceOffset
in skin preview
This commit is contained in:
parent
92cfc3c1d3
commit
c8e8b25c85
@ -95,7 +95,7 @@ public final class AccountHelper {
|
|||||||
|
|
||||||
public static Image getHead(Image skin, int scaleRatio) {
|
public static Image getHead(Image skin, int scaleRatio) {
|
||||||
final int size = 8 * scaleRatio;
|
final int size = 8 * scaleRatio;
|
||||||
final int faceOffset = (int) Math.ceil(0.25 * scaleRatio);
|
final int faceOffset = (int) Math.floor(scaleRatio * 4d / 9d);
|
||||||
BufferedImage image = SwingFXUtils.fromFXImage(skin, null);
|
BufferedImage image = SwingFXUtils.fromFXImage(skin, null);
|
||||||
BufferedImage head = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
|
BufferedImage head = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
|
||||||
Graphics2D g2d = head.createGraphics();
|
Graphics2D g2d = head.createGraphics();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user