private void ReadImageBlob(Tag tag, uint followingOffset)
{
int id = this.sdtr.ReadUI16();
#if DEBUG
this.Log("char id=" + id);
#endif
byte[] data = this.sdtr.ReadByteBlock((int)(followingOffset - this.sdtr.Offset));
ImageBlob image = new ImageBlob()
{
DataFormat = tag,
FormattedBytes = data
};
if (tag == Tag.DefineBits)
{
if (jpegTable == null)
{
throw new SWFModellerException(SWFModellerError.SWFParsing,
"DefineBits tag without a JPEGTables tag is illegal.", swf.Context);
}
image.JPEGTable = jpegTable;
}
this.characterUnmarshaller.Add(id, image);
this.swf.AddCharacter(CID_PREFIX + id, image);
}