Truths on Resolution Independence.
May 31, 2007 on 2:10 pm | In Apple, Cocoa, Code, Design, GraphicsLooking back, the Iconfactory’s post on resolution-independence has some holes in it (and looking back now, this post has too - see the end of the post and the comments).
Why, you ask? They claimed that PDF’s in the user interface as a new format instead of the current TIFF files, the entire OS would come to a screeching halt, that icons would go beyond megabyte sizes and general mayhem would throw all resolution-independence craving Mac users into a purgatory. We knew different then, we know different now. A few months back, I posted about the ‘new’ Oxygen icon suite for KDE, being all SVG-vector based, and it didn’t wipe Linux off the face of the Earth. Instead, some optimized SVG files and rendering tricks made it work quite good, and these days, some ‘dock’-applications for GNU/Linux put the SVG’s to good use.
You can test this kind of stuff on OS X too, you know. First of all, as we all know from the rather public Resolution Independence segment of the “Leopard Features in Cocoa” session, free on the ADC Online iTunes page that we can define image resources of varying DPI values. You’d have the same size images if you open them in, say, Preview, but once zoomed in, it’s obvious that one contains four times as much pixel data. Assume that drawing units (points) are independent of screen pixels - if you take a 100*100 point image with 72 DPI, it’s 100*100 pixels. if you take a 100×100 image with 288 dpi, you get 400*400 pixels, but this 288 DPI image isn’t ‘larger’ on-screen; it would be as large as the 72 DPI image on a 288 DPI screen.
But you can be more flexible with vector resources. Now, I wouldn’t really use my own icons in vector format, because it -would- put the OS to a screeching halt, but we all know that there is no plan to make the Dock icons vector - instead, we are simply putting 512 pixel icon resources in all new ICNS files to keep the scaling possible. Toolbar icons, on the other hand, are often very simplified graphics. Take the GNOME Tango icon set’s trash icon as an example;
![]()
As you can see on the right, this SVG icon has a 72 dpi version in which the dark outline is exactly one pixel wide - we could compare this to toolbar icons, which generally have the same characteristics. One pixel-outlines, and often a lot of pixel-art to get it all looking proper in the 32*32 pixel space. No more! In OS X 10.5, we can do it the Tango way. It takes two to Tango, doesn’t it? In our case, one PDF vector resource (we don’t generally use SVG’s, OS X has a PDF graphics subsystem with Quartz) and either include a DPI-ready vector resource in the PDF (one that has a 1 pixel border on 72 DPI, for instance), or a separate file (a multi-representation TIFF) that is used with a little bit of Cocoa’s help. Apple has been kind enough to give you something to grab the screen’s DPI value and thus, do something with that. In the session, a solution like this was suggested;
NSImage (pointer) Name=Imagename Size={100,100} Reps=(
  NSBitmapImageRep (pointer) Size={100,100} Pixels=100×100
  NSBitmapImageRep (pointer) Size={100,100} Pixels=400×400
)
Of course, assumed here is that we are talking about our earlier resources; one 72-dpi 100*100 pixel image, and a 288 dpi 400*400 pixel image get put in place conditionally. Cocoa will chose the resource accordingly. If we can, however, we should use vector resources. They won’t ever give problems because they scale with our interface - you can set the PDF as the icon resource and as the workspace scale factor gets higher, the graphic scales accordingly and loss-less. I hear you say that perhaps, some high-end systems with high scale factors are able to render vector graphics of increased complexity without too much strain, and all systems with a smaller scale factor (I assume laptops and low-end desktop systems) don’t really want to render out vector graphics because they are both hard to parallelize and take battery life in the case of portables. Although there is an argument that rendering out vector resources smaller is faster anyway, representing vector graphics still is a lot more intensive than just displaying bitmap data. Perhaps an if switch is needed?
- (CGFloat)userSpaceScaleFactor;
This method returns the workspace’s scale factor and lets you act on it accordingly. It’s simple to set up this method and make a switch of resources (I will leave that as an exercise to anyone who has a ‘Leopard to build on’). Afraid this might make your application bigger? I wouldn’t worry about this too much. If you would upgrade your toolbar to this dual-resource system, all your 32*32 resources wouldn’t need the 128*128 resources, whereas the vector resources included are generally smaller than any bitmap data. It’s a small price to pay for a better looking app. Now go forth, and make sure I see some both efficient, pretty, and resolution-independence ready apps soon! If you need help, you can get information about my services at icondesigner.net.
Edit: Craig Hockeberry of the Iconfactory has commented on the whole matter, and after a bit of chatting I agree that it is overboard for an interface designer to talk about these matters of switching resources - however, it was meant in a ways of throwing around idea’s. I must say that I was wrong in a few other points; vector in PDF cannot yet be seen as a medium for all toolbar icons because it’s not efficient enough. I’d like to thank Craig for all the input.
Your chance to speak out: Icondesigner.net multi-platform icons?
May 31, 2007 on 12:26 pm | In Graphics, Personal WorkNow is the perfect time to comment - if you would only comment once (like uh, you loyal US Courts-domain using RSS-based blog reader, please let me know who you are!) in your lifetime here, do it now. I really want to make a good decision on this.
On Macthemes, there are questions for some alternative formats of the icons, apart from a DMG with an ICNS resource slapped on it. PNG, perhaps a set of Windows / Linux desktop environment icons. How should I go about this? Do you guys want other formats than just OS X compatible icon resources? This week, IE is used by about 6,7% of my visitors, where the Windows-using portion of the readers is about 18%, and the Linux / *nix using crowd an estimated 10 to 16%. There is also someone using OS/2 (who are you, you fascinating individual?).
Now let me know. Comment, email (you can find my address on my site) or let me know by Macthemes private message what I should do in the future with my icon formats.
Stop bothering me.
May 31, 2007 on 12:06 pm | In RamblingsI don’t know what moron calls himself ‘Fag stomper’ at all, but I already know you’re from Michigan, in the city of Lansing, Comcast for a provider and they got a complaint about someone spamming just now. Stop posting offensive comments, it’s useless as I have to moderate them anyway. I consider the matter closed. Here, take a look at this purdy map of your location:
For everyone but me and this strange individual; some strange person has been trying to post rather offensive and blatantly misspelled comments on my blog. I won’t repeat his words, because they will simply be ignored, and deleted. Get a life, dude.
Icondesigner.net launches!
May 30, 2007 on 5:36 pm | In Announcement, Design, GraphicsA little showroom of icon design and an outlet for downloads - that’s what I wanted. Now, I found a nugget of a domain name; icondesigner.net. You should check it out, because I added a little new icon for Wireshark, the open-source network analyzer and protocol dissector. It has a -horrible- icon in OS X, and that’s now fixed. Enjoy!
Apple, please fix your batteries.
May 29, 2007 on 8:37 pm | In AppleBefore I am going to spill the bad beans, some positive vibes. I am going to a nice festival in August here in the Netherlands. I can finally see some musicians I have been dying to see live for a long time. One of them being the inspiring ‘math metal’ band Tool, but others like Trentemoller and Ojos de Brujo are some performances I really look forward to. Lowlands, as it’s called, is a very laid-back festival with an excellent atmosphere. I can recommend it to anyone who wants to enjoy Dutch people at their best.
In the mean time, I’ve had some big ‘fun’ with Praetorian. Upon discovering the HIG guide that no interface element should use over 75% black, I am in a dilemma. I like the current GUI but obviously does not adhere to the standards - while I like it and it’s discerning, it could definately hinder it’s long-term potential and become too ‘gimmicky’. I could, without really taking it’s flair and charm away, bring it to the 75% black standard. I think, looking forward, that this will probably make the beta date slip. There have been some rather insane keychain issues with the last builds that have almost made me throw the Macbook Pro out of the window.
Now, for the bad apples.
I lost a ton of work because the Macbook Pro’s battery I am using for almost ten months decided to go die on me spontaneously. It’s a painful moment. My first iPod’s battery died. My first Macbook Pro’s battery got hot to the point of melting the trackpad, bending the case, and generally screwing up the whole thing. I turned it in and it got shipped to Cupertino overnight. Nice going, Apple. After three months of bargaining (I -really- wasn’t waiting for some Customer Relations jerk that wanted to give me one from the same serial number range when there were faster and Rev. D machines in stores for less money) I got a new Macbook Pro. Now, yeah, it died on me. Again. Not to mention my girlfriend’s Macbook, which also had a battery that ‘just died’. Perhaps that should be the new Apple slogan. “It just dies”.
“Whoa, what’s up with the Apple hating?”, I hear you scream. I don’t. I love the platform, I adore the developers of the software. I don’t like Apple for putting out stuff before it’s really finished and it breaking on, well, a lot of people. Stop calling it ‘Pro’ if I can’t build on it. I lost a lot of work (slash time, slash money) on these hardware defects. Last time, I lost my work station for months.
Now, I hope I can get this thing fixed. I will have to get a battery soon, in the next few days, but after a few weeks, when I got my term finished, I will turn in my Macbook Pro for having paint coming off, a defective superdrive and some other minor issues. I hope that my saga ends after that, although with my luck, I doubt it…
What’s the sound of a thousand trekkies crying?
May 28, 2007 on 8:35 pm | In AnnouncementOn a predatory hunt for internet property.

