Images
A Hard Lesson about MIMEs via the Nokia 770
Recently, the use of the Nokia 770 as a simple drawing tablet struck me as a great use of the recently discounted gadget. I would draw up some ideas, and use Tumblr’s image-upload-via-email feature coupled with Sketch’s send-in-email command to publish them. Of course, I ran into a problem — the images didn’t appear with my posts.
After several days of poking around, I tracked down the problem: any PNG file generated from Sketch is given a “.sketch.png” extension. Always. And once a file has this extension, it is assigned a “sketch/png” MIME-type, not “image/png” which would be the default for PNG images, or even “application/x-sketch-png” which would still be unofficial, but at least follow standard MIME-type conventions for application-specific names.
Just to note: MIMEs were designed to be very flexible. Collisions with file extensions happen, where .XLS doesn’t mean Excel Spreadsheet but means eXtensible Library Sequence or some other custom format (although this has improved in recent years now that we’ve moved past DOS and the dot-three file extension). But that’s why MIMEs came to be, because there’s no guarantee that “sketch/png” is even the same kind of data as “image/png”. In fact, based on the naming convention, it’s explicitly denying that it’s an image.
As far as I can tell, they mistakenly assigned these types because they assumed that those final three letters were unique to an image file, and that even if the MIME is unrecognized by other systems, they would naturally just know it’s an image by its name. Basically, Nokia never left the land of DOS, even though they’re rooted in Linux and the device is an “Internet Tablet.”
The worst part is that there’s really no reason for Sketch to do this. Sketch does not save any application specific metadata into its files — they are really just vanilla PNG images. In fact, the only reason this would be done is so the 770 itself would know the difference between a plain PNG and one created by Sketch. That way, if I selected “Open” from the file browser, it would choose Sketch over the standard Image viewer which would only display the image and not let me edit it.
But hold on a second — why wouldn’t I want to draw on existing photos? That sounds like fun! Why wouldn’t I simply want to browse my sketches either? Sketch is only an editor — I can’t freely browse everything in it, plus if I accidentally make a modification to it, I’m always dismissing a Save dialog when I close it. And by its own logic (since you cannot edit dot-extensions on the device) it could easily sort the two apart if needs be using the extra “.sketch” it adds to the file name.
The real problem here is that Nokia chose to create a end-user distinction that wasn’t really necessary in the first place. After all, they didn’t name the app “Photos” (there’s no camera lens/app in the device). Let all images be Images — photos or hand-drawn — and let us decide if we want to start from a blank slate, or add LOLCaptions on our pets or friends.
That way, you don’t have to make up non-standard extensions like “sketch/png” in the first place.
By the way, if you haven’t tried using Tumblr, I highly suggest you do. Not only is the product great, but the support ain’t bad either. :)
