Add 2018/bellard/try.sh
This commit is contained in:
1 parent
35ca2f8d1f
commit
485b24beab
3 files changed
+68
-14
No files matched your search
+11
-9
@@ -17,18 +17,20 @@ code](#alternate-code) below.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
eog lena.ppm # On Linux
|
||||
open -a Preview lena.ppm # On macOS
|
||||
First open [Lenna.png](Lenna.png) in your graphics viewer of choice. Next, after
|
||||
running the above command (`./prog > lena.ppm`), open `lena.ppm` in your
|
||||
graphics viewer of choice. After that try:
|
||||
|
||||
pngtopam < Lenna.png | pnmscale 0.25 | cjpeg -arithmetic -dct float -quality 14 > small.jpg
|
||||
```sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
NOTE: `pngtopam(1)` (or `pngtopnm(1)` for older versions) and `pnmscale` come from
|
||||
the netpbm project and `cjpeg(1)` comes from `libjpeg-turbo`. If you don't have
|
||||
these tools already see [FAQ 3.15 - How do I compile and install netpbm for
|
||||
entries that require it?](/faq.md#netpbm) and [FAQ 3.16 - How do I compile and
|
||||
install libjpeg-turbo for entries that require it?](/faq.md#libjpeg).
|
||||
NOTE: the script uses the tools `pngtopam(1)` (or `pngtopnm(1)` for older
|
||||
versions) and `pnmscale` come from the netpbm project and `cjpeg(1)` comes from
|
||||
`libjpeg-turbo`. If you don't have these tools already see [FAQ 3.15 - How do I
|
||||
compile and install netpbm for entries that require it?](/faq.md#netpbm) and
|
||||
[FAQ 3.16 - How do I compile and install libjpeg-turbo for entries that require
|
||||
it?](/faq.md#libjpeg).
|
||||
|
||||
NOTE: [Lenna.png](Lenna.png) is from
|
||||
<https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png>.
|
||||
|
||||
Reference in new issue
Block a user