As I wrote here I was looking for a way to use QuickLook to produce preview images of files.
On day later Matt Legend Gemmell luckily wrote a little method to do exactly what I wanted.
I took that as a reason to write my first little Objective-C/Cocoa app: A command line tool, which uses QuickLook to generate preview images of files.
It took me some time to get familiar with the ObjC syntax and I noticed it’s really boring to write ObjC apps with a German keyboard layout because of the heavy use of square brackets. My next notebook will definitely have an English keyboard layout!
I also took advantage of the new Garbage Collection in ObjC 2.0 (yeah, you can throw stones on me!). But I think it’s a nice thing for developers who are not so familiar with ObjC/C/C++ like me.
To cut a long story short, here is the code: http://github.com/kommen/quikiee/
Here is the binary: quickiee.zip (requires Mac OS X 10.5, obviously)
Attention: The code is not tested very well and may blow up your computer! :)
How to use?
./quickiee <srcfile> <destfile> <size> <imageformat>
Comments, suggestions, enhancements etc. to the code are welcome!
With the release of Leopard, one of the features I really was looking forward to was QuickLook.
I was a bit disappointed, when I read in the documentation (login required), that Apple only provides an API to write generators, which produce previews and thumbnails for QuickLook, but they don’t provide an API to actually use QuickLook in 3rd party applications.
A note in the docs just says: “… private programmatic interfaces available to internal clients of Quick Look might one day be made available for third-party development (as API) in a future version of the Quick Looks framework.”
In particular, I was interested in getting plain images (PNG or JPEG) of QuickLook generated previews.
So if anybody knows a way to get those images, please let me know. :)
Minimalexperimental, a platform for online and offline design exhibitions—Great stuff!
webstock conference —
We were there!