diff --git a/src/ui/imageproviders.cpp b/src/ui/imageproviders.cpp index de81da68..838f4db7 100644 --- a/src/ui/imageproviders.cpp +++ b/src/ui/imageproviders.cpp @@ -8,10 +8,10 @@ QImage getCollisionMetatileImage(Block block) { } QImage getCollisionMetatileImage(int collision, int elevation) { + static const QImage collisionImage(":/images/collisions.png"); int x = (collision != 0) * 16; int y = elevation * 16; - QPixmap collisionImage = QPixmap(":/images/collisions.png").copy(x, y, 16, 16); - return collisionImage.toImage(); + return collisionImage.copy(x, y, 16, 16); } QImage getMetatileImage(