File: python2

package info (click to toggle)
pythonmagick 0.9.19-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,732 kB
  • sloc: sh: 4,361; cpp: 2,849; perl: 279; python: 175; makefile: 123
file content (14 lines) | stat: -rwxr-xr-x 309 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -exu

# pwd needs to be outside of the source folder because it contains a PythonMagick/
cd /
PYTHON=$(basename "$0")

$PYTHON >/dev/null <<EOF
import PythonMagick as Magick
img = Magick.Image('100x100', 'white')
img.quality(100) #full compression
img.magick('PNG')
img.write("/dev/stdout")
EOF