PageRenderTime 78ms CodeModel.GetById 41ms RepoModel.GetById 0ms app.codeStats 1ms

/prototypes/gd.php

https://github.com/alemic/zephir
PHP | 362 lines | 110 code | 33 blank | 219 comment | 1 complexity | d6f7585d4e890844fcb56ff371466655 MD5 | raw file
  1. <?php
  2. if (function_exists('gd_info')) {
  3. return false;
  4. }
  5. /**
  6. * Function was prototyped by docs
  7. * @link http://www.php.net/manual/ru/ref.image.php
  8. */
  9. /**
  10. * @link http://www.php.net/manual/ru/function.gd-info.php
  11. */
  12. function gd_info() {}
  13. /**
  14. * @link http://www.php.net/manual/ru/function.getimagesize.php
  15. * @param string $filename
  16. * @param array $imageinfo
  17. */
  18. //function getimagesize($filename, array &$imageinfo) {}
  19. /**
  20. * @link http://www.php.net/manual/ru/function.getimagesizefromstring.php
  21. * @param string $imagedata
  22. * @param array $imageinfo
  23. */
  24. //function getimagesizefromstring($imagedata, array &$imageinfo) {}
  25. /**
  26. * @link http://www.php.net/manual/ru/function.image-type-to-extension.php
  27. * @param $imagetype
  28. * @param bool $include_dot
  29. */
  30. //function image_type_to_extension($imagetype, $include_dot = true) {}
  31. /**
  32. * @link http://www.php.net/manual/ru/function.image-type-to-mime-type.php
  33. * @param int $imagetype
  34. * @return string
  35. */
  36. //function image_type_to_mime_type($imagetype) {}
  37. /**
  38. * @link http://www.php.net/manual/ru/function.image2wbmp.php
  39. * @param resource $image
  40. * @param string $filename
  41. * @param int $threshold
  42. * @return boolean
  43. */
  44. function image2wbmp($image, $filename, $threshold) {}
  45. /**
  46. * @link http://www.php.net/manual/ru/function.imageaffine.php
  47. * @param $image
  48. * @param array $affline
  49. * @param array $clip
  50. */
  51. function imageaffine($image, array $affline, array $clip) {}
  52. /**
  53. * @link http://www.php.net/manual/ru/function.imageaffinematrixconcat.php
  54. * @param array $m1
  55. * @param array $m2
  56. * @return array
  57. */
  58. function imageaffinematrixconcat(array $m1, array $m2) {}
  59. /**
  60. * @link http://www.php.net/manual/ru/function.imageaffinematrixget.php
  61. * @param int $type
  62. * @param mixed $options
  63. * @return array
  64. */
  65. function imageaffinematrixget($type, $options) {}
  66. /**
  67. * @link http://www.php.net/manual/ru/function.imagealphablending.php
  68. * @param resource $image
  69. * @param bool $blendmode
  70. * @return boolean
  71. */
  72. function imagealphablending($image, $blendmode) {}
  73. /**
  74. * @link http://www.php.net/manual/ru/function.imageantialias.php
  75. * @param resource $image
  76. * @param boolean $enabled
  77. * @return boolean
  78. */
  79. function imageantialias($image, $enabled) {}
  80. /**
  81. * @link http://www.php.net/manual/ru/function.imagearc.php
  82. * @param resource $image
  83. * @param int $cx
  84. * @param int $cy
  85. * @param int $width
  86. * @param int $height
  87. * @param int $start
  88. * @param int $end
  89. * @param int $color
  90. * @return boolean
  91. */
  92. function imagearc($image, $cx, $cy, $width, $height, $start, $end, $color) {}
  93. /**
  94. * @link http://www.php.net/manual/ru/function.imagechar.php
  95. * @param resource $image
  96. * @param int $font
  97. * @param int $x
  98. * @param int $y
  99. * @param string $c
  100. * @param int $color
  101. * @return boolean
  102. */
  103. function imagechar($image, $font, $x, $y, $c, $color) {}
  104. /**
  105. * @link http://www.php.net/manual/ru/function.imagecharup.php
  106. * @param resource $image
  107. * @param int $font
  108. * @param int $x
  109. * @param int $y
  110. * @param string $c
  111. * @param int $color
  112. * @return boolean
  113. */
  114. function imagecharup($image, $font, $x, $y, $c, $color) {}
  115. /**
  116. * @link http://www.php.net/manual/ru/function.imagecolorallocate.php
  117. * @param resource $image
  118. * @param int $red
  119. * @param int $green
  120. * @param int $blue
  121. * @return int
  122. */
  123. function imagecolorallocate($image, $red, $green, $blue) {}
  124. /**
  125. * @link http://www.php.net/manual/ru/function.imagecolorallocatealpha.php
  126. * @param resource $image
  127. * @param int $red
  128. * @param int $green
  129. * @param int $blue
  130. * @param int $alpha
  131. * @return int
  132. */
  133. function imagecolorallocatealpha($image, $red, $green, $blue, $alpha) {}
  134. /**
  135. * @link http://www.php.net/manual/ru/function.imagecolorat.php
  136. * @param resource $image
  137. * @param int $x
  138. * @param int $y
  139. * @return int
  140. */
  141. function imagecolorat($image, $x, $y) {}
  142. /**
  143. * @link http://www.php.net/manual/ru/function.imagecolorclosest.php
  144. * @param resource $image
  145. * @param int $red
  146. * @param int $green
  147. * @param int $blue
  148. * @return int
  149. */
  150. function imagecolorclosest($image, $red, $green, $blue) {}
  151. /**
  152. * @link http://www.php.net/manual/ru/function.imagecolorclosestalpha.php
  153. * @param resource $image
  154. * @param int $red
  155. * @param int $green
  156. * @param int $blue
  157. * @param int $alpha
  158. * @return int
  159. */
  160. function imagecolorclosestalpha($image, $red, $green, $blue, $alpha) {}
  161. /**
  162. * @param resource $image
  163. * @param int $red
  164. * @param int $green
  165. * @param int $blue
  166. * @return int
  167. */
  168. function imagecolorclosesthwb($image, $red, $green, $blue) {}
  169. /**
  170. * @link http://www.php.net/manual/ru/function.imagecolordeallocate.php
  171. * @param resource $image
  172. * @param int $color
  173. * @return boolean
  174. */
  175. function imagecolordeallocate($image, $color) {}
  176. /**
  177. * @link http://www.php.net/manual/ru/function.imagecolorexact.php
  178. * @param resource $image
  179. * @param int $red
  180. * @param int $green
  181. * @param int $blue
  182. * @return int
  183. */
  184. function imagecolorexact($image, $red, $green, $blue) {}
  185. /**
  186. * @link http://www.php.net/manual/ru/function.imagecolorexactalpha.php
  187. * @param resource $image
  188. * @param int $red
  189. * @param int $green
  190. * @param int $blue
  191. * @param int $alpha
  192. * @return int
  193. */
  194. function imagecolorexactalpha($image, $red, $green, $blue, $alpha) {}
  195. /**
  196. * @link http://www.php.net/manual/ru/function.imagecolormatch.php
  197. * @param resource $image1
  198. * @param resource $image2
  199. * @return boolean
  200. */
  201. function imagecolormatch($image1, $image2) {}
  202. /**
  203. * @link http://www.php.net/manual/ru/function.imagecolorresolve.php
  204. * @param resource $image
  205. * @param int $red
  206. * @param int $green
  207. * @param int $blue
  208. * @return int
  209. */
  210. function imagecolorresolve($image, $red, $green, $blue) {}
  211. /**
  212. * @link http://www.php.net/manual/ru/function.imagecolorresolvealpha.php
  213. * @param resource $image
  214. * @param int $red
  215. * @param int $green
  216. * @param int $blue
  217. * @param int $alpha
  218. * @return int
  219. */
  220. function imagecolorresolvealpha($image, $red, $green, $blue, $alpha) {}
  221. /**
  222. * @link http://www.php.net/manual/ru/function.imagecolorset.php
  223. * @param resource $image
  224. * @param int $index
  225. * @param int $red
  226. * @param int $green
  227. * @param int $blue
  228. * @param int $alpha
  229. * @return void
  230. */
  231. function imagecolorset($image, $index, $red, $green, $blue, $alpha = 0) {}
  232. /**
  233. * @link http://www.php.net/manual/ru/function.imagecolorsforindex.php
  234. * @param resource $image
  235. * @param int $index
  236. * @return array
  237. */
  238. function imagecolorsforindex($image, $index) {}
  239. /**
  240. * @link http://www.php.net/manual/ru/function.imagecreate.php
  241. * @param $width
  242. * @param $height
  243. * @return resource
  244. */
  245. function imagecreate($width, $height) {}
  246. /**
  247. * @link http://php.net/manual/en/image.constants.php
  248. */
  249. define('IMG_GIF', 1);
  250. define('IMG_JPG', 2);
  251. define('IMG_JPEG', 2);
  252. define('IMG_PNG', 4);
  253. define('IMG_WBMP', 8);
  254. define('IMG_XPM', 16);
  255. define('IMG_COLOR_TILED', -5);
  256. define('IMG_COLOR_STYLED', -2);
  257. define('IMG_COLOR_BRUSHED', -3);
  258. define('IMG_COLOR_STYLEDBRUSHED', -4);
  259. define('IMG_COLOR_TRANSPARENT', -6);
  260. define('IMG_ARC_ROUNDED', 0);
  261. define('IMG_ARC_PIE', 0);
  262. define('IMG_ARC_CHORD', 1);
  263. define('IMG_ARC_NOFILL', 2);
  264. define('IMG_ARC_EDGED', 4);
  265. define('IMG_GD2_RAW', 1);
  266. define('IMG_GD2_COMPRESSED', 2);
  267. define('IMG_EFFECT_REPLACE', 0);
  268. define('IMG_EFFECT_ALPHABLEND', 1);
  269. define('IMG_EFFECT_NORMAL', 2);
  270. define('IMG_EFFECT_OVERLAY', 3);
  271. define('GD_BUNDLED', 1);
  272. define('IMG_FILTER_NEGATE', 0);
  273. define('IMG_FILTER_GRAYSCALE', 1);
  274. define('IMG_FILTER_BRIGHTNESS', 2);
  275. define('IMG_FILTER_CONTRAST', 3);
  276. define('IMG_FILTER_COLORIZE', 4);
  277. define('IMG_FILTER_EDGEDETECT', 5);
  278. define('IMG_FILTER_GAUSSIAN_BLUR', 7);
  279. define('IMG_FILTER_SELECTIVE_BLUR', 8);
  280. define('IMG_FILTER_EMBOSS', 6);
  281. define('IMG_FILTER_MEAN_REMOVAL', 9);
  282. define('IMG_FILTER_SMOOTH', 10);
  283. define('IMG_FILTER_PIXELATE', 11);
  284. define('GD_VERSION', "2.0.35");
  285. define('GD_MAJOR_VERSION', 2);
  286. define('GD_MINOR_VERSION', 0);
  287. define('GD_RELEASE_VERSION', 35);
  288. define('GD_EXTRA_VERSION', "");
  289. define('PNG_NO_FILTER', 0);
  290. define('PNG_FILTER_NONE', 8);
  291. define('PNG_FILTER_SUB', 16);
  292. define('PNG_FILTER_UP', 32);
  293. define('PNG_FILTER_AVG', 64);
  294. define('PNG_FILTER_PAETH', 128);
  295. define('PNG_ALL_FILTERS', 248);
  296. define('IMG_AFFINE_TRANSLATE',0);
  297. define('IMG_AFFINE_SCALE',1);
  298. define('IMG_AFFINE_ROTATE',2);
  299. define('IMG_AFFINE_SHEAR_HORIZONTAL',3);
  300. define('IMG_AFFINE_SHEAR_VERTICAL',4);
  301. define('IMG_CROP_DEFAULT',0);
  302. define('IMG_CROP_TRANSPARENT',1);
  303. define('IMG_CROP_BLACK',2);
  304. define('IMG_CROP_WHITE',3);
  305. define('IMG_CROP_SIDES',4);
  306. define('IMG_FLIP_BOTH',3);
  307. define('IMG_FLIP_HORIZONTAL',1);
  308. define('IMG_FLIP_VERTICAL',2);
  309. define('IMG_BELL', 1);
  310. define('IMG_BESSEL', 2);
  311. define('IMG_BICUBIC', 4);
  312. define('IMG_BICUBIC_FIXED', 5);
  313. define('IMG_BILINEAR_FIXED', 3);
  314. define('IMG_BLACKMAN', 6);
  315. define('IMG_BOX', 7);
  316. define('IMG_BSPLINE', 8);
  317. define('IMG_CATMULLROM', 9);
  318. define('IMG_GAUSSIAN', 10);
  319. define('IMG_GENERALIZED_CUBIC', 11);
  320. define('IMG_HERMITE', 12);
  321. define('IMG_HAMMING', 13);
  322. define('IMG_HANNING', 14);
  323. define('IMG_MITCHELL', 15);
  324. define('IMG_POWER', 17);
  325. define('IMG_QUADRATIC', 18);
  326. define('IMG_SINC', 19);
  327. define('IMG_NEAREST_NEIGHBOUR', 16);
  328. define('IMG_WEIGHTED4', 21);
  329. define('IMG_TRIANGLE', 20);