mirror of https://github.com/FreeCol/freecol.git
Directly use an image with an exact match if available.
This commit is contained in:
parent
63b053b868
commit
cb44400862
|
@ -203,6 +203,9 @@ public class ImageResource extends Resource implements Cleanable {
|
|||
if (img == null) {
|
||||
return null;
|
||||
}
|
||||
if (size.width == img.getWidth() && size.height == img.getHeight()) {
|
||||
return img;
|
||||
}
|
||||
if (loadedImages == null || loadedImages.isEmpty()) {
|
||||
return createResizedImage(img, size.width, size.height, true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue