Skip to content

Commit 5e10dc6

Browse files
committed
Add hints for dealing with bad PPMs on Windows
Resolves #636
1 parent 6814a6a commit 5e10dc6

File tree

2 files changed

+1616
-5
lines changed

2 files changed

+1616
-5
lines changed

books/RayTracingInOneWeekend.html

+13-5
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,19 @@
171171
[Listing [first-img]: First image output]
172172
</div>
173173

174-
If it doesn’t, then you probably just have some newlines or something similar that is confusing the
175-
image reader.
176-
177-
If you want to produce more image types than PPM, I am a fan of `stb_image.h`, a header-only image
178-
library available on GitHub at https://github.com/nothings/stb.
174+
If it doesn’t, then you may just have some line-ending differences or something similar that is
175+
confusing the image reader.
176+
To help debug this, you can find a file `test.ppm` in the `images` directory of this project to
177+
ensure that your viewer can handle this format, and to use as comparison for a valid PPM file.
178+
179+
Some readers have reported problems viewing their generated files on Windows.
180+
In this case, the problem is often that the PPM is written out as UTF-16, often from PowerShell.
181+
If you run into this problem, see
182+
[Discussion 1114](https://github.com/RayTracing/raytracing.github.io/discussions/1114)
183+
for help with this issue.
184+
185+
If you want to produce other image formats, I am a fan of `stb_image.h`, a header-only image library
186+
available on GitHub at https://github.com/nothings/stb.
179187

180188

181189
Adding a Progress Indicator

0 commit comments

Comments
 (0)