diff options
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index ca3cedb..6c3bc34 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1945,9 +1945,9 @@ namespace QuickMedia { image_path.join(std::to_string(image_index + 1)); if(get_file_type(image_path) == FileType::REGULAR) { - std::string image_data; - if(file_get_content(image_path, image_data) == 0) { - if(image_texture.loadFromMemory(image_data.data(), image_data.size())) { + sf::Image image; + if(image.loadFromFile(image_path.data)) { + if(image_texture.loadFromImage(image)) { image_texture.setSmooth(true); //image_texture.generateMipmap(); return LoadImageResult::OK; |