Browse Source

Rename params

pull/3119/head
James Jackson-South 6 months ago
parent
commit
67b9713ae0
  1. 6
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
  2. 8
      src/ImageSharp/Formats/Webp/WebpAnimationDecoder.cs

6
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -1470,9 +1470,9 @@ internal sealed class BmpDecoderCore : ImageDecoderCore
/// Reads the embedded ICC profile from the BMP V5 info header. /// Reads the embedded ICC profile from the BMP V5 info header.
/// </summary> /// </summary>
/// <param name="stream">The <see cref="BufferedReadStream"/> containing image data.</param> /// <param name="stream">The <see cref="BufferedReadStream"/> containing image data.</param>
/// <param name="metadata">The image metadata.</param> /// <param name="imageMetadata">The image metadata.</param>
/// <param name="infoHeaderStart">The stream position where the info header begins.</param> /// <param name="infoHeaderStart">The stream position where the info header begins.</param>
private void ReadIccProfile(BufferedReadStream stream, ImageMetadata metadata, long infoHeaderStart) private void ReadIccProfile(BufferedReadStream stream, ImageMetadata imageMetadata, long infoHeaderStart)
{ {
byte[] iccProfileData = new byte[this.infoHeader.ProfileSize]; byte[] iccProfileData = new byte[this.infoHeader.ProfileSize];
stream.Position = infoHeaderStart + this.infoHeader.ProfileData; stream.Position = infoHeaderStart + this.infoHeader.ProfileData;
@ -1485,7 +1485,7 @@ internal sealed class BmpDecoderCore : ImageDecoderCore
IccProfile profile = new(iccProfileData); IccProfile profile = new(iccProfileData);
if (profile.CheckIsValid()) if (profile.CheckIsValid())
{ {
metadata.IccProfile = profile; imageMetadata.IccProfile = profile;
} }
else else
{ {

8
src/ImageSharp/Formats/Webp/WebpAnimationDecoder.cs

@ -375,7 +375,7 @@ internal class WebpAnimationDecoder : IDisposable
private void ReadOptionalChunk( private void ReadOptionalChunk(
BufferedReadStream stream, BufferedReadStream stream,
WebpChunkType chunkType, WebpChunkType chunkType,
ImageMetadata metadata, ImageMetadata imageMetadata,
bool ignoreMetadata) bool ignoreMetadata)
{ {
switch (chunkType) switch (chunkType)
@ -384,13 +384,13 @@ internal class WebpAnimationDecoder : IDisposable
// While ICC profiles are optional, an invalid ICC profile cannot be ignored because it must // While ICC profiles are optional, an invalid ICC profile cannot be ignored because it must
// precede the frame data, and we cannot safely skip it without successfully reading its size. // precede the frame data, and we cannot safely skip it without successfully reading its size.
WebpChunkParsingUtils.ReadIccProfile(stream, metadata, ignoreMetadata); WebpChunkParsingUtils.ReadIccProfile(stream, imageMetadata, ignoreMetadata);
break; break;
case WebpChunkType.Exif: case WebpChunkType.Exif:
this.executeAncillarySegmentAction(() => WebpChunkParsingUtils.ReadExifProfile(stream, metadata, ignoreMetadata)); this.executeAncillarySegmentAction(() => WebpChunkParsingUtils.ReadExifProfile(stream, imageMetadata, ignoreMetadata));
break; break;
case WebpChunkType.Xmp: case WebpChunkType.Xmp:
this.executeAncillarySegmentAction(() => WebpChunkParsingUtils.ReadXmpProfile(stream, metadata, ignoreMetadata)); this.executeAncillarySegmentAction(() => WebpChunkParsingUtils.ReadXmpProfile(stream, imageMetadata, ignoreMetadata));
break; break;
} }
} }

Loading…
Cancel
Save