Designing a WebCard bitmap the hard way
NoteCards link icons leading to cards of a certain type can and typically do have a custom bitmap associated with the type.
WebCard cards of type Web initially inherited the bitmap of the parent type Text, a stylized NoteCards blank card frame. To visually differentiate links to Web cards I added a new bitmap, here open in the bitmap editor of Medley Interlisp:
The bitmap at its actual size of 21x18 pixels is near the top left corner of the window. It represents a blank card frame with at the center a globe crossed by meridians and parallels, a common symbol of web links.
Aside from some misunderstandings on defining Interlisp bitmaps, adding a bitmap to WebCard was easy.
Once designed and defined the bitmap itself I passed it as the value of the LinkIconAttachedBitMap
property along wiht the other arguments of NCP.CreateCardType
, the NoteCards API function that defines new card types.
The hard part was coming up with a suitable bitmap, which kept me busy on and off for a couple of weeks.
As an artistically clueless geek my original plan was to pick a public domain icon, scale it to the required size, and import it in Medley Interlisp. Although this Lisp environment predates most modern image file formats, Andrew Sengul wrote a Lisp tool that can convert from PBM to the native Interlisp bitmap format.
I soon found a nice globe icon. Then I was unwillingly thrown into a rabbit hole of NetPBM, Gimp, and ImageMagick tools and options, struggling to produce the right format Andrew's tool could process.
I learned the hard way that if an image contains only black and white pixels, and no other colors, it's unnecessarily difficult to obtain a black and white, 1-bit depth file. Most tools save to 8-bit grayscale despite claiming to do 1-bit black and white.
When I finally imported the rescaled, converted PNG into Medley I realized it was an unlegible tiny blob.
Link icon bitmaps have a size of 21x18 pixels and, aside from the stylized card that makes up the frame of the bitmap, the usable area is only a dozen pixels across. In desperation I fired up the Medley Interlisp bitmap editor and designed the bitmap myself from scratch. It took just a few minutes and was unexpectedly easy.
I'm pleased with the result, but stunned at how long such a seemingly simple task dragged me.
Discuss... Email | Reply @amoroso@fosstodon.org