Home > Application Develeopment > Digital Comic Viewer part 2

Digital Comic Viewer part 2

I’d planned to pay for the feature I wanted in SWF To Image, but it turned out to already exist! There’s a method called LoadFromBinaryImage that is intended to process FlashMovie objects created by SWF Scout (a commercial SWF generation library), but I can throw my byte array at it like this: (hIssueData is a hashmap, and imageX_lfile is the byte array for the modified lettering file of a specific page)

object objSwf = hIssueData["image" + x.ToString() + "_lfile"];
renderFlash.LoadFromBinaryImage(ref objSwf, “http://www.google.com”);

For some reason LoadFromBinaryImage requires a non-empty string as second parameter called BaseURL… I guess it gets used if there are external resources called from the SWF. Anyway, I can then take renderFlash.BinaryImage and pass it through the ImageMagick routines to end up with the final combined image.

The end result is that I’ve now got a working viewer that writes no assets to disk. However I’ve still got to do the full-screen mode, keyboard navigation, and a better way of selecting comics before I do a release. Due to Grand Theft Auto IV that could mean at least a week. :)

techknight Application Develeopment

  1. No comments yet.
  1. No trackbacks yet.