102nd post.
May 27, 2007 on 8:42 pm | In AnnouncementWhy 102? I don’t know, when I hit 100, I really had something to tell. And 102 is a nice number too, not too overused like the overrated 100. Wikipedia states: “The sum of Euler’s totient function φ(x) over the first eighteen integers is 102.” That’s great.
No, really, I just wanted to commemorate what this blog (and more specifically, the people reading and visiting) has done for me. It’s incredible. Before I started the Cocoia Blog, I was not really into blogs - in fact, the term gave me shivers. It sounded like an over-hyped term of people spewing completely irrelevant stuff on free accounts offered by many platforms boasting Google ads.
And although there is a truth in that, since I picked up blogging because I thought I had something to put my thoughts in for a select group of visitors. Alienbinary’s journal (something now long since offline) was a place where I read the thoughts of someone, just an American guy in young years, over a few years. It was a pretty well-kept journal, and he was very elaborate and well-articulated in expressing himself. His writing about a first-generation iPod made me save up cash and buy a third-gen; I didn’t have too much to do with Macs then. His writing really influenced my life and made me reconsider, for years, how important words can be on the internet. Finding a site through some long sessions at night, and feel like you really have a connection with the writing is fantastic.
And thus, I started the blog after a while. I expected minorities of like-minded people reading, and no input at all. My thirteenth post changed a lot. After being a passive digg user, I submitted my first how-to, and it got nearly a thousand diggs. I got featured on podcasts, the news was spread through a variety of sites, and people were generally amazed at the notion that Macs were secure, but the defaults weren’t inpenetrable. I’m not saying insecure; they simply weren’t limiting avenues for attack. The second large uproar came when I announced two applications of my making. I got featured on Ars Technica, another slew of podcasts, and after a short while, the third large wave of publicity hit. I reviewed security in Leopard, and apart from several legal emails, my digg account got blocked, the story pulled off the frontpage (and later restored).
Since these major ‘publications’, the Cocoia Blog has become a very well-visited website. I pull off an average of 9500 visitors per day. I get a lot of e-mail, I got a product launched that got me even more traffic, and comment spam is taking astronomical proportions. Large companies and institutions flatter me with visits, inquiries, and sometimes even phone calls on my home number. What am I getting at?
This blog changed my life.
I never, ever could have conceived when I started this that I would come out a whole different person. I don’t feel limited in my posting, I don’t feel a sudden urge to put ads on my blog, not in that way. I feel changed and enriched by the experiences that it has brought me. And that could only be attained by my readers. Thank you. I hope I can make you stay with me for another 102 posts.
Message to all RSS-using blog readers.
May 26, 2007 on 8:13 pm | In RamblingsThe stripped version of the feed has been replaced with one containing images and line breaks. Don’t go off duplicating the site, please. Delete the feed in your reader to re-sync. Some RSS apps may pick up on the change, but Vienna doesn’t. Hope this fixes your problem, Jo.
iPod innovation.
May 26, 2007 on 7:06 pm | In Code, Personal Work, TimezonesI came, in my stumbling around for iPod innovation, across this neat snippet of code. It’s by Keith Wiley, who also has a method on his site for trapping fourdimensional objects and counting to 1023 on two hands, and 31 on one. I think he’s awesome already, big credit to him. Now, on to the code.
What does this do? Well, it essentially reverses everything iTunes does when it stores images on your iPod in the opaque ithmb format. This snippet of code ‘decodes’ the interlaced images of 720*480 (apparently, a TV format for the AV output), and there are a multitude of other sizes present in the files. What does this mean to me? Uh, I got to up the resolution of Timezones to let you be able to check it out in high resolution on a TV. You want that, right?
Now, actually, what I am going to do is reverse the coding of the tiniest thumbnail graphics - the one the iPod displays when you enter your Photo Library. You’ll see why, but it’s obvious that it’s usable for many cool things. I might open-source it.
Since the people at Macthemes already had the love, I have to share it with all my subscribers too. Man, I hope you buy in the next week, because you’ll get a beta invite for this;

