Tag Archives | crop image
PHP OCR with GD – Example 2

PHP OCR with GD – Example 2

Read this article first: Simple PHP OCR with GD Step 1: Goto http://chotot.vn we can see many pictures contain telephone number. We find that these pictures that contain a maximum of 11 digits, and have the same font, same size. We use 3 pictures contain all number from 0 to 9: http://www.chotot.vn/pg/0Njg2ODY2AAAAAAAAAAAAAJl+piriBW+L/QY=.gif http://www.chotot.vn/pg/0Njg3NTA0AAAAAAAAAAAAALuxb72u/MXOO9k=.gif http://www.chotot.vn/pg/0Njg3NTA3AAAAAAAAAAAAACXjI28Lu8wq5LCY.gif Step […]

Read full story Comments { 0 }
PHP function: Image Resize and Crop

PHP function: Image Resize and Crop

This function support crop and resize JPEG, GIF, PNG image. Example of usage: online demo

Read full story Comments { 0 }
PHP: Crop image function (part 2)

PHP: Crop image function (part 2)

Read first: PHP: Crop image function We can save to new file: Online demo We get the result: http://www.demo.tutorialspots.com/crop/logo.png Now, we can crop image on the fly: Source code of file crop.php Example 1: PHP logo Source picture http://www.demo.tutorialspots.com/crop/crop.php?src=http://static.php.net/www.php.net/images/php.gif&w=80&h=40&x=20&y=13 we get the result: Example 2: Source picture http://incloak.com/images/proxylist_port_4084543.gif http://www.demo.tutorialspots.com/crop/crop.php?w=5&h=8&x=0&y=3&src=http://incloak.com/images/proxylist_port_4084543.gif we get the result: Continuing…

Read full story Comments { 0 }
PHP: Crop image function

PHP: Crop image function

See our logo Step 1: detect filetype (gif, jpeg, png) use function getimagesize result: array(6) { [0]=> int(300) [1]=> int(107) [2]=> int(3) [3]=> string(24) “width=”300″ height=”107″” [“bits”]=> int(8) [“mime”]=> string(9) “image/png” } Note: Returns a array with 6 elements. The 0 index is the width of the image in pixels. The 1 index is the […]

Read full story Comments { 0 }