#include #include #include class ImageService { private: std::shared_ptr texture = std::make_shared(); public: ImageService(const std::string& name){ texture->loadFromFile(name); } std::shared_ptr 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); } };