Skip to content

Commit

Permalink
Changes due to upgrade of Magick.Native.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Nov 13, 2023
1 parent 2302446 commit 17462e8
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 77 deletions.
42 changes: 21 additions & 21 deletions src/Magick.NET/MagickImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public IEnumerable<PixelChannel> Channels
yield return channel;
}

for (var channel = PixelChannel.Meta0; channel <= PixelChannel.Meta53; channel++)
for (var channel = PixelChannel.Meta0; channel <= PixelChannel.Meta52; channel++)
{
if (_nativeInstance.HasChannel(channel))
yield return channel;
Expand All @@ -462,25 +462,25 @@ public IChromaticityInfo Chromaticity
{
get
{
if (_nativeInstance.ChromaRedPrimary is null ||
_nativeInstance.ChromaGreenPrimary is null ||
_nativeInstance.ChromaBluePrimary is null ||
_nativeInstance.ChromaWhitePoint is null)
if (_nativeInstance.ChromaRed is null ||
_nativeInstance.ChromaGreen is null ||
_nativeInstance.ChromaBlue is null ||
_nativeInstance.ChromaWhite is null)
throw new MagickErrorException("Unable to allocate primary info");

return new ChromaticityInfo(
_nativeInstance.ChromaRedPrimary,
_nativeInstance.ChromaGreenPrimary,
_nativeInstance.ChromaBluePrimary,
_nativeInstance.ChromaWhitePoint);
_nativeInstance.ChromaRed,
_nativeInstance.ChromaGreen,
_nativeInstance.ChromaBlue,
_nativeInstance.ChromaWhite);
}

set
{
_nativeInstance.ChromaRedPrimary = value.Red;
_nativeInstance.ChromaGreenPrimary = value.Green;
_nativeInstance.ChromaBluePrimary = value.Blue;
_nativeInstance.ChromaWhitePoint = value.White;
_nativeInstance.ChromaRed = value.Red;
_nativeInstance.ChromaGreen = value.Green;
_nativeInstance.ChromaBlue = value.Blue;
_nativeInstance.ChromaWhite = value.White;
}
}

Expand All @@ -492,14 +492,14 @@ public IPrimaryInfo ChromaBluePrimary
{
get
{
var primaryInfo = _nativeInstance.ChromaBluePrimary;
var primaryInfo = _nativeInstance.ChromaBlue;

if (primaryInfo is null)
throw new MagickErrorException("Unable to allocate primary info");

return primaryInfo;
}
set => _nativeInstance.ChromaBluePrimary = value;
set => _nativeInstance.ChromaBlue = value;
}

/// <summary>
Expand All @@ -510,14 +510,14 @@ public IPrimaryInfo ChromaGreenPrimary
{
get
{
var primaryInfo = _nativeInstance.ChromaGreenPrimary;
var primaryInfo = _nativeInstance.ChromaGreen;

if (primaryInfo is null)
throw new MagickErrorException("Unable to allocate primary info");

return primaryInfo;
}
set => _nativeInstance.ChromaGreenPrimary = value;
set => _nativeInstance.ChromaGreen = value;
}

/// <summary>
Expand All @@ -528,14 +528,14 @@ public IPrimaryInfo ChromaRedPrimary
{
get
{
var primaryInfo = _nativeInstance.ChromaRedPrimary;
var primaryInfo = _nativeInstance.ChromaRed;

if (primaryInfo is null)
throw new MagickErrorException("Unable to allocate primary info");

return primaryInfo;
}
set => _nativeInstance.ChromaRedPrimary = value;
set => _nativeInstance.ChromaRed = value;
}

/// <summary>
Expand All @@ -546,14 +546,14 @@ public IPrimaryInfo ChromaWhitePoint
{
get
{
var primaryInfo = _nativeInstance.ChromaWhitePoint;
var primaryInfo = _nativeInstance.ChromaWhite;

if (primaryInfo is null)
throw new MagickErrorException("Unable to allocate primary info");

return primaryInfo;
}
set => _nativeInstance.ChromaWhitePoint = value;
set => _nativeInstance.ChromaWhite = value;
}

/// <summary>
Expand Down
Loading

0 comments on commit 17462e8

Please sign in to comment.