Image Resizer - Php Application for Windows (Almost)

I decided to write a small utility to quickly and easily batch resize images.
imageresizer

I wrote it in PHP, and while PHP is mostly a "Web" language, it actually worked out quite nicely. You simply double click the icon to start the application, drag and drop a folder with your images into the program window and hit enter. All JPEG, GIF, and PNG images in the folder will be copied to a new subfolder, resized and renamed according to some settings you define.

Note to Vista users: Unfortunately, thanks to the geniuses at Microsoft, you can't drag and drop into the command window in Vista. (Missing Drag and Drop in Vista) I just don't understand why they do stuff like this!

Ok, so how do I run this thing?

To use it, start by download the zip file found at the bottom of this post. The zip file contains a folder named "imagerisezer" with everything inside you need to run the program. (Yes it even includes PHP...) Extract this folder to your desktop, look for "launch_imageresizer.exe" inside the folder, double click it, then follow the instructions.

You mean there is a better way?image resizer context menu

Alternatively, you can extract and place the "imageresizer" folder in your "c:\program files\" directory, then you can create a shortcut to the launcher exe from anywhere. You can also use the included reg file to add an entry into the Windows folder context menu to make it even more convenient to use the utility. To enable this, simply double click the "runimageresizer.reg" file. When asked if you want to merge the information into the registry, select yes. (This has been tested on Vista, and seems to work well. Thanks BojanM .)

I need some info!

You can run Image Resizer in one of two ways. First, you can run it in interactive mode, where it will require you to input the settings every time, or second, in silent mode where you predefine the settings.

  1. Images Folder Path
    • The full path of the directory containing the images you want resized.
    • Example: "c:\documents and settings\johnsmith\desktop\myimages"
  2. Max Image Height
    • The maximum height in pixels the resized image can be.
  3. Max Image Width
    • The maximum width in pixels the resized image can be.
  4. Resized Image Postfix
    • Something to append to the end of the resized file's name.
    • Example: By taking the default value of "_resized", the image "silvesterkitty.jpg"
      will be copied and resized to "silvesterkitty_resized.jpg"

Don't ask so many questions...

If you want to run Image Resizer with these settings predefined, look for a file named "imageresizer.ini". Open the file in Notepad, and make "silent" equal to 1. Next time you run Image Resizer you will only be asked for the path to the images directory. Change the other settings in the ini file to your liking.

Note: Image Resizer always reads the values from the INI file, whether in interactive or silent mode. If in interactive mode, the values from the INI are used as the defaults.

Go ahead and have a download. As always, if you make some enhancements or have ideas, please let me know.

Revision History

  • 0.4.3 - 04/03/2008
    • cleaned up the registry entry to launch the php file itself instead of cmd.exe
    • the "Run Image Resizer On" context menu extension does not show when right-clicking the Recycle Bin

Download Image Resizer 0.4.3 Alpha here (3MB)
Watch a setup/demo video here

You can find more information on PHP at http://www.php.net/

Special thanks to BojanM for contributing to this little utility.

3 Comments

  1. Posted April 3, 2008 at 7:59 am | Permalink

    hey...nice job. that was fast. thanks deciacco

  2. Posted April 7, 2008 at 10:20 pm | Permalink

    finally installed it and it works the way i wanted, thanks again

  3. deciacco
    Posted April 8, 2008 at 7:00 pm | Permalink

    Excellent! It was worth getting up at 4:30AM to fix it! Now that is support!

Post a Comment

Your email is never shared. Required fields are marked *

*
*