static helper method to create Bitmap from HTMLImageElement,
used by generated [Embed] code