mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge branch 'patch-cardpicture-panel-image-copy-from-subimage' into 'master'
Patch to CardPicturePanel to work on cropped Card Images See merge request core-developers/forge!5362
This commit is contained in:
@@ -84,7 +84,7 @@ public final class CardPicturePanel extends JPanel implements ImageFetcher.Callb
|
|||||||
if (displayed instanceof PaperCard) {
|
if (displayed instanceof PaperCard) {
|
||||||
ColorModel cm = image.getColorModel();
|
ColorModel cm = image.getColorModel();
|
||||||
boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
|
boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
|
||||||
WritableRaster raster = image.copyData(null);
|
WritableRaster raster = image.copyData(image.getRaster().createCompatibleWritableRaster());
|
||||||
final BufferedImage displayedimage = new BufferedImage(cm, raster, isAlphaPremultiplied, null)
|
final BufferedImage displayedimage = new BufferedImage(cm, raster, isAlphaPremultiplied, null)
|
||||||
.getSubimage(0, 0, image.getWidth(), image.getHeight());
|
.getSubimage(0, 0, image.getWidth(), image.getHeight());
|
||||||
this.currentImage = displayedimage;
|
this.currentImage = displayedimage;
|
||||||
|
|||||||
Reference in New Issue
Block a user