File: chunk-replace-gamma

package info (click to toggle)
pypng 0.20231004.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 724 kB
  • sloc: python: 4,818; sh: 230; makefile: 19
file content (14 lines) | stat: -rwxr-xr-x 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

PATH=${PWD%code*}code:$PATH

pngnogamma () {
  priforgepng -d 2 glr rbr gtb -s 8 | priweavepng - - -
}

# Check no gAMA chunk first, then add one, replace it, and check again
pngnogamma | pripnglsch | grep -q gAMA && exit 9
pngnogamma | prichunkpng --gamma 0.45 - |
  prichunkpng --gamma 1 - |
  pripnglsch |
  grep -c gAMA | grep -q '^1$'