valerionew / triennale-elettronica-polimi

Collezione di materiale libero, prodotto e recuperato, utile ad affrontare la laurea triennale in ingegneria elettronica al Politecnico di Milano
https://valerionew.github.io/triennale-elettronica-polimi/
17 stars 19 forks source link

Use ImageMagick to free us from external resources #56

Closed valerionew closed 2 weeks ago

valerionew commented 2 weeks ago

IMO we are relying too much on externally-hosted resources. At the moment, 28 course notes are hosted on third-party web hostings. On the other hand, it is not possible to upload here files which are larger than 100 MiB.

I've experimented a bit with ImageMagick and I belive we can convert some PDF scans into a compressed but much smaller file.

For now, I've tried with Microelectronic Technologies notes, managing to bring file size down from 560 MB to 56 MB with:

convert -density 150x150 -quality 60 -compress jpeg input.pdf output.pdf

At the moment, I belive this is a reasonable quality file, good enough to be read. I suggest we do not get rid of external links, as we may keep the higher quality, uncompressed, versions there. But we should at least make sure to have a local copy.

valerionew commented 2 weeks ago

Note that this strategy may not be applicable or wise to apply on notes that have OCR, as it may remove the OCR, to be tested.

valerionew commented 2 weeks ago

closed by #57