A while back, I made a decision to add support for image generation in TypograFix. Basically, the idea is to get headings and other image elements with generated text made automatically by the program. An example can be seen here. So what did I learn?
First, 64-bit development with Visual Studio turned out to be absolute hell. To begin with, all the code I wrote on 32-bit Windows failed to work. It took me several hours to figure out why Visual Studio was using a 32-bit compiler with a 64-bit linker. I even had to open the Add/Remove Features window to check that 64-bit support was, in fact, installed. Also – stupidly enough – VS’s internal settings messed up not just the Microsoft C++ compiler, but also Intel’s one, much to my dismay.
The second piece of complete nonsense was that basic use of DllImport does not work reliably in 64-bit. You end up having to do dumpbin /exports and specifying the full mangled name of the function. Which is simply ridiculous, as there seems to be no reliable alternative to doing this.
But then of course everything failed due to 64-bit pointer arithmetic. I didn’t have time to check, so I stuck with slow System.Drawing.Bitmap-based manipulations. They worked, and I managed to make an article (a translation of something I published on CP) with image-generated headings and comments replaced by neat inserts with Google-like rounded corners. Which is good.
Oh, as for generating files, I found a really simple solution. When working locally, I put them in the temporary folder. Then, when I save the file, I also save all the images, all ready for FTP and whatnot. Yep, I do set Jpeg quality to 100% because who cares about bandwidth?
TypograFix will no longer be updated on ClickOnce. I have invested far too much time into the project to offer it for free. If you can help, you’ll get a copy.