Optimize images with PNGOUT (example 2)
By making your image files smaller, you can speed up your website and lower your bandwidth costs. PNGOUT and PNGCRUSH are the most commonly used PNG optimizers. Both tools are console applications without any GUI, and it is not so easy to use them in a Windows environment. Hstart can help to make them more user-friendly.
As I personally prefer PNGOUT, I will use it in my examples. PNGCRUSH works in the same way and you can use it too. Here is how to add an "Optimize with PNGOUT" option to the Explorer context (right-click) menu.
This menu item calls Hstart with the following command line:
""E:\BIN\pngout.exe" /q "D:\My Pictures\Screenshot.png""
After PNGOUT is executed (note the /WAIT switch), a simple message is displayed:
To enable this Shell command, create a new .REG file with the following content:
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT]
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT\command]
@="\"E:\\BIN\\hstart.exe\" /NOCONSOLE /WAIT /TITLE=PNGOUT /MSG=\"Image compressed!\" \"\"E:\\BIN\\pngout.exe\" /q \"%1\"\""
A few notes on the REG file:
- The REG files have a special interpretation of backslash characters: you have to use it before double quotes and backslashes if these characters appear in the data value (\\ => \ and \" => ").
- Don't forget to replace "E:\BIN\hstart.exe" and "E:\BIN\pngout.exe" with your own paths.
The sample REG file is also included in the Hstart package (see Examples\pngout).
Download Hstart (32-bit and 64-bit)
Related Links
Optimizing PNG images:
Hstart examples:
- Example 1: Automate your daily backups
- Example 2: Optimize images with PNGOUT
- Example 3: Code Signing with one click
* All screenshots on this page are made with WinSnap.
