Images dimensions in QuickLook

I’m often looking for images dimensions, and most of the time I hit the spacebar to trigger QuickLook to see them, and each time I’m disappointed because it only displays the name of the file, which, we TOTALLY do NOT care. Finally I end up opening the image with preview, just for some dimensions, it’s teh sux. So it was time to create a new Xcode project.
Continue reading

moatool : Mach-O Archive Tool

After my post on the Universal Binaries, I present you moatool, a tiny tool to manipulate Mach-O archives.
What can it do ?
- Print the fat_section of a Mach-O file, if it’s an archive.
- Split the archive into as much part as there is architecture.
- Reduce the size of the binary by removing the useless architectures, at the end it’s a simple binary.
Continue reading

Universal Binary : The Mach-O file format

I have been playing with Mac OS X file format for a while now. This file format is known as Mach-O, which is resulting from the Mach project on which Mac OS is based.

First a little history, When the Macs crossed from PPC to x86, Apple introduced Universal Binaries applications (UB).
The goal of an UB application is to be able to execute on different types of architecture, the major defect is that the final application is 2 times larger, but nowadays with the disks capacity it’s not really an issue.
So how they did this ? It’s very simple, an UB application is nothing more than an archive of 2 applications with a special header.
Continue reading