Ignore:
Timestamp:
Apr 7, 2020, 11:53:58 AM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Image.php

    r69 r92  
    6565  function SaveToFile($FileName)
    6666  {
    67     if($this->Type == IMAGETYPE_JPEG)
     67    if ($this->Type == IMAGETYPE_JPEG)
    6868    {
    6969      imagejpeg($this->Image, $FileName);
    7070    } else
    71     if($this->Type == IMAGETYPE_GIF)
     71    if ($this->Type == IMAGETYPE_GIF)
    7272    {
    73       imagegif($this->Image, $FileName);
     73      imagegif ($this->Image, $FileName);
    7474    } else
    75     if($this->Type == IMAGETYPE_PNG)
     75    if ($this->Type == IMAGETYPE_PNG)
    7676    {
    7777      imagepng($this->Image, $FileName);
     
    8383    $ImageInfo = getimagesize($FileName);
    8484    $this->Type = $ImageInfo[2];
    85     if($this->Type == IMAGETYPE_JPEG)
     85    if ($this->Type == IMAGETYPE_JPEG)
    8686    {
    8787      $this->Image = imagecreatefromjpeg($FileName);
    8888    } else
    89     if($this->Type == IMAGETYPE_GIF)
     89    if ($this->Type == IMAGETYPE_GIF)
    9090    {
    9191      $this->Image = imagecreatefromgif($FileName);
    9292    } else
    93     if( $this->Type == IMAGETYPE_PNG)
     93    if ( $this->Type == IMAGETYPE_PNG)
    9494    {
    9595      $this->Image = imagecreatefrompng($FileName);
     
    112112  function GetWidth()
    113113  {
    114     return(imagesx($this->Image));
     114    return imagesx($this->Image);
    115115  }
    116116
    117117  function GetHeight()
    118118  {
    119     return(imagesy($this->Image));
     119    return imagesy($this->Image);
    120120  }
    121121
     
    127127  function ConvertColor($Color)
    128128  {
    129     return(imagecolorallocate($this->Image, ($Color >> 16) & 0xff, ($Color >> 8) & 0xff, $Color & 0xff));
     129    return imagecolorallocate($this->Image, ($Color >> 16) & 0xff, ($Color >> 8) & 0xff, $Color & 0xff);
    130130  }
    131131
Note: See TracChangeset for help on using the changeset viewer.