script: add truncate-progressive-jpeg.go

"script/confirm-matches-djpeg.sh test/data/*.jpeg" shows differences on
"test/data/peacock.progressive.scan00[0-8].jpeg".
This commit is contained in:
Nigel Tao committed 2023-06-01 22:32:37 +10:00
1 parent 50d765839c
commit 27a3197727
15 files changed
+134 -10

No files matched your search

+2
View File
@@ -126,6 +126,7 @@ image](https://commons.wikimedia.org/wiki/File:Pavo_Real_Venezolano.jpg),
Dedication":
- `wget --quiet https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Pavo_Real_Venezolano.jpg/1024px-Pavo_Real_Venezolano.jpg`
- `convert 1024px-Pavo_Real_Venezolano.jpg -resize 100x75 peacock.ppm`
- `convert peacock.ppm peacock.png`
- `rm 1024px-Pavo_Real_Venezolano.jpg`
- `cjpeg peacock.ppm > peacock.default.jpeg`
- `cjpeg -optimize peacock.ppm > peacock.optimize.jpeg`
@@ -137,6 +138,7 @@ Dedication":
- `cjpeg -sample 2x1 peacock.ppm > peacock.s2x1-422.jpeg`
- `cjpeg -sample 1x1 peacock.ppm > peacock.s1x1-444.jpeg`
- `cjpeg -sample 2x2,2x1,1x1 peacock.ppm > peacock.s-weird.jpeg`
- `go run ../../script/truncate-progressive-jpeg.go peacock.progressive.jpeg`
`pi.txt` contains the digits of pi.
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB