Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/gd_functions.php

    r5509 r7655  
    5353  $img=imagecreate($Width,$Height); 
    5454  $Colors=pow(2,$biBitCount); 
    55   for($p=0;$p<$Colors;$p++) 
     55  for($p=0;$p<$Colors;++$p) 
    5656   { 
    5757    $B=freadbyte($f); 
     
    7272    { 
    7373     $CurrentBit=0; 
    74      for($x=0;$x<$Width;$x++) 
     74     for($x=0;$x<$Width;++$x) 
    7575      { 
    7676         $C=freadbits($f,$biBitCount); 
     
    7878      }; 
    7979    if($CurrentBit!=0) {freadbyte($f);}; 
    80     for($g=0;$g<$Zbytek;$g++) 
     80    for($g=0;$g<$Zbytek;++$g) 
    8181     freadbyte($f); 
    8282     }; 
     
    112112   $Data.=fread($f,$pocet); 
    113113   $pocetb+=$pocet; 
    114    if($pocetb%2==1) {freadbyte($f); $pocetb++;}; 
     114   if($pocetb%2==1) {freadbyte($f); ++$pocetb;}; 
    115115  }; 
    116116 if($prefix>0) 
    117117  { 
    118118   $pocet=$prefix; 
    119    for($r=0;$r<$pocet;$r++) 
     119   for($r=0;$r<$pocet;++$r) 
    120120    $Data.=chr($suffix); 
    121121  }; 
     
    126126}; 
    127127 
    128 for($x=0;$x<strlen($Data);$x++) 
     128for($x=0;$x<strlen($Data);++$x) 
    129129 { 
    130130  imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); 
     
    165165 
    166166   $CurrentBit=0; 
    167    for($h=0;$h<$pocet;$h++) 
     167   for($h=0;$h<$pocet;++$h) 
    168168    $Data.=chr(freadbits($f,4)); 
    169169   if($CurrentBit!=0) freadbits($f,4); 
    170170   $pocetb+=ceil(($pocet/2)); 
    171    if($pocetb%2==1) {freadbyte($f); $pocetb++;}; 
     171   if($pocetb%2==1) {freadbyte($f); ++$pocetb;}; 
    172172  }; 
    173173 if($prefix>0) 
     
    175175   $pocet=$prefix; 
    176176   $i=0; 
    177    for($r=0;$r<$pocet;$r++) 
     177   for($r=0;$r<$pocet;++$r) 
    178178    { 
    179179    if($i%2==0) 
     
    185185      $Data.=chr(floor($suffix/16)); 
    186186     }; 
    187     $i++; 
     187    ++$i; 
    188188    }; 
    189189  }; 
     
    194194}; 
    195195 
    196 for($x=0;$x<strlen($Data);$x++) 
     196for($x=0;$x<strlen($Data);++$x) 
    197197 { 
    198198  imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); 
     
    212212   for($y=$Height-1;$y>=0;$y--) 
    213213    { 
    214      for($x=0;$x<$Width;$x++) 
     214     for($x=0;$x<$Width;++$x) 
    215215      { 
    216216       $B=freadbyte($f); 
     
    221221       imagesetpixel($img,$x,$y,$color); 
    222222      } 
    223     for($z=0;$z<$Zbytek;$z++) 
     223    for($z=0;$z<$Zbytek;++$z) 
    224224     freadbyte($f); 
    225225   }; 
     
    336336$bin=decbin($d); 
    337337$sbin=strlen($bin); 
    338 for($j=0;$j<$n-$sbin;$j++) 
     338for($j=0;$j<$n-$sbin;++$j) 
    339339 $bin="0$bin"; 
    340340return $bin; 
Note: See TracChangeset for help on using the changeset viewer.