 
     private function generateImage(resultBits:Array, imageWidth:Number,
         imageHeight:Number):Bitmap {
-      // generate an image
       var bitmapData:BitmapData = new BitmapData(imageWidth, imageHeight, false,
           0xFFFFFF);
       var bitmap:Bitmap = new Bitmap(bitmapData);

      }
      return contents;
    }
  }
}

    }

    [Test(description="Encode a number, decode it, and compare.")]
    public function testEncodedEAN8shouldBeDecodedSuccessfully():void {
      var testCode:Number = 48512343;
      var decodedNumber:Number = encodeAndDecode(testCode);
      assertEquals(testCode, decodedNumber);
    }

    [Test(description="Encodes EAN8 from 0 to 9999999.")]
    public function testEncodeAndDecodeAnyValidEAN8Number():void {
      for (var testCode:Number = 9999999; testCode >= 0; testCode -= 1111111) {
        var checkSum:Number = calculateEANChecksumDigit(testCode);
        var testCodeWithCheckSum:Number = testCode * 10 + checkSum;
        var decodedNumber:Number = encodeAndDecode(testCodeWithCheckSum);
        assertEquals(testCodeWithCheckSum, decodedNumber);
      }
    }

    private function encodeAndDecode(testCode:Number):Number {
