Refactor cards and token images code (#10139):

- removed outdated token store format (example: BIRD.W.BIRD.CREATURE.1.1.full.jpg)
 - removed duplicated cache images code;
 - removed duplicated set code fields;
 - removed outdated auto-generated thumb files (also all *.thumb.zip files will be deleted on startup);
This commit is contained in:
Oleg Agafonov 2023-03-24 06:44:11 +04:00
parent d93e533c75
commit 66d0ef4b35
25 changed files with 333 additions and 634 deletions

View file

@ -293,7 +293,11 @@ public class CardIconsPanel extends JPanel {
//BufferedImage iconImage = ImageManagerImpl.instance.getCardIcon(icon.getIconType().getResourceName(), this.halfSize * 2);
// cached call
BufferedImage iconImageCached = ImageCache.getCardIconImage(icon.getIconType().getResourceName(), this.halfSize * 2, color.toString());
BufferedImage iconImageCached = ImageCache.getCardIconImage(
icon.getIconType().getResourceName(),
this.halfSize * 2,
color.toString()
).getImage();
if (iconImageCached != null && this.font != null) {
BufferedImage iconImageWithText = ImageManagerImpl.deepCopy(iconImageCached); // must copy cached value before modify