PHP Image Upload Script

screen shot

Dominic needed an image upload script built in PHP to plug into an existing backend CMS he was developing for Minnewood, a community site for Minneapolis filmmakers.

The script needed to rename, resize and validate the uploaded image and update a user database with the uploaded image name. Another requirement was for the script to be portable so it could be easily used elsewhere.


Tags: php, applications

Perl Video Frame Grabber Script

screen shot
screen shot
1 2

Jay at Primary Web Services, LLC needed another image processing script - this time, grabbing frames from a video source. The script had to cycle through a folder of videos, displaying a frame from the start of the video and a pair of "yes" / "no" buttons. If "yes" is chosen, it writes the visible frame to an output folder, otherwise it skips ahead a specified number of frames and displays that. If it gets to the end of the video and a frame has not yet been selected it returns the beginning and decreases the number of frames to skip.

To realize this I coded a Perl script that leveraged the ffmpeg decoder to first extract all of the frames, then used Perl's Tk module to display the frame in a GUI window with the "yes"/"no" buttons.

Tags: perl, applications, automation

PHP Code Maintenance

screen shot

This was a quick PHP repair project for Dotcom Industries Inc. They had an upload form generated by a Dreamweaver PHP extension and wanted the code modified so that from errors would each appear on their own separate page instead of in a box at the top of the form. This was achieved through a bit of logic and some PHP header() redirects.

Tags: php, maintenance

Son of Perl Image Conversion Script

screen shot

A couple of days after completing the first Perl Image Conversion Script for Jay at Primary Web Services, he came with another spec based on the core functionality of script #1

This time, it needed to output images and update a CSV file with the image names. So, I built on to the original to create a Perl script that would scan a directory of images and output to another directory images compressed just enough to get them under the specified file size (I'd gathered from the filenames that some of these compressed images were destined for mobile phones).

Tags: perl, applications, automation

Perl Image Conversion Script

screen shot

Jay at Primary Web Services, LLC needed a scripted solution to take a directory of images and create thumbnails in over 120 different formats/sizes etc. The catch here was that each format had a specified maximum file size, in bytes, that could not be exceeded. The goal was to get within that file size with the minimum amount of compression.

I provided a command line utility written in Perl that took an input folder of images and cycled through them. For any one image, the script gradually increases the amount of compression until the file size was within spec, then it moves on to the next image. The script included logging capability and command line switches to specify input and output directories other than the defaults. The formats were all stored in a multi-dimensional array, making it easy to adapt the script to tackle future projects with different specs.

I was wary at first of using a seemingly inefficient write, test filesize, rewrite algorithm. I thought it might not be such a scalable solution - but Jay assured me that he was running it on a fast machine (quad-core) and as he put it "There's no replacement for displacement". In the end I was glad to hear that both Jay and his client were happy with the result.

Tags: perl, applications, automation

Vital Stats:

  • Located in Raleigh, NC
  • Offering custom Web design & development
  • Experienced in scripting for business automation
  • Dedicated to web standards compliance

Contact Info:

Filter Results:

Show projects matching:

Web Sites
Graphic Design

Valid XHTML & CSS | Copyright © 2006-2022, Martin Evans | Page rendered in 0.0101 seconds