drop support for 800x600 screens and add support for 1920x1080
authorGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 8 Jul 2013 21:17:01 +0000 (23:17 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 8 Jul 2013 21:17:01 +0000 (23:17 +0200)
bin/booh-backend
data/booh/themes/gradient/metadata/parameters.rb
data/booh/themes/simple/metadata/parameters.rb
lib/booh/booh-lib.rb
www/download.html

index 725568b..b16f160 100644 (file)
@@ -1055,7 +1055,7 @@ def walk_source_dir
                     end
                     thumbnail_dest_img = base_dest_img + "-#{size_thumbnails}.jpg"
                     thumbnail_images[sizeobj['name']] << File.basename(thumbnail_dest_img)
-                    todo << { 'filename' => thumbnail_dest_img,  'size' => size_thumbnails }
+                    todo << { 'filename' => thumbnail_dest_img, 'size' => size_thumbnails }
                 end
                 gen_thumbnails_element("#{dir}/#{img}", elem, true, todo)
                 if $limit_sizes =~ /original/
index 6042efc..706b797 100644 (file)
 
 bindtextdomain("booh")
 
-#- we often will want to have one size to nicely fit 800x600 screens,
-#- one for 1024x768 and one for 1280x1024
 #- it's necessary to fit according to the typical space taken by
 #- widgets defined in the skeleton of the theme
 #-
 #- ***IMPORTANT***: CHOOSE 4/3 ASPECT RATIO SIZES (for thumbnails)!
 $images_size = [
-    {
-        'name' => 'small',
-        'description' => _("Sizes that should fit browsers in fullscreen for 800x600 screens"),
-        'fullscreen' => '600x331',
-        'thumbnails' => '192x144',
-        'optimizedforwidth' => '800',
-        'optional' => true,
-    },
     {
         'name' => 'medium',
         'description' => _("Sizes that should fit browsers in fullscreen for 1024x768 screens"),
-        'fullscreen' => '758x422',
+        'fullscreen' => '940x380',
         'thumbnails' => '240x180',
         'optimizedforwidth' => '1024',
         'default' => true,
@@ -46,14 +36,14 @@ $images_size = [
     {
         'name' => 'large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1280x1024 screens"),
-        'fullscreen' => '960x528',
+        'fullscreen' => '1200x604',
         'thumbnails' => '309x232',
         'optimizedforwidth' => '1280',
     },
     {
         'name' => 'x-large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1400x1050 screens"),
-        'fullscreen' => '1050x576',
+        'fullscreen' => '1320x630',
         'thumbnails' => '328x245',
         'optimizedforwidth' => '1400',
         'optional' => true,
@@ -61,7 +51,7 @@ $images_size = [
     {
         'name' => 'xx-large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1600x1200 screens"),
-        'fullscreen' => '1200x660',
+        'fullscreen' => '1500x750',
         'thumbnails' => '375x281',
         'optimizedforwidth' => '1600',
         'optional' => true,
@@ -69,10 +59,17 @@ $images_size = [
     {
         'name' => 'widescreen',
         'description' => _("Sizes that should fit browsers in fullscreen for 1680x1050 screens"),
-        'fullscreen' => '1600x660',
+        'fullscreen' => '1600x630',
         'thumbnails' => '390x292',
         'optimizedforwidth' => '1680',
     },
+    {
+        'name' => 'fullhd',
+        'description' => _("Sizes that should fit browsers in fullscreen for 1920x1080 screens"),
+        'fullscreen' => '1820x660',
+        'thumbnails' => '445x333',
+        'optimizedforwidth' => '1920',
+    },
 ]
 
 $allowed_N_values = [ 3, 4, 5, 6, 8, 12 ]
index 43e2662..92c0f40 100644 (file)
 
 bindtextdomain("booh")
 
-#- we often will want to have one size to nicely fit 800x600 screens,
-#- one for 1024x768 and one for 1280x1024
 #- it's necessary to fit according to the typical space taken by
 #- widgets defined in the skeleton of the theme
 #-
 #- ***IMPORTANT***: CHOOSE 4/3 ASPECT RATIO SIZES (for thumbnails)!
 $images_size = [
-    {
-        'name' => 'small',
-        'description' => _("Sizes that should fit browsers in fullscreen for 800x600 screens"),
-        'fullscreen' => '750x414',
-        'thumbnails' => '192x144',
-        'optimizedforwidth' => '800',
-        'optional' => true,
-    },
     {
         'name' => 'medium',
         'description' => _("Sizes that should fit browsers in fullscreen for 1024x768 screens"),
@@ -46,14 +36,14 @@ $images_size = [
     {
         'name' => 'large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1280x1024 screens"),
-        'fullscreen' => '1200x660',
+        'fullscreen' => '1200x724',
         'thumbnails' => '300x225',
         'optimizedforwidth' => '1280',
     },
     {
         'name' => 'x-large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1400x1050 screens"),
-        'fullscreen' => '1312x721',
+        'fullscreen' => '1312x750',
         'thumbnails' => '328x245',
         'optimizedforwidth' => '1400',
         'optional' => true,
@@ -61,7 +51,7 @@ $images_size = [
     {
         'name' => 'xx-large',
         'description' => _("Sizes that should fit browsers in fullscreen for 1600x1200 screens"),
-        'fullscreen' => '1500x825',
+        'fullscreen' => '1500x900',
         'thumbnails' => '375x281',
         'optimizedforwidth' => '1600',
         'optional' => true,
@@ -69,10 +59,17 @@ $images_size = [
     {
         'name' => 'widescreen',
         'description' => _("Sizes that should fit browsers in fullscreen for 1680x1050 screens"),
-        'fullscreen' => '1600x660',
+        'fullscreen' => '1580x750',
         'thumbnails' => '390x292',
         'optimizedforwidth' => '1680',
     },
+    {
+        'name' => 'fullhd',
+        'description' => _("Sizes that should fit browsers in fullscreen for 1920x1080 screens"),
+        'fullscreen' => '1820x780',
+        'thumbnails' => '445x333',
+        'optimizedforwidth' => '1920',
+    },
 ]
 
 $allowed_N_values = [ 3, 4, 5, 6, 8, 12 ]
index c319475..c12b482 100644 (file)
@@ -173,10 +173,8 @@ module Booh
 
         if optimizefor32
             $images_size.each { |e|
-                e['fullscreen'].gsub!(/(\d+x)(\d+)/) { $1 + ($2.to_f*8/9).to_i.to_s }
-                e['thumbnails'].gsub!(/(\d+x)(\d+)/) { $1 + ($2.to_f*8/9).to_i.to_s }
+                e['thumbnails'].gsub!(/(\d+x)(\d+)/) { $1 + ($2.to_f*8/9).to_i.to_s }  #- 4/3 / 3/2
             }
-            $albums_thumbnail_size.gsub!(/(\d+x)(\d+)/) { $1 + ($2.to_f*8/9).to_i.to_s }
         end
 
         if nperrow && nperrow != $default_N
@@ -203,7 +201,7 @@ module Booh
         #- /usr/lib/gdk-pixbuf/loaders/libpixbufloader-tiff.so
         #- /usr/lib/gdk-pixbuf/loaders/libpixbufloader-xbm.so
         #- /usr/lib/gdk-pixbuf/loaders/libpixbufloader-xpm.so
-        if entry =~ /\.(bmp|gif|ico|jpg|jpe|png|pnm|tif|xbm|xpm)$/i && entry !~ /['"\[\]]/
+        if entry =~ /\.(bmp|gif|ico|jpg|jpe|jpeg|png|pnm|tif|xbm|xpm)$/i && entry !~ /['"\[\]]/
             return 'image'
         elsif !$ignore_videos && entry =~ /\.(mov|avi|mpg|mpeg|mpe|wmv|asx|3gp|mp4|ogm|ogv|flv|f4v|f4p|dv)$/i && entry !~ /['"\[\]]/
             #- might consider using file magic later..
index 23b3ab1..0acaa7f 100644 (file)
@@ -188,6 +188,7 @@ deb-src http://ppa.launchpad.net/booh/ppa/ubuntu natty main
                <li>new theme <a href="http://booh.org/themes/gradient/">"gradient"</a></li>
                <li>properly work with Ruby 1.9</li>
                <li>much faster whitebalance and gammacorrect filters</li>
+               <li>add <em>widescreen (1680x1050)</em> and <em>full-hd (1920x1080)</em> target screen sizes</li>
            </ul>
        </li>
    </ul>