Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
OCR in PHP: Read Text from Images with Tesseract
Oct 23, 2015 @ 17:14:27

The SitePoint PHP blog has a tutorial posted from author Lukas White showing you how to implement OCR in your PHP application and read text directly from images with the help of Tesseract.

Optical Character Recognition (OCR) is the process of converting printed text into a digital representation. It has all sorts of practical applications — from digitizing printed books, creating electronic records of receipts, to number-plate recognition and even circumventing image-based CAPTCHAs. [...] Tesseract is an open source program for performing OCR. You can run it on *Nix systems, Mac OSX and Windows, but using a library we can utilize it in PHP applications. This tutorial is designed to show you how.

They walk you through the installation of the Tesseract software locally (well, inside of a VM) and testing the install with the output from a sample image. With that up and working they show how to use this library to work with the Tesseract functionality, passing it in via a simple Silex application endpoint as a POSTed image file. Full code for the sample application is included as well as the results from another sample image. They also include some additional functionality you could use to detect phone numbers in the image content.

tagged: read text images tesseract tutorial library phonenumber

Link: http://www.sitepoint.com/ocr-in-php-read-text-from-images-with-tesseract/

Sameer Borate:
Storing images into a database - resolving a contentious matter
Feb 21, 2013 @ 17:16:45

In this new post to his CodeDiesel site Sameer Borate looks at something that's been a controversial topic with developers (not just PHP) about storing binary data, like images, in a database instead of on the local file system.

There is much discussion and argument with no final say on the issue. In one of my recent project the same issue was raised; the client and myself discussing the benefits and drawback of storing the images into a database. The project needed storing around 50,000 images, so it was important to get the question resolved satisfactorily. After much deliberation we settled on using the file system. The major factor in the decision was that we needed the database and images decoupled as we would be having multiple databases using the same set of images.

He goes on to talk about some of the things you should consider when you're deciding if storing images in the database is the right thing for your application including:

  • The bloat that can come with storing binary data (larger database size)
  • Updating images requires two operations - updating the database and updating the cached image locally
  • Images usually serve faster when they come from the filesystem through the web server
  • BLOB (a common type for binary data storage) is variable-width and can degrade performance

You can read the rest of the reasons (and get more detail on the ones above) in the rest of the post.

tagged: images binary data storage database benefits disadvantages

Link:

ZetCode.com:
PostgreSQL PHP Tutorial
May 07, 2012 @ 16:14:40

On the ZetCode.com site there's a five part tutorial posted about getting your PHP application up and running on a PostgreSQL database (updated on the 4th).

This is a PHP tutorial for the PostgreSQL database. It covers the basics of PostgreSQL programming with PHP. The examples were created and tested on Linux. [...] PostgreSQL is a powerful, open source object-relational database system. It is a multi-user, multi-threaded database management system. It runs on multiple platforms including Linux, FreeBSD, Solaris, Microsoft Windows and Mac OS X. PostgreSQL is developed by the PostgreSQL Global Development Group.

The chapters guide you through every step you'll need:

tagged: postgresql tutorial introduction read images metadata transactions

Link:

PHP.net:
PHP Manual Updates
Feb 05, 2007 @ 15:41:00

The PHP Group has announced some big updates to one of the finest manuals for an open source project out there today - the manual found on the PHP website.

Updates to the manual include:

  • an improved, XSL-based build system that will deliver compiled manuals to mirrors in a more timely manner (goodbye dsssl)
  • manual pages can now contain images (see imagearc() for an example)
  • updated function version information and capture system (fewer "no version information, might be only in CVS" messages)

Of course, help from the community helps things even more, so they request helping out or just submitting bug reports for problems found in the documentation or user comments.

tagged: manual website update xsl images version function information manual website update xsl images version function information

Link:

PHP.net:
PHP Manual Updates
Feb 05, 2007 @ 15:41:00

The PHP Group has announced some big updates to one of the finest manuals for an open source project out there today - the manual found on the PHP website.

Updates to the manual include:

  • an improved, XSL-based build system that will deliver compiled manuals to mirrors in a more timely manner (goodbye dsssl)
  • manual pages can now contain images (see imagearc() for an example)
  • updated function version information and capture system (fewer "no version information, might be only in CVS" messages)

Of course, help from the community helps things even more, so they request helping out or just submitting bug reports for problems found in the documentation or user comments.

tagged: manual website update xsl images version function information manual website update xsl images version function information

