From 877ca68949fa6c1622133a179dd0759ae3e26285 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 16 Sep 2011 23:04:43 -0700 Subject: [PATCH] Also produce a scaled down version of the logo. --- doc/logo/Makefile | 1 + doc/logo/shrink_logo.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 doc/logo/shrink_logo.py diff --git a/doc/logo/Makefile b/doc/logo/Makefile index 2dd15c71..46c36fda 100644 --- a/doc/logo/Makefile +++ b/doc/logo/Makefile @@ -4,6 +4,7 @@ logo: green_orange_snake.png snake_logo.svg inkscape --export-png=scikits_image_logo.png --export-dpi=100 \ --export-area-drawing --export-background-opacity=1 \ snake_logo.svg + python shrink_logo.py green_orange_snake.png: python scikits_image_logo.py --no-plot diff --git a/doc/logo/shrink_logo.py b/doc/logo/shrink_logo.py new file mode 100644 index 00000000..f9c16e2c --- /dev/null +++ b/doc/logo/shrink_logo.py @@ -0,0 +1,16 @@ +from scikits.image import io, transform + +s = 0.7 + +img = io.imread('scikits_image_logo.png') +h, w, c = img.shape + +print "\nScaling down logo by %.1fx..." % s + +img = transform.homography(img, [[s, 0, 0], + [0, s, 0], + [0, 0, 1]], + output_shape=(int(h*s), int(w*s), 4), + order=3) + +io.imsave('scikits_image_logo_small.png', img)