Changeset 13426


Ignore:
Timestamp:
Feb 28, 2012, 10:18:03 PM (12 years ago)
Author:
rvelices
Message:
  • derivative fix floating point rounding errors for certain sizes
  • increase derivative size for which metadata is kept
  • imagick use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
  • dont show mobile theme links if there is no mobile theme installed
  • mobile theme favicon removed because 404
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/image.class.php

    r13115 r13426  
    459459  function write($destination_filepath)
    460460  {
     461    // use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
     462    $this->image->setSamplingFactors( array(2,1) );
    461463    return $this->image->writeImage($destination_filepath);
    462464  }
  • trunk/i.php

    r13171 r13426  
    520520}
    521521
    522 if ($d_size[0]*$d_size[1] < 100000)
     522if ($d_size[0]*$d_size[1] < 256000)
    523523{// strip metadata for small images
    524524  $image->strip();
  • trunk/include/derivative_params.inc.php

    r13038 r13426  
    210210      {
    211211        $scale_size[0] = $this->ideal_size[0];
    212         $scale_size[1] = floor($scale_size[1] / $ratio_w);
     212        $scale_size[1] = floor(1e-6 + $scale_size[1] / $ratio_w);
    213213      }
    214214      else
    215215      {
    216         $scale_size[0] = floor($scale_size[0] / $ratio_h);
     216        $scale_size[0] = floor(1e-6 + $scale_size[0] / $ratio_h);
    217217        $scale_size[1] = $this->ideal_size[1];
    218218      }
  • trunk/include/page_tail.php

    r13234 r13426  
    6767
    6868//------------------------------------------------------------- mobile version
    69 if (get_device() != 'desktop')
     69if ( !empty($conf['mobile_theme']) && get_device() != 'desktop')
    7070{
    7171  $template->assign('TOGGLE_MOBILE_THEME_URL',
  • trunk/themes/smartpocket/template/header.tpl

    r13234 r13426  
    2323<title>{$GALLERY_TITLE} | {$PAGE_TITLE}</title>{else}
    2424<title>{$PAGE_TITLE} | {$GALLERY_TITLE}</title>{/if}
    25 <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
    2625<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
    2726
Note: See TracChangeset for help on using the changeset viewer.