ssloy / tinyrenderer

A brief computer graphics / rendering course
https://github.com/ssloy/tinyrenderer/wiki
Other
20.59k stars 1.98k forks source link

Cannot open output tga file #41

Open b1060t opened 4 years ago

b1060t commented 4 years ago

What I've done is just clone and compile using WSL since I dont have a linux environment at present, however the output tga file seems to be corrupted like this:

output

Is there anything to do with WSL like compatibility?

thrt520asd commented 4 years ago

Hi my platform is windows , and i compile this project with cmake by Visual Studio 2019.I meet the same question with you ,that I can't open the output.tag file ,but I find that the compiler auto comlete the "image.write_tga_file("output_normal100X100.tga");" with true.And without any warn or error.So I fixed it by add true at the end.Is my sutiation same with yours?Hope can help you with this problem!

b1060t commented 4 years ago

Still not working. I'll try vm later

mcejp commented 4 years ago

I also had an issue where Pillow (a Python library) would fail with an exception when trying to load the image.

What helped was setting the 3rd argument of image.write_tga_file to false, which disables RLE compression.