SFML community forums

General => Feature requests => Topic started by: kingcools on December 27, 2013, 01:56:42 pm

Title: sf::image constructor that allows to initialize an imagefile
Post by: kingcools on December 27, 2013, 01:56:42 pm
hi,

just stumbled upon this, is there a reason there is no

sf::image(std::string filename)
{
loadImage(filename);
}

constructor in the sf::image class? Would be nice to have in my opinion.
Title: Re: sf::image constructor that allows to initialize an imagefile
Post by: Nexus on December 27, 2013, 02:36:20 pm
Yes, such a constructor has two disadvantages: