/// <summary>
/// Create new AttachedPictureFrame
/// </summary>
/// <param name="FrameID">4 Characters tag identifier</param>
/// <param name="Flags">2 Bytes flags identifier</param>
/// <param name="Data">Contain Data for this frame</param>
/// <param name="Length">MaxLength of frame</param>
internal AttachedPictureFrame(string FrameID, FrameFlags Flags, FileStreamEx Data, int Length)
: base(FrameID, Flags)
{
_TextEncoding = (TextEncodings)Data.ReadByte();
Length--;
if (!IsValidEnumValue(_TextEncoding, ValidatingErrorTypes.ID3Error))
{
_MustDrop = true;
return;
}
_MIMEType = Data.ReadText(Length, TextEncodings.Ascii, ref Length, true);
_PictureType = (PictureTypes)Data.ReadByte();
Length--;
_Description = Data.ReadText(Length, _TextEncoding, ref Length, true);
_Data = Data.ReadData(Length);
}