Completed
Push — master ( 9528ad...369c90 )
by Michael
03:33
created
class/wideimage/Exception.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-	* @package Exceptions
23
-  **/
21
+	 * @package Exceptions
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * Base Exception class
Please login to merge, or discard this patch.
class/wideimage/Mapper/GD.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Mappers
23
-  **/
21
+	 * @package Internal/Mappers
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * Mapper class for GD files
Please login to merge, or discard this patch.
class/wideimage/TrueColorImage.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-  **/
21
+	 **/
22 22
 	
23 23
 	/**
24 24
 	 * A class for truecolor image objects
Please login to merge, or discard this patch.
class/wideimage/vendor/JPEXS/ico.php 1 patch
Indentation   +219 added lines, -219 removed lines patch added patch discarded remove patch
@@ -207,13 +207,13 @@  discard block
 block discarded – undo
207 207
    imagetruecolortopalette($img,true,255);
208 208
 
209 209
    };
210
-    $Pruhledna=imagecolorallocate($img,0,0,0);
211
-    for($y=0;$y<$Ikona[$IconID]["Height"];$y++)
212
-     for($x=0;$x<$Ikona[$IconID]["Width"];$x++)
213
-      if($Ikona[$IconID]["Maska"][$x][$y]==1)
214
-       {
215
-        imagesetpixel($img,$x,$y,$Pruhledna);
216
-       };
210
+	$Pruhledna=imagecolorallocate($img,0,0,0);
211
+	for($y=0;$y<$Ikona[$IconID]["Height"];$y++)
212
+	 for($x=0;$x<$Ikona[$IconID]["Width"];$x++)
213
+	  if($Ikona[$IconID]["Maska"][$x][$y]==1)
214
+	   {
215
+		imagesetpixel($img,$x,$y,$Pruhledna);
216
+	   };
217 217
   imagecolortransparent($img,$Pruhledna);
218 218
  };
219 219
 
@@ -261,29 +261,29 @@  discard block
 block discarded – undo
261 261
  $barev=pow(2,$biBitCount);
262 262
 
263 263
   for($b=0;$b<$barev;$b++)
264
-    {
265
-    $Ikona[$p]["Paleta"][$b]["b"]=jpexs_freadbyte($f);
266
-    $Ikona[$p]["Paleta"][$b]["g"]=jpexs_freadbyte($f);
267
-    $Ikona[$p]["Paleta"][$b]["r"]=jpexs_freadbyte($f);
268
-    jpexs_freadbyte($f);
269
-    };
264
+	{
265
+	$Ikona[$p]["Paleta"][$b]["b"]=jpexs_freadbyte($f);
266
+	$Ikona[$p]["Paleta"][$b]["g"]=jpexs_freadbyte($f);
267
+	$Ikona[$p]["Paleta"][$b]["r"]=jpexs_freadbyte($f);
268
+	jpexs_freadbyte($f);
269
+	};
270 270
 
271 271
 $Zbytek=(4-ceil(($Width/(8/$biBitCount)))%4)%4;
272 272
 
273 273
 
274 274
 for($y=$Height-1;$y>=0;$y--)
275
-    {
276
-     $jpexs_currentBit=0;
277
-     for($x=0;$x<$Width;$x++)
278
-      {
279
-         $C=jpexs_freadbits($f,$biBitCount);
280
-         $Ikona[$p]["Data"][$x][$y]=$C;
281
-      };
282
-
283
-    if($jpexs_currentBit!=0) {jpexs_freadbyte($f);};
284
-    for($g=0;$g<$Zbytek;$g++)
285
-     jpexs_freadbyte($f);
286
-     };
275
+	{
276
+	 $jpexs_currentBit=0;
277
+	 for($x=0;$x<$Width;$x++)
278
+	  {
279
+		 $C=jpexs_freadbits($f,$biBitCount);
280
+		 $Ikona[$p]["Data"][$x][$y]=$C;
281
+	  };
282
+
283
+	if($jpexs_currentBit!=0) {jpexs_freadbyte($f);};
284
+	for($g=0;$g<$Zbytek;$g++)
285
+	 jpexs_freadbyte($f);
286
+	 };
287 287
 
288 288
 }
289 289
 elseif($biBitCount==24)
@@ -291,18 +291,18 @@  discard block
 block discarded – undo
291 291
  $Zbytek=$Width%4;
292 292
 
293 293
    for($y=$Height-1;$y>=0;$y--)
294
-    {
295
-     for($x=0;$x<$Width;$x++)
296
-      {
297
-       $B=jpexs_freadbyte($f);
298
-       $G=jpexs_freadbyte($f);
299
-       $R=jpexs_freadbyte($f);
300
-       $Ikona[$p]["Data"][$x][$y]["r"]=$R;
301
-       $Ikona[$p]["Data"][$x][$y]["g"]=$G;
302
-       $Ikona[$p]["Data"][$x][$y]["b"]=$B;
303
-      }
304
-    for($z=0;$z<$Zbytek;$z++)
305
-     jpexs_freadbyte($f);
294
+	{
295
+	 for($x=0;$x<$Width;$x++)
296
+	  {
297
+	   $B=jpexs_freadbyte($f);
298
+	   $G=jpexs_freadbyte($f);
299
+	   $R=jpexs_freadbyte($f);
300
+	   $Ikona[$p]["Data"][$x][$y]["r"]=$R;
301
+	   $Ikona[$p]["Data"][$x][$y]["g"]=$G;
302
+	   $Ikona[$p]["Data"][$x][$y]["b"]=$B;
303
+	  }
304
+	for($z=0;$z<$Zbytek;$z++)
305
+	 jpexs_freadbyte($f);
306 306
    };
307 307
 }
308 308
 elseif($biBitCount==32)
@@ -310,20 +310,20 @@  discard block
 block discarded – undo
310 310
  $Zbytek=$Width%4;
311 311
 
312 312
    for($y=$Height-1;$y>=0;$y--)
313
-    {
314
-     for($x=0;$x<$Width;$x++)
315
-      {
316
-       $B=jpexs_freadbyte($f);
317
-       $G=jpexs_freadbyte($f);
318
-       $R=jpexs_freadbyte($f);
319
-       $Alpha=jpexs_freadbyte($f);
320
-       $Ikona[$p]["Data"][$x][$y]["r"]=$R;
321
-       $Ikona[$p]["Data"][$x][$y]["g"]=$G;
322
-       $Ikona[$p]["Data"][$x][$y]["b"]=$B;
323
-       $Ikona[$p]["Data"][$x][$y]["alpha"]=$Alpha;
324
-      }
325
-    for($z=0;$z<$Zbytek;$z++)
326
-     jpexs_freadbyte($f);
313
+	{
314
+	 for($x=0;$x<$Width;$x++)
315
+	  {
316
+	   $B=jpexs_freadbyte($f);
317
+	   $G=jpexs_freadbyte($f);
318
+	   $R=jpexs_freadbyte($f);
319
+	   $Alpha=jpexs_freadbyte($f);
320
+	   $Ikona[$p]["Data"][$x][$y]["r"]=$R;
321
+	   $Ikona[$p]["Data"][$x][$y]["g"]=$G;
322
+	   $Ikona[$p]["Data"][$x][$y]["b"]=$B;
323
+	   $Ikona[$p]["Data"][$x][$y]["alpha"]=$Alpha;
324
+	  }
325
+	for($z=0;$z<$Zbytek;$z++)
326
+	 jpexs_freadbyte($f);
327 327
    };
328 328
 };
329 329
 
@@ -331,17 +331,17 @@  discard block
 block discarded – undo
331 331
 //Maska
332 332
 $Zbytek=(4-ceil(($Width/(8)))%4)%4;
333 333
 for($y=$Height-1;$y>=0;$y--)
334
-    {
335
-     $jpexs_currentBit=0;
336
-     for($x=0;$x<$Width;$x++)
337
-      {
338
-         $C=jpexs_freadbits($f,1);
339
-         $Ikona[$p]["Maska"][$x][$y]=$C;
340
-      };
341
-    if($jpexs_currentBit!=0) {jpexs_freadbyte($f);};
342
-    for($g=0;$g<$Zbytek;$g++)
343
-     jpexs_freadbyte($f);
344
-     };
334
+	{
335
+	 $jpexs_currentBit=0;
336
+	 for($x=0;$x<$Width;$x++)
337
+	  {
338
+		 $C=jpexs_freadbits($f,1);
339
+		 $Ikona[$p]["Maska"][$x][$y]=$C;
340
+	  };
341
+	if($jpexs_currentBit!=0) {jpexs_freadbyte($f);};
342
+	for($g=0;$g<$Zbytek;$g++)
343
+	 jpexs_freadbyte($f);
344
+	 };
345 345
 //--------------
346 346
 
347 347
 fclose($f);
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
 if(!feof($f)):
373 373
   for($p=0;$p<$Count;$p++)
374 374
    {
375
-    fseek($f,$Ikona[$p]["ImageOffset"]+14);
376
-    $Ikona[$p]["Info"]["BitsPerPixel"]=jpexs_freadword($f);
375
+	fseek($f,$Ikona[$p]["ImageOffset"]+14);
376
+	$Ikona[$p]["Info"]["BitsPerPixel"]=jpexs_freadword($f);
377 377
    };
378 378
 endif;
379 379
 fclose($f);
@@ -436,102 +436,102 @@  discard block
 block discarded – undo
436 436
   fseek($jpexs_f,$PosMagic+$SizeOfOptionalHeader);
437 437
 
438 438
   for($p=0;$p<$NumberOfSections;$p++):
439
-    $SectionName[$p]=trim(fread($jpexs_f,8));
440
-    $VirtualSize[$p]=jpexs_freaddword($jpexs_f);
441
-    $VirtualAddress[$p]=jpexs_freaddword($jpexs_f);
442
-    $PhysicalSize[$p]=jpexs_freaddword($jpexs_f);
443
-    $PhysicalOffset[$p]=jpexs_freaddword($jpexs_f);
444
-    fread($jpexs_f,16);
445
-    if($SectionName[$p]==".rsrc"):
446
-      $jpexs_ResVirtualAddress=$VirtualAddress[$p];
447
-      fseek($jpexs_f,$PhysicalOffset[$p]);
448
-      $jpexs_StartOfRsrc=$PhysicalOffset[$p];
449
-      jpexs_readResDirectoryEntry($R,$PhysicalOffset[$p]);
450
-      $IconCount=null;
451
-      $Ikona=null;
452
-      while (list ($key, $val) = each ($R["Subdir"])):
453
-        if($key==14):
454
-          $r=0;
455
-          while (list ($key2, $val2) = each ($R["Subdir"][$key]["Subdir"])):
456
-             while (list ($key3, $val3) = each ($R["Subdir"][$key]["Subdir"][$key2]["Subdir"])):
457
-               fseek($jpexs_f,$val3["DataOffset"]);
458
-               $Reserved=jpexs_freadword($jpexs_f);
459
-               $Type=jpexs_freadword($jpexs_f);
460
-               $ic=jpexs_freadword($jpexs_f);
461
-               $IconCount[]=$ic;
462
-               for($s=0;$s<$ic;$s++)
463
-                {
464
-                 $Ikona[$r][$s]["Width"]=jpexs_freadbyte($jpexs_f);
465
-                 $Ikona[$r][$s]["Height"]=jpexs_freadbyte($jpexs_f);
466
-                 $Ikona[$r][$s]["ColorCount"]=jpexs_freadword($jpexs_f);
467
-                 $Ikona[$r][$s]["Planes"]=jpexs_freadword($jpexs_f);
468
-                 $Ikona[$r][$s]["BitCount"]=jpexs_freadword($jpexs_f);
469
-                 $Ikona[$r][$s]["BytesInRes"]=jpexs_freaddword($jpexs_f);
470
-                 $Ikona[$r][$s]["IconId"]=jpexs_freadword($jpexs_f);
471
-                };
472
-               fseek($jpexs_f,$val3["DataOffset"]);
473
-               $r++;
474
-             endwhile;
475
-          endwhile;
476
-        endif;
477
-      endwhile;
478
-
479
-      reset ($R["Subdir"]);
480
-
481
-      while (list ($key, $val) = each ($R["Subdir"])):
482
-        if($key==3):
483
-          while (list ($key2, $val2) = each ($R["Subdir"][$key]["Subdir"])):
484
-          for($r=0;$r<count($Ikona);$r++):
485
-           for($s=0;$s<count($Ikona[$r]);$s++):
486
-             while (list ($key3, $val3) = each ($R["Subdir"][$key]["Subdir"][$Ikona[$r][$s]["IconId"]]["Subdir"])):
487
-               if(($iconIndex==$r)or($iconIndex==-1)or((is_array($iconIndex))and(in_array($r,$iconIndex)))):
488
-                 fseek($jpexs_f,$val3["DataOffset"]);
489
-                 $Ikona[$r][$s]["Data"]=fread($jpexs_f,$val3["DataSize"]);
490
-                 $Ikona[$r][$s]["DataSize"]=$val3["DataSize"];
491
-               endif;
492
-             endwhile;
493
-           endfor;
494
-           endfor;
495
-          endwhile;
496
-        endif;
497
-      endwhile;
498
-      $ok=false;
499
-      for($r=0;$r<count($Ikona);$r++):
500
-        if(($iconIndex==$r)or($iconIndex==-1)or((is_array($iconIndex))and(in_array($r,$iconIndex)))):
501
-          $savefile=$icoFileNameOrPath;
502
-          if($icoFileNameOrPath=="")
503
-           {
504
-             $savefile="$r.ico";
505
-           }
506
-           else
507
-           {
508
-            if(($iconIndex==-1)or(is_array($iconIndex)))
509
-              $savefile=$icoFileNameOrPath."$r.ico";
510
-           };
511
-          $f2=fopen($savefile,"w");
512
-          fwrite($f2,jpexs_inttoword(0));
513
-          fwrite($f2,jpexs_inttoword(1));
514
-          fwrite($f2,jpexs_inttoword(count($Ikona[$r])));
515
-          $Offset=6+16*count($Ikona[$r]);
516
-          for($s=0;$s<count($Ikona[$r]);$s++):
517
-            fwrite($f2,jpexs_inttobyte($Ikona[$r][$s]["Width"]));
518
-            fwrite($f2,jpexs_inttobyte($Ikona[$r][$s]["Height"]));
519
-            fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["ColorCount"]));
520
-            fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["Planes"]));
521
-            fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["BitCount"]));
522
-            fwrite($f2,jpexs_inttodword($Ikona[$r][$s]["BytesInRes"]));
523
-            fwrite($f2,jpexs_inttodword($Offset));
524
-            $Offset+=$Ikona[$r][$s]["DataSize"];
525
-          endfor;
526
-          for($s=0;$s<count($Ikona[$r]);$s++):
527
-            fwrite($f2,$Ikona[$r][$s]["Data"]);
528
-          endfor;
529
-          fclose($f2);
530
-          $ok=true;
531
-        endif;
532
-      endfor;
533
-      return $ok;
534
-    endif;
439
+	$SectionName[$p]=trim(fread($jpexs_f,8));
440
+	$VirtualSize[$p]=jpexs_freaddword($jpexs_f);
441
+	$VirtualAddress[$p]=jpexs_freaddword($jpexs_f);
442
+	$PhysicalSize[$p]=jpexs_freaddword($jpexs_f);
443
+	$PhysicalOffset[$p]=jpexs_freaddword($jpexs_f);
444
+	fread($jpexs_f,16);
445
+	if($SectionName[$p]==".rsrc"):
446
+	  $jpexs_ResVirtualAddress=$VirtualAddress[$p];
447
+	  fseek($jpexs_f,$PhysicalOffset[$p]);
448
+	  $jpexs_StartOfRsrc=$PhysicalOffset[$p];
449
+	  jpexs_readResDirectoryEntry($R,$PhysicalOffset[$p]);
450
+	  $IconCount=null;
451
+	  $Ikona=null;
452
+	  while (list ($key, $val) = each ($R["Subdir"])):
453
+		if($key==14):
454
+		  $r=0;
455
+		  while (list ($key2, $val2) = each ($R["Subdir"][$key]["Subdir"])):
456
+			 while (list ($key3, $val3) = each ($R["Subdir"][$key]["Subdir"][$key2]["Subdir"])):
457
+			   fseek($jpexs_f,$val3["DataOffset"]);
458
+			   $Reserved=jpexs_freadword($jpexs_f);
459
+			   $Type=jpexs_freadword($jpexs_f);
460
+			   $ic=jpexs_freadword($jpexs_f);
461
+			   $IconCount[]=$ic;
462
+			   for($s=0;$s<$ic;$s++)
463
+				{
464
+				 $Ikona[$r][$s]["Width"]=jpexs_freadbyte($jpexs_f);
465
+				 $Ikona[$r][$s]["Height"]=jpexs_freadbyte($jpexs_f);
466
+				 $Ikona[$r][$s]["ColorCount"]=jpexs_freadword($jpexs_f);
467
+				 $Ikona[$r][$s]["Planes"]=jpexs_freadword($jpexs_f);
468
+				 $Ikona[$r][$s]["BitCount"]=jpexs_freadword($jpexs_f);
469
+				 $Ikona[$r][$s]["BytesInRes"]=jpexs_freaddword($jpexs_f);
470
+				 $Ikona[$r][$s]["IconId"]=jpexs_freadword($jpexs_f);
471
+				};
472
+			   fseek($jpexs_f,$val3["DataOffset"]);
473
+			   $r++;
474
+			 endwhile;
475
+		  endwhile;
476
+		endif;
477
+	  endwhile;
478
+
479
+	  reset ($R["Subdir"]);
480
+
481
+	  while (list ($key, $val) = each ($R["Subdir"])):
482
+		if($key==3):
483
+		  while (list ($key2, $val2) = each ($R["Subdir"][$key]["Subdir"])):
484
+		  for($r=0;$r<count($Ikona);$r++):
485
+		   for($s=0;$s<count($Ikona[$r]);$s++):
486
+			 while (list ($key3, $val3) = each ($R["Subdir"][$key]["Subdir"][$Ikona[$r][$s]["IconId"]]["Subdir"])):
487
+			   if(($iconIndex==$r)or($iconIndex==-1)or((is_array($iconIndex))and(in_array($r,$iconIndex)))):
488
+				 fseek($jpexs_f,$val3["DataOffset"]);
489
+				 $Ikona[$r][$s]["Data"]=fread($jpexs_f,$val3["DataSize"]);
490
+				 $Ikona[$r][$s]["DataSize"]=$val3["DataSize"];
491
+			   endif;
492
+			 endwhile;
493
+		   endfor;
494
+		   endfor;
495
+		  endwhile;
496
+		endif;
497
+	  endwhile;
498
+	  $ok=false;
499
+	  for($r=0;$r<count($Ikona);$r++):
500
+		if(($iconIndex==$r)or($iconIndex==-1)or((is_array($iconIndex))and(in_array($r,$iconIndex)))):
501
+		  $savefile=$icoFileNameOrPath;
502
+		  if($icoFileNameOrPath=="")
503
+		   {
504
+			 $savefile="$r.ico";
505
+		   }
506
+		   else
507
+		   {
508
+			if(($iconIndex==-1)or(is_array($iconIndex)))
509
+			  $savefile=$icoFileNameOrPath."$r.ico";
510
+		   };
511
+		  $f2=fopen($savefile,"w");
512
+		  fwrite($f2,jpexs_inttoword(0));
513
+		  fwrite($f2,jpexs_inttoword(1));
514
+		  fwrite($f2,jpexs_inttoword(count($Ikona[$r])));
515
+		  $Offset=6+16*count($Ikona[$r]);
516
+		  for($s=0;$s<count($Ikona[$r]);$s++):
517
+			fwrite($f2,jpexs_inttobyte($Ikona[$r][$s]["Width"]));
518
+			fwrite($f2,jpexs_inttobyte($Ikona[$r][$s]["Height"]));
519
+			fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["ColorCount"]));
520
+			fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["Planes"]));
521
+			fwrite($f2,jpexs_inttoword($Ikona[$r][$s]["BitCount"]));
522
+			fwrite($f2,jpexs_inttodword($Ikona[$r][$s]["BytesInRes"]));
523
+			fwrite($f2,jpexs_inttodword($Offset));
524
+			$Offset+=$Ikona[$r][$s]["DataSize"];
525
+		  endfor;
526
+		  for($s=0;$s<count($Ikona[$r]);$s++):
527
+			fwrite($f2,$Ikona[$r][$s]["Data"]);
528
+		  endfor;
529
+		  fclose($f2);
530
+		  $ok=true;
531
+		endif;
532
+	  endfor;
533
+	  return $ok;
534
+	endif;
535 535
   endfor;
536 536
 
537 537
   fclose($jpexs_f);
@@ -547,45 +547,45 @@  discard block
 block discarded – undo
547 547
 $Res=null;
548 548
 fseek($jpexs_f,$offset);
549 549
 //IMAGE_RESOURCE_DIRECTORY
550
-      $Characteristics=jpexs_freaddword($jpexs_f);
551
-      $TimeDateStamp=jpexs_freaddword($jpexs_f);
552
-      $MajorVersion=jpexs_freadword($jpexs_f);
553
-      $MinorVersion=jpexs_freadword($jpexs_f);
554
-      $NumberOfNamedEntries=jpexs_freadword($jpexs_f);
555
-      $NumberOfIdEntries=jpexs_freadword($jpexs_f);
556
-      for($q=0;$q<$NumberOfNamedEntries+$NumberOfIdEntries;$q++):
557
-        //IMAGE_RESOURCE_DIRECTORY_ENTRY
558
-        $ResName=jpexs_freaddword($jpexs_f);
559
-        $lastPos2=ftell($jpexs_f);
560
-        if($ResName>=0x80000000):
561
-          //String Name
562
-          $ResNameOffset=$ResName-0x80000000;
563
-          fseek($jpexs_f,$jpexs_StartOfRsrc+$ResNameOffset);
564
-          $StringLength=jpexs_freadword($jpexs_f);
565
-          $Identificator=(fread($jpexs_f,$StringLength*2));
566
-          fseek($jpexs_f,$lastPos2);
567
-        else:
568
-          //Integer Id
569
-          $Identificator=$ResName;
570
-        endif;
571
-
572
-        $ResOffsetToData=jpexs_freaddword($jpexs_f);
573
-        if($ResOffsetToData>=0x80000000):
574
-          $SubResOffset=$ResOffsetToData-0x80000000;
575
-          jpexs_readResDirectoryEntry($Res["$Identificator"],$jpexs_StartOfRsrc+$SubResOffset);
576
-        else:
577
-          $RawDataOffset=$ResOffsetToData;
578
-          $lastPos2=ftell($jpexs_f);
579
-          fseek($jpexs_f,$jpexs_StartOfRsrc+$RawDataOffset);
580
-          //IMAGE_RESOURCE_DATA_ENTRY
581
-          $OffsetToData=jpexs_freaddword($jpexs_f);
582
-          $Res["$Identificator"]["DataOffset"]=$jpexs_StartOfRsrc-$jpexs_ResVirtualAddress+$OffsetToData;
583
-          $Res["$Identificator"]["DataSize"]=jpexs_freaddword($jpexs_f);
584
-          $CodePage=jpexs_freaddword($jpexs_f);
585
-          $Reserved=jpexs_freaddword($jpexs_f);
586
-          fseek($jpexs_f,$lastPos2);
587
-        endif;
588
-      endfor;
550
+	  $Characteristics=jpexs_freaddword($jpexs_f);
551
+	  $TimeDateStamp=jpexs_freaddword($jpexs_f);
552
+	  $MajorVersion=jpexs_freadword($jpexs_f);
553
+	  $MinorVersion=jpexs_freadword($jpexs_f);
554
+	  $NumberOfNamedEntries=jpexs_freadword($jpexs_f);
555
+	  $NumberOfIdEntries=jpexs_freadword($jpexs_f);
556
+	  for($q=0;$q<$NumberOfNamedEntries+$NumberOfIdEntries;$q++):
557
+		//IMAGE_RESOURCE_DIRECTORY_ENTRY
558
+		$ResName=jpexs_freaddword($jpexs_f);
559
+		$lastPos2=ftell($jpexs_f);
560
+		if($ResName>=0x80000000):
561
+		  //String Name
562
+		  $ResNameOffset=$ResName-0x80000000;
563
+		  fseek($jpexs_f,$jpexs_StartOfRsrc+$ResNameOffset);
564
+		  $StringLength=jpexs_freadword($jpexs_f);
565
+		  $Identificator=(fread($jpexs_f,$StringLength*2));
566
+		  fseek($jpexs_f,$lastPos2);
567
+		else:
568
+		  //Integer Id
569
+		  $Identificator=$ResName;
570
+		endif;
571
+
572
+		$ResOffsetToData=jpexs_freaddword($jpexs_f);
573
+		if($ResOffsetToData>=0x80000000):
574
+		  $SubResOffset=$ResOffsetToData-0x80000000;
575
+		  jpexs_readResDirectoryEntry($Res["$Identificator"],$jpexs_StartOfRsrc+$SubResOffset);
576
+		else:
577
+		  $RawDataOffset=$ResOffsetToData;
578
+		  $lastPos2=ftell($jpexs_f);
579
+		  fseek($jpexs_f,$jpexs_StartOfRsrc+$RawDataOffset);
580
+		  //IMAGE_RESOURCE_DATA_ENTRY
581
+		  $OffsetToData=jpexs_freaddword($jpexs_f);
582
+		  $Res["$Identificator"]["DataOffset"]=$jpexs_StartOfRsrc-$jpexs_ResVirtualAddress+$OffsetToData;
583
+		  $Res["$Identificator"]["DataSize"]=jpexs_freaddword($jpexs_f);
584
+		  $CodePage=jpexs_freaddword($jpexs_f);
585
+		  $Reserved=jpexs_freaddword($jpexs_f);
586
+		  fseek($jpexs_f,$lastPos2);
587
+		endif;
588
+	  endfor;
589 589
 fseek($jpexs_f,$lastPos);
590 590
 $parentRes["Subdir"]=$Res;
591 591
 };
@@ -764,25 +764,25 @@  discard block
 block discarded – undo
764 764
    {
765 765
    $color=imagecolorat($img,$x,$y);
766 766
    if($color==$Transparent)
767
-    $color=imagecolorexact($img,0,0,0);
767
+	$color=imagecolorexact($img,0,0,0);
768 768
    if($color==-1) $color=0;
769 769
    if($color>pow(2,$BitCount)-1) $color=0;
770 770
 
771 771
    $bWrite.=jpexs_decbinx($color,$BitCount);
772 772
    if(strlen($bWrite)==8)
773
-    {
774
-     $ret.=jpexs_inttobyte(bindec($bWrite));
775
-     $bWrite="";
776
-    };
773
+	{
774
+	 $ret.=jpexs_inttobyte(bindec($bWrite));
775
+	 $bWrite="";
776
+	};
777 777
    };
778 778
 
779 779
   if((strlen($bWrite)<8)and(strlen($bWrite)!=0))
780
-    {
781
-     $sl=strlen($bWrite);
782
-     for($t=0;$t<8-$sl;$t++)
783
-      $sl.="0";
784
-     $ret.=jpexs_inttobyte(bindec($bWrite));
785
-    };
780
+	{
781
+	 $sl=strlen($bWrite);
782
+	 for($t=0;$t<8-$sl;$t++)
783
+	  $sl.="0";
784
+	 $ret.=jpexs_inttobyte(bindec($bWrite));
785
+	};
786 786
   for($z=0;$z<$Zbytek;$z++)
787 787
    $ret.=jpexs_inttobyte(0);
788 788
  };
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
    $ret.=jpexs_inttobyte($color["green"]);
802 802
    $ret.=jpexs_inttobyte($color["red"]);
803 803
    if($BitCount==32)
804
-    $ret.=jpexs_inttobyte(0);//Alpha for ICO_XP_COLORS
804
+	$ret.=jpexs_inttobyte(0);//Alpha for ICO_XP_COLORS
805 805
    };
806 806
   for($z=0;$z<$Zbytek;$z++)
807 807
    $ret.=jpexs_inttobyte(0);
@@ -817,14 +817,14 @@  discard block
 block discarded – undo
817 817
   $bOut="";
818 818
   for($x=0;$x<$Width;$x++)
819 819
    {
820
-    if(($Transparent!=-1)and(imagecolorat($img,$x,$y)==$Transparent))
821
-     {
822
-      $bOut.="1";
823
-     }
824
-     else
825
-     {
826
-      $bOut.="0";
827
-     };
820
+	if(($Transparent!=-1)and(imagecolorat($img,$x,$y)==$Transparent))
821
+	 {
822
+	  $bOut.="1";
823
+	 }
824
+	 else
825
+	 {
826
+	  $bOut.="0";
827
+	 };
828 828
    };
829 829
   for($p=0;$p<strlen($bOut);$p+=8)
830 830
   {
Please login to merge, or discard this patch.
class/wideimage/Image.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-	* @package WideImage
23
-  **/
21
+	 * @package WideImage
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * Thrown when an invalid dimension is passed for some operations
Please login to merge, or discard this patch.
class/wideimage/Font/TTF.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package WideImage
23
-  **/
21
+	 * @package WideImage
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * TTF font support class
Please login to merge, or discard this patch.
class/wideimage/Operation/GetMask.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-	
22
-	* @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * GetMask operation class
Please login to merge, or discard this patch.
class/wideimage/Operation/Resize.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-
22
-    * @package Internal/Operations
23
-  **/
21
+	 * @package Internal/Operations
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * An Exception for when an invalid fit method is passed
Please login to merge, or discard this patch.
class/wideimage/MapperFactory.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	/**
3
- * @author Gasper Kozak
4
- * @copyright 2007, 2008, 2009
3
+	 * @author Gasper Kozak
4
+	 * @copyright 2007, 2008, 2009
5 5
 
6 6
     This file is part of WideImage.
7 7
 		
@@ -18,9 +18,8 @@  discard block
 block discarded – undo
18 18
     You should have received a copy of the GNU Lesser General Public License
19 19
     along with WideImage; if not, write to the Free Software
20 20
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
-    
22
-    * @package WideImage
23
-  **/
21
+	 * @package WideImage
22
+	 **/
24 23
 	
25 24
 	/**
26 25
 	 * Thrown when image format isn't supported
Please login to merge, or discard this patch.