File: sbit

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 (11 lines) | stat: -rwxr-xr-x 317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# Test that a PPM file with MAXVAL 1 generates an sBIT chunk.

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

# macOS (and good POSIX principles) require that tr is invoked in POSIX locale.
export LC_ALL=C

printf 'P6 8 1 1\n\0\0\0\0\0\1\0\1\0\0\1\1\1\0\0\1\0\1\1\1\0\1\1\1\n' |
pripamtopng - | tr -dc a-zA-Z | grep -q sBIT