#include #include class ImageService { private: sf::Texture texture; public: ImageService(const std::string& name){ texture.loadFromFile(name); } sf::Texture& GetTexture(){ return texture; } float GetScale(int width, int height){ auto imgSize = texture.getSize(); return std::min(static_cast(width) / imgSize.x, static_cast(height) / imgSize.y); } };