コード例 #1
0
        /// <summary>
        /// Reads the box properties from stream.
        /// </summary>
        /// <param name="reader">The binary reader with the stream.</param>
        /// <remarks>
        /// The CFF format makes the following changes.
        /// * MajorBrand will be set to "ccff"
        /// * MinorVersion will be set to 0x00000000
        /// * CompatibleBrands will have at least one additional brand encoded with "iso6"
        /// </remarks>
        protected override void ReadBoxPropertiesFromStream(BoxBinaryReader reader)
        {
            this.MajorBrand   = reader.ReadString(4);
            this.MinorVersion = reader.ReadUInt32();

            while (reader.Offset < this.Offset + this.Size)
            {
                this.CompatibleBrands.Add(reader.ReadString(4));
            }
        }
コード例 #2
0
 /// <summary>
 /// Reads the box properties from stream.
 /// </summary>
 /// <param name="reader">The binary reader with the stream.</param>
 /// <remarks>
 /// The CFF format makes the following changes.
 /// * MajorBrand will be set to "ccff"
 /// * MinorVersion will be set to 0x00000000
 /// * CompatibleBrands will have at least one additional brand encoded with "iso6"
 /// </remarks>
 protected override void ReadBoxPropertiesFromStream(BoxBinaryReader reader)
 {
     this.MajorBrand = reader.ReadString(4);
     this.MinorVersion = reader.ReadUInt32();
     
     while (reader.Offset < this.Offset + this.Size)
     {
         this.CompatibleBrands.Add(reader.ReadString(4));
     }
 }
コード例 #3
0
        /// <summary>
        /// Reads the full box properties from stream.
        /// </summary>
        /// <param name="reader">The binary reader with the stream.</param>
        protected override void ReadFullBoxPropertiesFromStream(BoxBinaryReader reader)
        {
            ProfileVersion = reader.ReadString(4);      // Is this actually a string?
            Apid = reader.ReadNullTerminatedString();

            // TODO: Do we need to read in the other_boxes?
            reader.GotoEndOfBox(this.Offset, this.Size);
        }
コード例 #4
0
        /// <summary>
        /// Reads the full box properties from stream.
        /// </summary>
        /// <param name="reader">The binary reader with the stream.</param>
        protected override void ReadFullBoxPropertiesFromStream(BoxBinaryReader reader)
        {
            ProfileVersion = reader.ReadString(4);      // Is this actually a string?
            Apid           = reader.ReadNullTerminatedString();

            // TODO: Do we need to read in the other_boxes?
            reader.GotoEndOfBox(this.Offset, this.Size);
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BitmapInfonHeader"/> class.
        /// </summary>
        /// <param name="reader">The box binary reader.</param>
        public BitmapInfonHeader(BoxBinaryReader reader)
        {
            var initialOffset = reader.Offset;

            this.Size            = reader.ReadInt32();
            this.Width           = reader.ReadInt32();
            this.Height          = reader.ReadInt32();
            this.Planes          = reader.ReadInt16();
            this.BitCount        = reader.ReadInt16();
            this.Compression     = reader.ReadString(4);
            this.ImageSize       = reader.ReadInt32();
            this.XPixelsPerMeter = reader.ReadInt32();
            this.YPixelsPerMeter = reader.ReadInt32();
            this.ColorsUsed      = reader.ReadInt32();
            this.ColorsImportant = reader.ReadInt32();

            this.CodecPrivateData = reader.ReadBytes(this.Size - (int)(reader.Offset - initialOffset));
        }
コード例 #6
0
 /// <summary>
 /// Reads the full box properties from stream.
 /// </summary>
 /// <param name="reader">The binary reader with the stream.</param>
 protected override void ReadFullBoxPropertiesFromStream(BoxBinaryReader reader)
 {
     BaseLocation     = reader.ReadString(256);
     PurchaseLocation = reader.ReadString(256);
     reader.Read(reserved, 0, 512);
 }
コード例 #7
0
 /// <summary>
 /// Reads the full box properties from stream.
 /// </summary>
 /// <param name="reader">The binary reader with the stream.</param>
 protected override void ReadFullBoxPropertiesFromStream(BoxBinaryReader reader)
 {
     BaseLocation = reader.ReadString(256);
     PurchaseLocation = reader.ReadString(256);
     reader.Read(reserved, 0, 512);
 }