Exemple #1
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            byte[] body = reader.ReadBytes(this.HeaderOne - 12);

            int numChildren = ToInt32(body, 0);

            Id              = ToInt32(body, 4);
            TrackId         = ToInt64(body, 8);
            unknownOne      = ToInt32(body, 16);
            Rating          = ToInt32(body, 20);
            unknownTwo      = ToInt32(body, 24);
            OriginalDate    = Utility.MacTimeToDate(ToUInt32(body, 28));
            DigitizedDate   = Utility.MacTimeToDate(ToUInt32(body, 32));
            SourceImageSize = ToInt32(body, 36);

            recordPadding = body.Length - 40;

            for (int i = 0; i < numChildren; i++)
            {
                PhotoDetailRecord detail = new PhotoDetailRecord(IsBE);
                detail.Read(reader);

                if (detail.Type == PhotoDetailType.ThumbnailContainer)
                {
                    names.Add(detail.ImageName);
                }
                else
                {
                    FullName = detail.ImageName;
                }
            }
        }
Exemple #2
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            byte[] body = reader.ReadBytes(this.HeaderOne - 12);

            int numChildren = ToInt32(body, 0);

            CorrelationId     = ToInt32(body, 4);
            ThumbnailOffset   = ToInt32(body, 8);
            ImageSize         = ToInt32(body, 12);
            VerticalPadding   = ToInt16(body, 16);
            HorizontalPadding = ToInt16(body, 18);
            ImageHeight       = ToInt16(body, 20);
            ImageWidth        = ToInt16(body, 22);

            recordPadding = body.Length - 24;

            for (int i = 0; i < numChildren; i++)
            {
                PhotoDetailRecord detail = new PhotoDetailRecord(IsBE);
                detail.Read(reader);

                if (i == 0)
                {
                    fileDetail = detail;
                }
            }
        }
Exemple #3
0
        public ImageNameRecord(bool isbe) : base(isbe)
        {
            this.Name     = "mhni";
            recordPadding = 40;

            fileDetail      = new PhotoDetailRecord(IsBE);
            fileDetail.Type = PhotoDetailType.FileName;
        }
Exemple #4
0
        public AlbumRecord(bool isbe) : base(isbe)
        {
            this.Name       = "mhba";
            nameRecord      = new PhotoDetailRecord(IsBE);
            nameRecord.Type = PhotoDetailType.String;
            nameRecord.BrokenChildPadding = true;

            recordPadding = 84;
        }
Exemple #5
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            byte[] body = reader.ReadBytes(HeaderOne - 12);

            int numDataObjects = ToInt32(body, 0);
            int numAlbums      = ToInt32(body, 4);

            PlaylistId = ToInt32(body, 8);
            unknownOne = ToInt32(body, 12);
            unknownTwo = ToInt16(body, 16);
            IsMaster   = body[18] == (byte)1;

            PlayMusic           = body[19] == (byte)1;
            Repeat              = body[20] == (byte)1;
            Random              = body[21] == (byte)1;
            ShowTitles          = body[22] == (byte)1;
            TransitionDirection = body[23];
            SlideDuration       = ToInt32(body, 24);
            TransitionDuration  = ToInt32(body, 28);
            unknownThree        = ToInt32(body, 32);
            unknownFour         = ToInt32(body, 36);
            TrackId             = ToInt64(body, 40);
            PreviousPlaylistId  = ToInt32(body, 48);

            recordPadding = body.Length - 52;

            for (int i = 0; i < numDataObjects; i++)
            {
                PhotoDetailRecord detail = new PhotoDetailRecord(IsBE);
                detail.Read(reader);
                detail.BrokenChildPadding = true;

                if (i == 0)
                {
                    nameRecord = detail;
                }
            }

            items.Clear();

            for (int i = 0; i < numAlbums; i++)
            {
                AlbumItemRecord item = new AlbumItemRecord(IsBE);
                item.Read(reader);

                AddItem(item);
            }
        }