Yeah, we’ve come a long way.
Post of Leaves
May 26, 2007 on 6:56 pm | In RamblingsRandom House, I don’t know why you are visiting, but I want to shout this at you guys.

These books changed my life. First, I read House of Leaves when it came out (and I was a lot younger) and it shaked my world. It was the Dutch translation - which was disappointing to me, so I bought the American version for it’s incredible cover (shown above, right). Only Revolutions was the second instant buy. I got two versions of House of Leaves at home in the bookshelf and two copies of Only Revolutions. I was severely disdained when there was an artwork contest and it was limited to US citizens. Really, no, really, you guys hurt me with that.
Now, if you think about buying either one of these books, I’d go with House of Leaves first. If you aren’t interested after reading three chapters, drop the book, return it to the store. But I guarantee you, if this is your thing (I’d consider it a 60-40 chance in favor for the readers of my blog), you’ll be enveloped by it after a few pages. It’s a journey of a book, that I’ve researched and read with equal pleasure. It’s scared me out of my wits many times and sometimes made me become paranoid of the shadows in my house at night. Once you enjoy the book (I enjoyed it to a significant level after one read, but I have read it about six times now) I suggest buying Only Revolutions. It’s the first book I ever bought that made me cry.
No, I’m absolutely serious. I don’t consider myself emotional or anything like that - I don’t cry for movies, never did, and generally don’t feel a lot for books either. And no, I didn’t cry because the letters get so small near the middle and you have to flip it over every 8 pages (if you follow the editor’s notes, that is… hint, hint), but because I truly got emotionally dragged along a fantastic tale, caught in the most incredibly beautiful words and phrases I have ever read. I used this line for a font specimen a lot (and damn, I just found out that all samples and source files of this font got corrupt and I got no backup!);

Corduroy was my first real font. It’s a sort of ‘poetry serif’; an aesthetic font for large text. I have a PDF sample still, you can download it here (4.3 megabytes). Unfortunately, as I said, I seem to have lost it for good. I never finished the capitals and some letterforms aren’t perfected either. If anyone is witty about it, you could notice the name is a reference to a mysterious object in the novel House of Leaves; Johnny Truant’s corduroy coat, of which buttons go missing at a certain moment (don’t want to spoil too much here). I’ve done a lot of work that has a theme of these books or one of them. I also had a series of posters made inspired by Only Revolutions, but alas, they too, are corrupt. Here’s one of them, the resource fork being the only thing a proof it ever existed (oh, and a print, yay)

Now, that’s it for Random House love. I really appreciate you guys publishing Mark’s work.

