Commit 0202820c authored by Fjen Undso's avatar Fjen Undso
Browse files

changed license and added pngquant for optimization

parent c339c5fa
#/bin/sh #/bin/sh
# Licensed under the "do anything you want" license.
# Trim and scale pngs in current directory according to the directories inside. # Trim and scale pngs in current directory according to the directories inside.
# Do some optimizing stuff afterwards. # Do some optimizing stuff afterwards.
# depends on: imagemagick, pngquant, optipng, advpng (advancecomp)
# Copyright (C) 2013, fjen and ci3nt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, pulverize, distribute, synergize,
# compost, defenestrate, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# - The above copyright notice and this permission notice, or one of similar
# effect, shall be included in all copies or substantial portions of the
# Software.
#
# - If the Author of the Software (the "Author") needs a place to crash and
# you have a sofa available, you should maybe give the Author a break and
# let him sleep on your couch.
#
# - If you are caught in a dire situation wherein you only have enough time
# to save one person out of a group, and the Author is a member of that group,
# you must save the Author.
#
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO BLAH BLAH BLAH
## ISN'T IT FUNNY HOW UPPER-CASE MAKES IT SOUND LIKE THE LICENSE IS ANGRY AND
## SHOUTING AT YOU?!?
cd images/ cd images/
for dir in ../ready/* for dir in ../ready/*; do
do
size=${dir##*/} size=${dir##*/}
echo "Directory $size found. Starting to work on it..." echo "Directory $size found. Starting to work on it..."
rm -r $dir/* rm -r $dir/*
for img in *.png # resize
do for img in *.png; do
convert -trim -strip -resize x$size $img $dir/$img convert -trim -strip -resize x$size $img $dir/$img
done done
# make things small
oldsize=$(du -s $dir | cut -f 1) oldsize=$(du -s $dir | cut -f 1)
pngquant --ext .png -f $dir/*.png
advpng -z -4 $dir/*.png > /dev/null advpng -z -4 $dir/*.png > /dev/null
optipng -o 7 $dir/*.png > /dev/null optipng -o 7 $dir/*.png > /dev/null
newsize=$(du -s $dir | cut -f 1) newsize=$(du -s $dir | cut -f 1)
......
ready/20/allthethings.png

1.8 KB | W: | H:

ready/20/allthethings.png

1.51 KB | W: | H:

ready/20/allthethings.png
ready/20/allthethings.png
ready/20/allthethings.png
ready/20/allthethings.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/angry.png

936 Bytes | W: | H:

ready/20/angry.png

891 Bytes | W: | H:

ready/20/angry.png
ready/20/angry.png
ready/20/angry.png
ready/20/angry.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/awwyeah.png

1.33 KB | W: | H:

ready/20/awwyeah.png

1.23 KB | W: | H:

ready/20/awwyeah.png
ready/20/awwyeah.png
ready/20/awwyeah.png
ready/20/awwyeah.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/bored.png

917 Bytes | W: | H:

ready/20/bored.png

886 Bytes | W: | H:

ready/20/bored.png
ready/20/bored.png
ready/20/bored.png
ready/20/bored.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/cereal-spitting.png

811 Bytes | W: | H:

ready/20/cereal-spitting.png

1.43 KB | W: | H:

ready/20/cereal-spitting.png
ready/20/cereal-spitting.png
ready/20/cereal-spitting.png
ready/20/cereal-spitting.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/cerealguy-handup.png

684 Bytes | W: | H:

ready/20/cerealguy-handup.png

1.29 KB | W: | H:

ready/20/cerealguy-handup.png
ready/20/cerealguy-handup.png
ready/20/cerealguy-handup.png
ready/20/cerealguy-handup.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/cerealguy.png

696 Bytes | W: | H:

ready/20/cerealguy.png

1.24 KB | W: | H:

ready/20/cerealguy.png
ready/20/cerealguy.png
ready/20/cerealguy.png
ready/20/cerealguy.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/challenge-accepted.png

1.09 KB | W: | H:

ready/20/challenge-accepted.png

1.21 KB | W: | H:

ready/20/challenge-accepted.png
ready/20/challenge-accepted.png
ready/20/challenge-accepted.png
ready/20/challenge-accepted.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/chanfuck.png

872 Bytes | W: | H:

ready/20/chanfuck.png

1.47 KB | W: | H:

ready/20/chanfuck.png
ready/20/chanfuck.png
ready/20/chanfuck.png
ready/20/chanfuck.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/comeon.png

523 Bytes | W: | H:

ready/20/comeon.png

929 Bytes | W: | H:

ready/20/comeon.png
ready/20/comeon.png
ready/20/comeon.png
ready/20/comeon.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/crying.png

1.29 KB | W: | H:

ready/20/crying.png

1.32 KB | W: | H:

ready/20/crying.png
ready/20/crying.png
ready/20/crying.png
ready/20/crying.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/derping.png

954 Bytes | W: | H:

ready/20/derping.png

903 Bytes | W: | H:

ready/20/derping.png
ready/20/derping.png
ready/20/derping.png
ready/20/derping.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/eek.png

700 Bytes | W: | H:

ready/20/eek.png

662 Bytes | W: | H:

ready/20/eek.png
ready/20/eek.png
ready/20/eek.png
ready/20/eek.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/f7u12.png

1.54 KB | W: | H:

ready/20/f7u12.png

1.48 KB | W: | H:

ready/20/f7u12.png
ready/20/f7u12.png
ready/20/f7u12.png
ready/20/f7u12.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/facepalm.png

699 Bytes | W: | H:

ready/20/facepalm.png

1.15 KB | W: | H:

ready/20/facepalm.png
ready/20/facepalm.png
ready/20/facepalm.png
ready/20/facepalm.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/fapfap.png

578 Bytes | W: | H:

ready/20/fapfap.png

1.09 KB | W: | H:

ready/20/fapfap.png
ready/20/fapfap.png
ready/20/fapfap.png
ready/20/fapfap.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/foreveralone-happy.png

641 Bytes | W: | H:

ready/20/foreveralone-happy.png

1.22 KB | W: | H:

ready/20/foreveralone-happy.png
ready/20/foreveralone-happy.png
ready/20/foreveralone-happy.png
ready/20/foreveralone-happy.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/foreveralone.png

632 Bytes | W: | H:

ready/20/foreveralone.png

1.07 KB | W: | H:

ready/20/foreveralone.png
ready/20/foreveralone.png
ready/20/foreveralone.png
ready/20/foreveralone.png
  • 2-up
  • Swipe
  • Onion skin
ready/20/fthatshit.png

954 Bytes | W: | H:

ready/20/fthatshit.png

944 Bytes | W: | H:

ready/20/fthatshit.png
ready/20/fthatshit.png
ready/20/fthatshit.png
ready/20/fthatshit.png
  • 2-up
  • Swipe
  • Onion skin
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment