News Feed
Sections




News Archive
feed this:

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

Mikko Koppanen:
Working on images asynchronously
December 16, 2013 @ 10:45:35

Mikko Koppanen has a new post to his site today about working with images asynchronously - the "offline" processing of things like user uploaded images using a queuing system.

To get my quota on buzzwords for the day we are going to look at using ZeroMQ and Imagick to create a simple asynchronous image processing system. Why asynchronous? First of all, separating the image handling from a interactive PHP scripts allows us to scale the image processing separately from the web heads. [...] Secondly, separating the image processing from a web script can provide more responsive experience to the user. This doesn't necessarily mean faster, but let's say in a multiple image upload scenario this method allows the user to do something else on the site while we process the images in the background.

He also includes a "barebones" example of how the system would work. The first Worker script makes the connection to the queue system and sends the data off for handling. The second script does most of the actual work, pulling in the image and using Imagick to create a thumbnail image. Finally he includes an example of the use of the workers in combination to send the image data for processing.

0 comments voice your opinion now!
image asynchronous processing zeromq thumbnail imagick

Link: http://valokuva.org/working-on-images-asynchronously/

Philip Norton's Blog:
Creating A Thumbnail Of A Word Document With PHP And LiveDocx
September 26, 2011 @ 08:50:42

In a new post to his blog Philip Norton shares a method for creating a thumbnail of a Word document with the help of PHP and LiveDocx (in this case, the component inside the Zend Framework).

Creating Word document icons is very simple thanks to a service called LiveDocx. LiveDocx was created as a web service to allow the easy creation of most document formats from a simple template. However, it is possible to send a normal Word document as the template file and get an image of the file in return.

You'll need a LiveDocx account to be able to use the service - there's a free option of their service that uses a shared server. Included in the post is a sample script that defines a LiveDocx connection, pulls in a local Word document for parsing and calls a "getBitmaps" method on the service to return the raw image data. This is pushed into an image (using GD) as a PNG.

0 comments voice your opinion now!
word document livedocx zendframework webservice image thumbnail


Sameer Borate's Blog:
Easy thumbnail generation using PHP
March 25, 2011 @ 08:19:57

Sameer Borate has a recent post to his blog looking at a PHP_Thumb tool.

One of the frequent requirements in web design is that of thumbnail generation. Although there are many libraries out there I found PHP Thumb simple and quick enough to implement in a recent project. PHP Thumb is a light-weight image manipulation library aimed at thumbnail generation. It offers the ability to resize, create custom crops, or square crops from the center, and rotate the image. If the need arises you can also easily add custom functionality to the library through plugins.

Code examples are, of course, included in the post showing simple thumbnail creation, image rotation, cropping, resizing and outputting to a different format. There's a brief mention of custom plugins and the ability to chain functions.

0 comments voice your opinion now!
thumbnail generation phpthumb generation tutorial


Codrops Blog:
Fresh Sliding Thumbnails Gallery with jQuery and PHP
June 29, 2010 @ 12:37:21

On the Codrops blog there's a recent tutorial posted showing how to create a fully-functional image slider/viewer with a combination of HTML, jQuery and a bit of PHP (here's a demo).

In this tutorial we are going to create another full page image gallery with a nice thumbnail area that scrolls automatically when moving the mouse. The idea is to allow the user to slightly zoom into the picture by clicking on it. The thumbnails bar slides down and the image resizes according to the screen size.

Based on this tutorial, they show you how to build on it and add a few new features like a changing cursor depending on its position in the current image. The show the folder structure you'll need, the HTML and PHP to make the backend work and the CSS and Javascript to round out the frontend. If you want to skip straight to the good stuff you can also just download all the code and get started.

1 comment voice your opinion now!
tutorial sliding photo thumbnail gallery jquery css


Lorenzo Alberton's Blog:
Create a video preview as animated GIF with FFmpeg and PHP SPL
September 04, 2009 @ 09:52:50

Lorenzo Alberton has posted a new item to his blog with a code snippet showing the combination of FFmpeg and features in PHP's SPL to make a GIF preview.

