Guest User

Untitled

a guest
Jan 21st, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function is_alpha($c) {
  15.  
  16. $alpha = $c >> 24 & 255;
  17. return $alpha == 127 ? (true) : (false);
  18. }
  19.  
  20. function escanear($imagem) {
  21.  
  22. $e = array("x" => array("left" => 0, "right" => 0), "y" => array("top" => 0, "bottom" => 0));
  23. $left = 0;
  24. $x = 0;
  25. while ($x < imagesx($imagem))
  26. {
  27. $__x = true;
  28. $y = 0;
  29. while ($y < imagesy($imagem))
  30. {
  31. $pixel = imagecolorat($imagem, $x, $y);
  32. $__x = !is_alpha($pixel) ? (false) : ($__x);
  33. $y++;
  34. continue;
  35. }
  36. if ($__x)
  37. {
  38. $left++;
  39. }
  40. else
  41. {
  42. break;
  43. }
  44. $x++;
  45. continue;
  46. }
  47. $e["x"]["left"] = $left;
  48. $right = 0;
  49. $x = imagesx($imagem) - 1;
  50. while (0 <= $x)
  51. {
  52. $__x = true;
  53. $y = 0;
  54. while ($y < imagesy($imagem))
  55. {
  56. $pixel = imagecolorat($imagem, $x, $y);
  57. $__x = !is_alpha($pixel) ? (false) : ($__x);
  58. $y++;
  59. continue;
  60. }
  61. if ($__x)
  62. {
  63. $right++;
  64. }
  65. else
  66. {
  67. break;
  68. }
  69. $x--;
  70. continue;
  71. }
  72. $e["x"]["right"] = $right;
  73. $top = 0;
  74. $y = 0;
  75. while ($y < imagesy($imagem))
  76. {
  77. $__y = true;
  78. $x = 0;
  79. while ($x < imagesx($imagem))
  80. {
  81. $pixel = imagecolorat($imagem, $x, $y);
  82. $__y = !is_alpha($pixel) ? (false) : ($__y);
  83. $x++;
  84. continue;
  85. }
  86. if ($__y)
  87. {
  88. $top++;
  89. }
  90. else
  91. {
  92. break;
  93. }
  94. $y++;
  95. continue;
  96. }
  97. $e["y"]["top"] = $top;
  98. $bottom = 0;
  99. $y = imagesy($imagem) - 1;
  100. while (0 <= $y)
  101. {
  102. $__y = true;
  103. $x = 0;
  104. while ($x < imagesx($imagem))
  105. {
  106. $pixel = imagecolorat($imagem, $x, $y);
  107. $__y = !is_alpha($pixel) ? (false) : ($__y);
  108. $x++;
  109. continue;
  110. }
  111. if ($__y)
  112. {
  113. $bottom++;
  114. }
  115. else
  116. {
  117. break;
  118. }
  119. $y--;
  120. continue;
  121. }
  122. $e["y"]["bottom"] = $bottom;
  123. return $e;
  124. }
  125.  
  126.  
  127. if (eregi('' . "^[0-9]+\$", $_GET["h"]) || eregi('' . "^[0-9]+\$", $_GET["b"]) || eregi('' . "^[0-9]+\$", $_GET["g"]) || eregi('' . "^[0-9]+\$", $_GET["f"]) || eregi('' . "^[0-9]+\$", $_GET["ex"]))
  128. {
  129. $width = 0;
  130. $height = 0;
  131. $left = 0;
  132. $top = 0;
  133. if (($ex = @imagecreatefrompng('' . "images/" . $_GET["ex"] . ".png")))
  134. {
  135. .......................................................................................
  136. ............................................
  137. ...............
Advertisement
Add Comment
Please, Sign In to add comment