add fix whitebalance
[booh] / bin / booh-fix-whitebalance
1 #!/usr/bin/ruby
2 #
3 #                         *  BOOH  *
4 #
5 # A.k.a `Best web-album Of the world, Or your money back, Humerus'.
6 #
7 # The acronyn sucks, however this is a tribute to Dragon Ball by
8 # Akira Toriyama, where the last enemy beaten by heroes of Dragon
9 # Ball is named "Boo". But there was already a free software project
10 # called Boo, so this one will be it "Booh". Or whatever.
11 #
12 #
13 # Copyright (c) 2005 Guillaume Cottenceau <gc3 at bluewin.ch>
14 #
15 # This software may be freely redistributed under the terms of the GNU
16 # public license version 2.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22 require 'gtk2'
23 require 'booh/gtkadds'
24
25 if ARGV.size != 3
26     puts "Usage: %s orig_file dest_file_jpeg level" % File.basename($0)
27     exit 1
28
29 else
30     Gdk::Pixbuf.new(ARGV[0]).whitebalance!(ARGV[2].to_f).save(ARGV[1], "jpeg")
31 end