PngOptimizer 2.5

The main change for this version is the creation of a Linux version of PngOptimizer, with GTK+ for the GUI.


On Linux, you will be able to quickly optimize with a drag and drop interface, as with the Windows version. You can also edit the same settings than on Windows.

Some features are not present on the Linux version. For example, pasting a screenshot is not supported. The main reason is that on Ubuntu (and probably other distributions) there is already a good built-in tool to make PNG screenshots, so I felt it was not needed as much as on Windows. However I may be missing some use cases, so let me know if this options is really missing to you on Linux.

A nice addition with the Linux version is the presence of PngOptimizer in the "Open With" menu of the file explorer when you right-click on a supported image (png, bmp, tga or gif).

Always on top

The other feature which seems to be missing is the "Always on top" option. This is because Window Managers already propose that option. What is missing from the Window Manager is an easy way to make the option persistent, so I thought PngOptimizer could help with that. However I found that tracking the "Always on top" state of a window is not working very well on GTK+. I submitted a patch, hopefully it will be accepted.

deb package

I wanted an icon for PngOptimizer on Linux. On Windows you can embed it in the executable to provide one single file. On Linux, you have separate files, so it means it is easier for the user to provide him with an installation package (you can still run PngOptimizer as a standalone application on an USB key though).

It was the opportunity for me to learn how to build a Debian package. It seems to be working, but there are still some issues I don't know how to solve.

For instance, I don't know where to put the three text files that come with the zipped Windows version: Readme.txt, Changelog.txt and License.txt. For now I put them in /usr/share/doc but I feel it is not the right way of doing. In /usr/share/doc there are usually changelog files with a specific format, but it seems they are related to the .deb packge version, not the application version. I also wonder if I should rename the files on Linux in all-caps and without the ".txt" extension.

I also faced problems with the "Ubuntu software" (based on gnome-software) application, which is here to handle installing/uninstalling applications. It says PngOptimizer is not free, though PngOptimizer license is GPL. I don't know how to put that information in the deb file.

In a more general way, I've been fighting with "Ubuntu software" bugs, but it does not seem related to my .deb package (I tested with other applications that come as a .deb file). For example:

  • I install PngOptimizer and it does not appear in the installed applications list. Closing and reopening "Ubuntu software" is not enough, you have to kill the process and restart it to make the freshly installed application to appear.
  • Sometimes when opening the .deb file, "Ubuntu Software" shows an empty gray screen with a waiting image spinning for ever.
  • Sometimes clicking on the "Install" button does nothing.

Ubuntu 16.10 will be out soon, hopefully those bugs will be fixed.

In the future, I would like to explore the possibility to get the .deb file directly with "apt" but I still need to learn how to do that.


PngOptimizerCL is the command line (no GUI at all) version of PngOptimizer. It got some new features for version 2.5. Here is the changelog:

  • new: option to change frame rate of animated pngs
  • new: -stdio option to read from stdin and write to stdout
  • new: can pass directly one or more files without the -file:"" option
  • new: flags can be written with a double-dash, like "--stdio"
  • new: support of "--" argument to separate flags from file path
  • new: support of "--help" and "--version"
  • change: removed support of flags starting with a slash

Regarding the last change, you could (though not documented) start the options with "/" as done with many command line tools on Windows, but it was a hell to manage on Linux when handling paths starting with a "/" character.