Live data from Hacker News

Show HN: Free textbook on engineering thermodynamics

thermodynamicsbook.com

51–53 of 53 posts

Re: Show HN: Free textbook on engineering thermodynamics

#52
post #25

Earlier quoted context omitted.

Probably the main thing you could look at is what pixel density you want in your images. For example, there's a 1 megabyte image of a tanker trailer that is displayed at about 1.5 x 3 inches, you could get rid of 3/4 of those pixels (going from ~400 ppi to ~200 ppi) and not really change the quality of the image for a casual reader.

that’s a really good place to start, thank you!

One week later, a follow-up. I went through the largest JPG files and was able to shave 7 MB off the final PDF file size, with no noticeable drop in quality, as far as I can tell: https://framagit.org/olivier/thermodynamique/-/commit/063038...

As for the PNG files, I gave up after spending a whole day on them. I was able to compress them losslessly to save 6 MB, but this did not carry over into the PDF, where they are not embedded but re-encoded. The best way to save space here would be to switch to SVG, but this is too much work and last time I tried 12 years ago it did not work well. Alternatively, removing transparency would help (and anyway the source SVG is given for each file). But that’s not very future-proof and somewhere I know there’s a teacher who just is going to right-click-save a diagram and will get a nice crisp transparent-background PNG they can instantly reuse. Verdict: at this point, I am calling it good enough. :-)

Post reply on HN