About one year ago, I had to create animated GIFs as a preview of a video for a media portal. I recently stumbled upon the code I wrote and thought it was probably worth sharing. It makes a rather unconventional use of the SPL Iterators, proving how flexible they are.

His method combines Imagick, FFmpeg and a a Thumbnail_Extractor class that extends the SPL Iterator. The script runs through the frames of the movie file and allows you to define multiple places to pull thumbnails from. Complete code and output examples are included.

0 comments voice your opinion now!
animated gif tutorial ffmpeg movie thumbnail spl


NETTUTS.com:
Learning OOP in PHP ASAP!
January 20, 2009 @ 09:36:36

NETTUTS.com has posted an introduction (using the Car analogy, of course) to teach you how to use the basics of object-oriented programming in PHP.

PHP is so much more than a scripting language. It's a full-fledged language capable of building very complex applications. By harnessing the full power of Object Oriented Programming, you can reduce the amount of time you spend coding and use it to build better websites. This tutorial will show you how.

They explain objects, inheritance, encapsulation and polymorphism briefly before "getting their hands dirty" with some actual OOP PHP code. Their code example sets up a thumbnailer class - one that takes in an image, a height/width you want to resize it to (as properties) and splits it back out the other side.

As always, you can grab the source or view the demo to see it work.

0 comments voice your opinion now!
tutorial thumbnail oop object oriented introduction


NETTUTS.com:
How to Dynamically Create Thumbnails
November 21, 2008 @ 10:31:25

The NETTUTS.com blog has a new screencast posted showing how to create a simple thumbnailing script you can use in any application (like an image gallery).

In this week's screencast, I'll show you how to upload files and then have PHP dynamically create a thumbnail. Whether you're building an ecommerce site, or just a simple gallery, these techniques will absolutely prove to be useful. If you're ready for your "spoonfed" screencast of the week, let's get going!

The post also includes all of the code and HTML that you'll need to get it up and running (very cut and paste-able).

0 comments voice your opinion now!
dynamic thumbnail screencast gallery tutorial


Cory Borrow's Blog:
Creating thumbs from textfiles with PHP and GD
January 16, 2008 @ 12:50:00

Cory Borrow has posted a tutorial he's created to show how to harness the power of PHP and GD to create thumbnail images out of the contents of a text file.

Today, I'll give a little info on how to achieve the process of creating a thumbnail using PHP, GD and the text from a text file. It is really pretty simple, so lets get started.

The trick behind the translation is in reading in the contents of the (plain) text file and pushing it into a string value of a newly created GD-generated image. He includes the code to make using it in your own app simple (a cut and paste version) - his method FileToThumb.

0 comments voice your opinion now!
thumbnail image gd tutorial text file contents thumbnail image gd tutorial text file contents


Mikko Koppanen's Blog:
Padding thumbnail with color
January 11, 2008 @ 12:05:00

Mikko Koppanen has another image tutorial posted to his blog today - this time the focus is on padding a thumbnail with the color of your choice automatically.

Today's example originates from a question asked by a user. How do I thumbnail the image inside given dimensions proportionally and fill the "blank" areas with a color? Well, the answer is here.

His code pulls in the source image, generates a thumbnail from it and makes a new image (the background) that's a bit bigger than the thumbnail. From there, the thumbnail is laid on top and the whole thing is output as another PNG. An example of the input and output image is included.

0 comments voice your opinion now!
imagick padding thumbnail color example imagick padding thumbnail color example


Mikko Koppanen's Blog:
Pretty Thumbnails
October 08, 2007 @ 16:14:00

Mikko Koppanen has another example of image manipulation in PHP through Imagick to create dynamic thumbnails of your images.

Today's example is about making pretty thumbnails by combining a drop-in shadow with round corners. The image is first scaled down to create a thumbnail. [...] The next step is to round the corners of the image. [...] The final step is to create the drop-in shadow and composite the thumbnail over it.

Both the code block to create the thumbnail and a before and after image to show how it translates in the post.

0 comments voice your opinion now!
imagick thumbnail round corner dropshadow tutorial imagick thumbnail round corner dropshadow tutorial



Community Events





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


code language framework application community developer introduction interview release threedevsandamaybe laravel list tips development podcast api deployment zendserver series conference

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