Skip to content

Commit

Permalink
Merge PR WolfireGames#94 ("Fixed the caching of textures by writing 4…
Browse files Browse the repository at this point in the history
… channels instead of 3.")
  • Loading branch information
Fayti1703 committed Sep 8, 2023
2 parents ea9bbe9 + efab383 commit b346679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Images/image_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ void ImageExport::SavePNG(const char *file_path, unsigned char *data, unsigned l
createfile(file_path);
std::string short_path(file_path);
ShortenWindowsPath(short_path);
if (!stbi_write_png(short_path.c_str(), width, height, 3, scaled_data.data(), width * 4)) {
if (!stbi_write_png(short_path.c_str(), width, height, 4, scaled_data.data(), width * 4)) {
DisplayError("Error", "Problem exporting .png file");
}
#else
if (!stbi_write_png(file_path, width, height, 3, scaled_data.data(), width * 4)) {
if (!stbi_write_png(file_path, width, height, 4, scaled_data.data(), width * 4)) {
DisplayError("Error", "Problem exporting .png file");
}
#endif
Expand Down

0 comments on commit b346679

Please sign in to comment.