News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

ProDevTips.com:
File Uploads with PHP Doctrine
September 01, 2008 @ 10:37:50

The ProDevTips blog has posted the fifth part of their look at using Doctrine with PHP. This time they focus on file uploads.

It's time to take a look at how file uploads can be integrated into the Doctrine validation and CRUD process. We will have a product in the form of a digital download as an example, it will have a screenshot image that can be maximum 250 pixels wide and high. The download itself will be a zipped file.

They set up their table definitions first and set up a few validation functions (update, insert and for the file data) to work on top of that. Custom upload/uploadImage and save methods handle the user's submission while a simple delete method makes removing images easy.

0 comments voice your opinion now!
file upload doctrine tutorial database table insert image



Cormac's Blog:
Lazy loading of object variables in php using __get()
August 08, 2008 @ 14:22:51

Recently, Cormac posted this look at a method for lazy loading on variables in an object with the magic __get method.

I used the magic method __get() to load the images into the [Product] object when they were needed. __get() is called whenever something tries to access a variable that is not set or publically accessible, so basically I used that to load the images whenever some other piece of code tried to access Product::images.

He includes a quick bit of code that fires off an internal private method for the class that loads up the images. In his example, if they're already loaded, it never gets called.

0 comments voice your opinion now!
lazy loading get method image product


Kae Verens' Blog:
pre-parsing HTML for incorrectly-sized images
July 29, 2008 @ 12:03:55

Kae Verens has a recent blog post that looks at a method for helping to protect users from themselves when working with images - a method for handling ones incorrectly sized.

Every now and then, I get a call from a client who is puzzled why their site is running slow. I would look at their page and see an innocuous image inserted into a paragraph. When I examine the image, though, I see that the client has artificially resized the image using HTML. One recent example showed on-screen as a 300px-wide image. When I examined it, it was actually 3000px wide (approx).

The script looks through some HTML markup and, based on the sizes in the image tags, resizes the images appropriately. An example and the source are provided.

0 comments voice your opinion now!
html image size height width parse resize


C7Y Community Site:
Handling Images with PHP
July 09, 2008 @ 11:13:06

On php|architect's C7Y community site Scott MacVicar has posted a new comparison of two of the main graphics platforms available to PHP - the GD and Imagick extensions.

If you want user interaction on your website then you probably accept the upload of some media, including images. Within PHP there are two different libraries available that provide functionality for handling images, GD and the Imagick extension. This article takes a brief look at each of these libraries.

Since GD comes bundled with PHP these days, he gives a brief installation tutorial for the Imagick extension. After that he compares the two with code for three different bits of functionality - identifying image types, working with EXIF data and modifying a current image (change format/resize).

0 comments voice your opinion now!
tutorial image handling gd imagick extension example code


IBM developerWorks:
Getting Graphic with PHP
July 03, 2008 @ 10:20:00

The IBM developerWorks site has a new tutorial posted (registration/login required) talking about image creating in PHP using the GD library.

The purpose of this tutorial is to show you how to get started with the GD library and to provide a variety of techniques you can apply to your Web-page coding. The tutorial doesn't cover every GD function, but it teaches you the basics. The Resources section provides Web sites where you can learn more about using the GD library.

They go through the creation of sample images, working with gradients and lines, adding text, saving the image data out to a file and how to work with existing graphics to modify them.

0 comments voice your opinion now!
tutorial graphic gd image gradient text modify lines


Zend Developer Zone:
Desktop Image Uploaders Using Adobe AIR and JavaScript
July 02, 2008 @ 07:56:27

On the Zend Developer Zone today there's a new tutorial (by Jack Herrington) talking about working with Adobe AIR and Javascript to make a desktop application for uploading images (or any other files) to a remote server.

To solve the upload problem, most of the big services have dedicated upload applications that run on all the different platforms. But it takes a lot of work to develop them, especially when they have to run on both Macintosh and Windows. Or is it so tough? As it turns out, Adobe AIR technology makes it possible to write applications for any platform using just HTML and JavaScript. It also offers access to cool desktop features, notably drag and drop.

The tutorial shows how to make the application with the HTML/Javascript version of an AIR app (as opposed to Flex) that lets you drag and drop files into it to be uploaded. They make the basic file upload form first as a foundation then extend it to make it accept the remote request (via POST) from the AIR application to handle the uploads. Javascript code and screenshots are included.

0 comments voice your opinion now!
desktop air adobe application file upload image tutorial


DevShed:
Setting Up a Web-Based Image Gallery
May 07, 2008 @ 09:31:45

DevShed has started a new series off today with this new tutorial, a look at a few image galleries written in PHP and how to get them up and working on your site.

In this article, we are going to tackle this subject and present some real-world applicable solutions.First of all, this article presumes that you either have a web server of your own or one that you pay for (as a web space) with the necessary server-side services already running and configured appropriately (PHP, MySQL, Apache, etc.). Second, we are going to consider free options for the applications we'll present throughout this article.

The two pieces of software they look at are 4images Gallery and the Coppermine Gallery. Simple installation instructions are included (more can be found in the project's documentation, though) and screenshots show some of the end results.

0 comments voice your opinion now!
image gallery tutorial install 4images gallery coppermine


Mikko Koppanen's Blog:
Fill patterns
April 29, 2008 @ 15:24:50

Mikko Koppanen has a quick post today showing how to use PHP and Imagick to create an image of text filled with another image layer behind it:

The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc).

His example is pretty simple (with a "Hello World!" output) that pulls in the background image, creates the composite layer over it, adds the text to it and sets the fill to the background image's layer. The whole this is wrapped up and output as a PNG file.

0 comments voice your opinion now!
fill pattern imagick tutorial example png background image


DevShed:
Building a Complete Web Searching Class with Yahoo Web Services and PHP 5
February 20, 2008 @ 12:58:00

DevShed finishes up their series looking at making a search engine with the Yahoo! web services in PHP5 in this last look at using the functionality they've created so far to make a more improved search.

This last installment of the series will be entirely focused on demonstrating how Inheritance can be used in a helpful way to build a set of child classes that will come in handy for consuming a specific Yahoo! Search Service.

They show how to use their current image search functionality and, with a few modifications, make a base class that can be used to support ech of the other search types (web, image, video) with common functionality and settings.

0 comments voice your opinion now!
php5 tutorial webservice yahoo search video image


Mikko Koppanen's Blog:
Seam carving
February 13, 2008 @ 17:10:00

Mikko Koppanen has posted another quick hit ImageMagick hint to his blog - this time it deal with "seam carving", a process for cropping and resampling of an image to make a different composite picture.

Today I was reading trough the ImageMagick ChangeLog and noticed an interesting entry. "Add support for liquid rescaling". I rushed to check the MagickWand API docs and there it was: MagickLiquidRescaleImage! After about ten minutes of hacking the Imagick support was done. Needless to say; I was excited

You'll need to have the libqr library compiled into the ImageMagick installation, but the actual use of the functionality is simple - about three or four lines do the work for you. He includes the original image and the result from his test (as well as another example of the same result image scaled down automatically.

0 comments voice your opinion now!
imagemagick seam carving image resize libqr



Community Events











Don't see your event here?
Let us know!


package conference job release example zendframework PHP5 framework zend database PEAR mysql ajax book releases application cakephp security code developer

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework