~jbicha/ubuntu-wallpapers/lp-863509-package-old-wallpapers

« back to all changes in this revision

Viewing changes to rebuild.sh

  • Committer: Paul Sladen
  • Date: 2011-03-23 22:48:38 UTC
  • Revision ID: sladen@ubuntu.com-20110323224838-2vphaz99dg2hw0wo
  * Wallpapers from the Ubuntu 11.04 community contest (LP: #740588)
    - http://www.flickr.com/groups/ubuntunattyshortlist/
    - JPEG 66% compression for photographs (scaled max 2000px width)
    - JPEG 95% compression for illustrations (scaled max 2000px width)
    - update AUTHORS
    - jpegoptim -o -t (see 'rebuild.sh')
  * Incremental tweaks to the default wallpaper for Ubuntu 11.04 (LP: #741253)
    - jpegoptim -o -t (see 'rebuild.sh')

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# '../orig' populated with the contents of:
 
4
# wget https://bugs.launchpad.net/ubuntu/+source/ubuntu-wallpapers/+bug/741253/+attachment/1934355/+files/new_wallpaper_final_full_size03.jpg
 
5
# wget https://bugs.launchpad.net/ubuntu/+source/ubuntu-wallpapers/+bug/740588/+attachment/1933949/+files/Natty%20wallpapers.zip
 
6
 
 
7
rm *.jpg *.png
 
8
cp -a ../orig/*.jpg .
 
9
 
 
10
# default - leaved compressed as-is.
 
11
jpegoptim -o -t new_wallpaper_final_full_size03.jpg
 
12
mv new_wallpaper_final_full_size03.jpg warty-final-ubuntu.png
 
13
 
 
14
# Rescale the rest of the photographics to be not more than 2000px width
 
15
mv 'Lá_no_alto_by_Allyson_Souza.jpg' La_no_alto_by_Allyson_Souza.jpg
 
16
mogrify -resize '2000x2000>' -quality 66 *.jpg
 
17
 
 
18
# take more care with the illustrations and don't resize them either
 
19
# hmmm, Gnome Appearances doesn't seem to show images that are 2560pixels wide...
 
20
for illustration in Aubergine_Sea_by_Wyatt_Kirby Tri_Narwhal_by_momez ; do
 
21
  convert -quality 95 -resize '2000x2000>' ../orig/$illustration.png $illustration.jpg
 
22
  echo illustration: $illustration
 
23
  jpegoptim -o -t $illustration.jpg
 
24
done
 
25
 
 
26
# And the Bad news ... 3440 kB to equal or beat
 
27
du -sc *.jpg *.png
 
28
echo  ...did we beat 3440?
 
29
 
 
30
# AUTHORS
 
31
(head -n3 AUTHORS ; ls -1 *.jpg | tr '_-' '  ' | sed -e 's/\.jpg//') > AUTHORS.new && mv AUTHORS.new AUTHORS
 
32