Skip to content

Commit

Permalink
Fixed 2 checks in Imagefunctions AlphaIndex;
Browse files Browse the repository at this point in the history
  • Loading branch information
onepiecefreak committed Jan 14, 2018
1 parent 739f0c3 commit 03babcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kontract/Image/Format/AI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AI : IImageFormat

public AI(int alpha, int indexSize, byte[] paletteData, IImageFormat paletteFormat, ByteOrder byteOrder = ByteOrder.LittleEndian)
{
if (alpha + indexSize % 8 != 0) throw new Exception("Alpha + IndexSize has to be dividable by 8.");
if ((alpha + indexSize) % 8 != 0) throw new Exception("Alpha + IndexSize has to be dividable by 8.");

this.byteOrder = byteOrder;

Expand All @@ -45,7 +45,7 @@ public AI(int alpha, int indexSize, byte[] paletteData, IImageFormat paletteForm

public AI(int alpha, int indexSize, List<Color> palette, ByteOrder byteOrder = ByteOrder.LittleEndian)
{
if (alpha + indexSize % 8 != 0) throw new Exception("Alpha + IndexSize has to be dividable by 8.");
if ((alpha + indexSize) % 8 != 0) throw new Exception("Alpha + IndexSize has to be dividable by 8.");

this.byteOrder = byteOrder;

Expand Down

0 comments on commit 03babcf

Please sign in to comment.