Completed
Branch master (4dbcc3)
by Paul
01:59
created
class.icothumb.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,9 +173,9 @@
 block discarded – undo
173 173
             $chosen_icons = array();
174 174
             $p = 0;
175 175
             while ($total_icons > 0) {
176
-            	if (!$this->use_diferent_depths) {
177
-	                while (isset($icons[$p + 1]) && $icons[$p]['size'] == $last_size) $p++;
178
-            	}
176
+                if (!$this->use_diferent_depths) {
177
+                    while (isset($icons[$p + 1]) && $icons[$p]['size'] == $last_size) $p++;
178
+                }
179 179
                 if (!isset($icons[$p])) break;
180 180
                 $chosen_icons[] = $icons[$p]['index'];
181 181
                 $last_size = $icons[$p++]['size'];
Please login to merge, or discard this patch.
test2.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-	define('PATH', dirname(__FILE__) . '/');
2
+    define('PATH', dirname(__FILE__) . '/');
3 3
 
4 4
     include PATH . 'class.icothumb.php';
5 5
 
Please login to merge, or discard this patch.
class.ico.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          * @return  boolean          Success
62 62
          **/
63 63
         function LoadFile($path) {
64
-	        $this->_filename = $path;
64
+            $this->_filename = $path;
65 65
             if (($fp = @fopen($path, 'rb')) !== false) {
66 66
                 $data = '';
67 67
                 while (!feof($fp)) {
@@ -262,9 +262,9 @@  discard block
 block discarded – undo
262 262
                     $c = array();
263 263
                     for ($i = 0; $i < $this->formats[$index]['ColorCount']; $i++) {
264 264
                         $c[$i] = $this->AllocateColor($im, $this->formats[$index]['colors'][$i]['red'],
265
-                                                           $this->formats[$index]['colors'][$i]['green'],
266
-                                                           $this->formats[$index]['colors'][$i]['blue'],
267
-                                                           round($this->formats[$index]['colors'][$i]['reserved'] / 255 * 127));
265
+                                                            $this->formats[$index]['colors'][$i]['green'],
266
+                                                            $this->formats[$index]['colors'][$i]['blue'],
267
+                                                            round($this->formats[$index]['colors'][$i]['reserved'] / 255 * 127));
268 268
                     }
269 269
                 }
270 270
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                  **/
274 274
                 $width = $this->formats[$index]['Width'];
275 275
                 if (($width % 32) > 0) {
276
-                     $width += (32 - ($this->formats[$index]['Width'] % 32));
276
+                        $width += (32 - ($this->formats[$index]['Width'] % 32));
277 277
                 }
278 278
                 $offset = $this->formats[$index]['Width'] * $this->formats[$index]['Height'] * $this->formats[$index]['BitCount'] / 8;
279 279
                 $total_bytes = ($width * $this->formats[$index]['Height']) / 8;
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
                             $color = substr($this->formats[$index]['data'], $offset, 4);
306 306
                             if (ord($color[3]) > 0) {
307 307
                                 $c = $this->AllocateColor($im, ord($color[2]),
308
-                                                               ord($color[1]),
309
-                                                               ord($color[0]),
310
-                                                               127 - round(ord($color[3]) / 255 * 127));
308
+                                                                ord($color[1]),
309
+                                                                ord($color[0]),
310
+                                                                127 - round(ord($color[3]) / 255 * 127));
311 311
                                 imagesetpixel($im, $j, $i, $c);
312 312
                             }
313 313
                             $offset += 4;
Please login to merge, or discard this patch.
test.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2
-	define('PATH', dirname(__FILE__) . '/');
2
+    define('PATH', dirname(__FILE__) . '/');
3 3
 
4
-	include PATH . 'class.ico.php';
4
+    include PATH . 'class.ico.php';
5 5
 
6 6
     /**
7 7
      * Change this to a local icon
8 8
      **/
9
-	$ico = new Ico('http://www.diogoresende.net/news/wp-content/pics.ico');
9
+    $ico = new Ico('http://www.diogoresende.net/news/wp-content/pics.ico');
10 10
     $ico->SetBackground('#abcdef');
11 11
     $im = $ico->GetIcon(9);
12 12
 
Please login to merge, or discard this patch.