/// <summary> /// Extracts various fields specific to this chunk from the APNG's /// data field /// </summary> /// <param name="chunkData">An array of bytes representing the APNG's data field</param> protected override void ParseData(byte[] chunkData) { int offset = 0; frameWidth = APNGUtility.ParseUint(chunkData, 4, ref offset); frameHeight = APNGUtility.ParseUint(chunkData, 4, ref offset); //ticksPerSecond = APNGUtility.ParseUint(chunkData, 4, ref offset); //nominalLayerCount = APNGUtility.ParseUint(chunkData, 4, ref offset); //nominalFrameCount = APNGUtility.ParseUint(chunkData, 4, ref offset); //nominalPlayTime = APNGUtility.ParseUint(chunkData, 4, ref offset); //simplicityProfile = APNGUtility.ParseUint(chunkData, 4, ref offset); }
/// <summary> /// Extracts various fields specific to this chunk from the APNG's /// data field /// </summary> /// <param name="chunkData">An array of bytes representing the APNG's data field</param> protected override void ParseData(byte[] chunkData) { int offset = 0; width = APNGUtility.ParseUint(chunkData, 4, ref offset); height = APNGUtility.ParseUint(chunkData, 4, ref offset); bitDepth = APNGUtility.ParseUint(chunkData, 1, ref offset); colorType = APNGUtility.ParseUint(chunkData, 1, ref offset); compressionMethod = APNGUtility.ParseUint(chunkData, 1, ref offset); filterMethod = APNGUtility.ParseUint(chunkData, 1, ref offset); interlaceMethod = APNGUtility.ParseUint(chunkData, 1, ref offset); }
/// <summary> /// Extracts various fields specific to this chunk from the APNG's /// data field /// </summary> /// <param name="chunkData">An array of bytes representing the APNG's data field</param> protected override void ParseData(byte[] chunkData) { int offset = 0; terminationAction = APNGUtility.ParseUint(chunkData, 1, ref offset); // If the data length is > 1 then read 9 more bytes if (chunkData.Length > 1) { actionAfterTermination = APNGUtility.ParseUint(chunkData, 1, ref offset); delay = APNGUtility.ParseUint(chunkData, 4, ref offset); iterationMax = APNGUtility.ParseUint(chunkData, 4, ref offset); } }
/// <summary> /// Extracts various fields specific to this chunk from the APNG's /// data field /// </summary> /// <param name="chunkData">An array of bytes representing the APNG's data field</param> protected override void ParseData(byte[] chunkData) { int offset = 0; redBackground = APNGUtility.ParseUint(chunkData, 2, ref offset); greenBackground = APNGUtility.ParseUint(chunkData, 2, ref offset); blueBackground = APNGUtility.ParseUint(chunkData, 2, ref offset); // If the data length is > 6 then read 1 more byte if (chunkData.Length > 6) { mandatoryBackground = APNGUtility.ParseUint(chunkData, 1, ref offset); } // If the data length is > 7 then read 2 more bytes if (chunkData.Length > 7) { backgroundImageId = APNGUtility.ParseUint(chunkData, 2, ref offset); } // If the data length is > 9 then read 1 more byte if (chunkData.Length > 9) { backgroundTiling = APNGUtility.ParseUint(chunkData, 1, ref offset); } }