Link:

PHPClasses.org:
3D graphics in pure PHP
Nov 08, 2006 @ 14:13:00

As spotlighted by the folks over on PHPClasses.org, there's a developer, László Zsidi, who has contributed several packages to the repository - including some that work to create 3D images with just the built-in functions PHP provides.

He has developed several pure PHP components that implement impressive 3D animated graphics, like a 3D objects rendering engine, emulate a waving flag or the reflex of an image near a lake. The generated frames are combined into a single animated GIF with another pure PHP component also written by László. All these components were nominated to the PHP Programming Innovation Award for the evident creativity, demonstrating that PHP can be used for non-trivial software applications.

Some of the libraries in the listing include:

tagged: 3d graphics builtin functionality reflect gif animation images 3d graphics builtin functionality reflect gif animation images

Link:

PHPClasses.org:
3D graphics in pure PHP
Nov 08, 2006 @ 14:13:00

As spotlighted by the folks over on PHPClasses.org, there's a developer, László Zsidi, who has contributed several packages to the repository - including some that work to create 3D images with just the built-in functions PHP provides.

He has developed several pure PHP components that implement impressive 3D animated graphics, like a 3D objects rendering engine, emulate a waving flag or the reflex of an image near a lake. The generated frames are combined into a single animated GIF with another pure PHP component also written by László. All these components were nominated to the PHP Programming Innovation Award for the evident creativity, demonstrating that PHP can be used for non-trivial software applications.

Some of the libraries in the listing include:

tagged: 3d graphics builtin functionality reflect gif animation images 3d graphics builtin functionality reflect gif animation images

Link:

SpinDrop.us:
Cropping Images using DHTML (Prototype) and symfony
Sep 16, 2006 @ 21:29:53

From the SpinDrop.us blog, there's a new tutorial on combining the power of dynamic HTML and PHP to create an image cropping script for your website.

Years ago when I was working on a photo gallery for davedash.com I got the art of making tumbnails down fairly well. It was automated and didn't allow for specifying how the thumbnail should be made. With dozens of photos (which was a lot back then), when would I find that kind of time.

Flashback to today, for my company... we want users with avatars... but nothing too large. Maybe a nice 80x80 picture. Well the coolest UI I've seen was Apple's Address Book which let you use this slider mechanism to crop a fixed sized image from a larger image.

They create a pretty slick little app, using symfony to handle the framework for the app, some Javascript in the form of Prototype to make the controls, and plenty of CSS/HTML to make it usable. You can check out the demo here.

tagged: cropping images dhtml prototype css frontend resize symfony cropping images dhtml prototype css frontend resize symfony

Link:

SpinDrop.us:
Cropping Images using DHTML (Prototype) and symfony
Sep 16, 2006 @ 21:29:53

From the SpinDrop.us blog, there's a new tutorial on combining the power of dynamic HTML and PHP to create an image cropping script for your website.

Years ago when I was working on a photo gallery for davedash.com I got the art of making tumbnails down fairly well. It was automated and didn't allow for specifying how the thumbnail should be made. With dozens of photos (which was a lot back then), when would I find that kind of time.

Flashback to today, for my company... we want users with avatars... but nothing too large. Maybe a nice 80x80 picture. Well the coolest UI I've seen was Apple's Address Book which let you use this slider mechanism to crop a fixed sized image from a larger image.

They create a pretty slick little app, using symfony to handle the framework for the app, some Javascript in the form of Prototype to make the controls, and plenty of CSS/HTML to make it usable. You can check out the demo here.

tagged: cropping images dhtml prototype css frontend resize symfony cropping images dhtml prototype css frontend resize symfony

Link:

Ryan Malesevich's Blog:
SimpleView Gallery: Browse Images in a Directory
Sep 12, 2006 @ 12:07:08

Ryan Malesevich points out a very simple, one-script solution to the common need for an image gallery for your website - SimpleView Gallery - that a friend of his has written up.

In my post that I wrote that I would be back for good this time, I mentioned that I was going to be working on a gallery script. My good friend Chris let me know that he also wrote a simple script viewer that works quite while. His script is SimpleView Gallery and it requires to modification for it, just upload the script to a directory that contains images and that's it.

He also mentions a small change he made to make it work with WordPress and it's automatic thumbnailing system (to hide those thumbnails).

tagged: simplegallery view images browse wordpress singlepage simplegallery view images browse wordpress singlepage

Link:


Trending Topics: