Changeset 7294


Ignore:
Timestamp:
10/20/10 13:40:24 (9 years ago)
Author:
plg
Message:

bug fixed: GD version 2+ required

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gvideo/admin/thumbnails.php

    r7291 r7294  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    44 
    5 function get_image_with_band($srcImage, $gd_ver) 
     5function get_image_with_band($srcImage) 
    66{ 
    77    $srcWidth = imagesx($srcImage); 
     
    99    $const = intval($srcWidth * 0.04); 
    1010 
    11     if ($gd_ver >= 2) 
    12     { 
    13       $imgBand = imagecreatetruecolor($srcWidth + 6 * $const, $srcHeight); 
    14     } 
    15     else 
    16     { 
    17       $imgBand = imagecreate($srcWidth + 6 * $const, $srcHeight); 
    18     } 
    19  
     11    $imgBand = imagecreatetruecolor($srcWidth + 6 * $const, $srcHeight); 
     12     
    2013    $white = imagecolorallocate($imgBand, 255, 255, 255); 
    2114    $y_start = intval($srcHeight / 2); 
     
    6962    if (isset($_POST['add_band'])) 
    7063    { 
    71       $srcImage = get_image_with_band($srcImage, $gd_ver[0]); 
     64      $srcImage = get_image_with_band($srcImage); 
    7265    } 
    7366 
Note: See TracChangeset for help on using the changeset viewer.