If you develop desktop applications with Electron, you will quickly need an application menu. Even if you don’t have any menu options that are specific to your application, you will still want to add a menu to get things like copy and paste to work on a mac. Usually you’ll just copy and paste the…
Trimage image compressor
As a front-end developer, minimizing your images is important. Compressed images load faster and take less time to download. However, most current tools that can do that are command line applications that only support one type of image, and oftentimes do not have the same API. To scratch my own itch I build a cross-platform GUI image compressor.
Trimage is a GUI front-end to a couple of command line tools available on most linux based systems (though it should work on mac and windows, too), and can losslessy compress both PNG and JPG files. It looks native, (dare I say) pretty and is very easy to use.
That’s why Trimage has multiple ways of accepting files: You can drop them onto the app, you can open them via a file dialog, and you can feed it images or entire directories via the command line. So you can pick the method you find most comfortable, and use that.
More information can be found on the website: Trimage.org.
How to install
For the moment, I only have installation guides for Ubuntu and other linux-based systems. If you can help me with Mac and Windows, please e-mail me at firstname.lastname@example.org!
Ubuntu is by far the easiest to install. If you’re on karmic or lucid, simply enter this into your console:
sudo add-apt-repository ppa:kilian/trimage
sudo apt-get update
sudo apt-get install trimage
If you are still on Jaunty, read this guide on installing PPA’s.
I’m still looking for help with making .debs, .rpms and the like, but you can install Trimage via python as well:
- Download the source via GitHub or Launchpad
- Make sure you have all the requirements installed: python 2.6, python-qt4 4.4, optipng 0.6.2.1, advancecomp 1.15, jpegoptim 1.2.2, or higher versions
python setup.py installinto your console
- Launch by executing
Why and how
As I said in the intro, I wrote this mostly to scratch my own itch. I wanted an easier way to compress my files that didn’t involve mucking about on the command line or uploading all my images to some server far away via a crappy flash application.
Trimage was inspired by ImageOptim. It is made using python and the PyQt GUI framework. The choice for PyQt was made for a couple of reasons: the Qt4 designer is very easy to use, it’s available cross-platform and most importantly, it provides native widgets. As the latter is my number one annoyance, and I actively avoid using programs that do not look like they belong in my gnome desktop, this was a big issue for me. Paul Chaplin helped me with a lot of the python stuff.
However, PyQt has some downsides as well. For one. The documentation is bad. It’s not complete, hard to read and sometimes isn’t even correct. That’s not to say it’s unusable, but it clearly needs some more love.
Where the documentation lacks however, the #pyqt IRC channel on freenode is awesome. There are a bunch of really smart and nice people there that go out of their way to help you. Every community should be like this.
If you want to build a GUI app for Ubuntu using python, the best start you can get is PyAppTemplate by Neil Wallace, which takes care of all the Hoohaa and voodoo that goes into a setup.py and the debian build files. It took me a day to try and figure it all out by myself, and then an hour to get it working using PyAppTemplate.
As you can see on the website, I have a bunch of features lined up for the coming versions. All development is done on GitHub, so if you want to help out, add more options or scratch an item from the todo, I appreciate all help!
In the past few years tons of new web design tools came out. The old model of static pixel-based comps of screens is slowly being replaced with more modern ideas of designing. These new design tools use constraint based components, or even entire lay-outing systems, they use machine learning to suggest you colors and fonts,…
In a few weeks, Polypane version 1.0 will be released. In these past few months I’ve been hard at work getting everything ready for that release. The process has very little to do with the app itself and much more with creating the infrastructure around it. I thought it would be interesting to go through this…