diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor.cs index 1b9e194e1..a4de21874 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor.cs @@ -44,7 +44,7 @@ namespace ImageSharp.Formats.Tiff { int bit = (b >> (7 - shift)) & 1; byte intensity = (bit == 1) ? (byte)255 : (byte)0; - color.PackFromBytes(intensity, intensity, intensity, 255); + color.PackFromRgba32(new Rgba32(intensity, intensity, intensity, 255)); pixels[x + shift, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor.cs index b52e5e045..42d829ef8 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor.cs @@ -40,11 +40,11 @@ namespace ImageSharp.Formats.Tiff byte byteData = data[offset++]; byte intensity1 = (byte)(((byteData & 0xF0) >> 4) * 17); - color.PackFromBytes(intensity1, intensity1, intensity1, 255); + color.PackFromRgba32(new Rgba32(intensity1, intensity1, intensity1, 255)); pixels[x, y] = color; byte intensity2 = (byte)((byteData & 0x0F) * 17); - color.PackFromBytes(intensity2, intensity2, intensity2, 255); + color.PackFromRgba32(new Rgba32(intensity2, intensity2, intensity2, 255)); pixels[x + 1, y] = color; } @@ -53,7 +53,7 @@ namespace ImageSharp.Formats.Tiff byte byteData = data[offset++]; byte intensity1 = (byte)(((byteData & 0xF0) >> 4) * 17); - color.PackFromBytes(intensity1, intensity1, intensity1, 255); + color.PackFromRgba32(new Rgba32(intensity1, intensity1, intensity1, 255)); pixels[left + width - 1, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero8TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero8TiffColor.cs index ae9cf4615..b30cbe264 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero8TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero8TiffColor.cs @@ -37,7 +37,7 @@ namespace ImageSharp.Formats.Tiff for (int x = left; x < left + width; x++) { byte intensity = data[offset++]; - color.PackFromBytes(intensity, intensity, intensity, 255); + color.PackFromRgba32(new Rgba32(intensity, intensity, intensity, 255)); pixels[x, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb888TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb888TiffColor.cs index afe88510e..a4c1c8ad5 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb888TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb888TiffColor.cs @@ -41,7 +41,7 @@ namespace ImageSharp.Formats.Tiff byte r = data[offset++]; byte g = data[offset++]; byte b = data[offset++]; - color.PackFromBytes(r, g, b, 255); + color.PackFromRgba32(new Rgba32(r, g, b, 255)); pixels[x, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor.cs index 34bc5e731..25d01a2fb 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor.cs @@ -44,7 +44,7 @@ namespace ImageSharp.Formats.Tiff { int bit = (b >> (7 - shift)) & 1; byte intensity = (bit == 1) ? (byte)0 : (byte)255; - color.PackFromBytes(intensity, intensity, intensity, 255); + color.PackFromRgba32(new Rgba32(intensity, intensity, intensity, 255)); pixels[x + shift, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor.cs index 00653feb4..8aef89dc5 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor.cs @@ -40,11 +40,11 @@ namespace ImageSharp.Formats.Tiff byte byteData = data[offset++]; byte intensity1 = (byte)((15 - ((byteData & 0xF0) >> 4)) * 17); - color.PackFromBytes(intensity1, intensity1, intensity1, 255); + color.PackFromRgba32(new Rgba32(intensity1, intensity1, intensity1, 255)); pixels[x, y] = color; byte intensity2 = (byte)((15 - (byteData & 0x0F)) * 17); - color.PackFromBytes(intensity2, intensity2, intensity2, 255); + color.PackFromRgba32(new Rgba32(intensity2, intensity2, intensity2, 255)); pixels[x + 1, y] = color; } @@ -53,7 +53,7 @@ namespace ImageSharp.Formats.Tiff byte byteData = data[offset++]; byte intensity1 = (byte)((15 - ((byteData & 0xF0) >> 4)) * 17); - color.PackFromBytes(intensity1, intensity1, intensity1, 255); + color.PackFromRgba32(new Rgba32(intensity1, intensity1, intensity1, 255)); pixels[left + width - 1, y] = color; } } diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero8TiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero8TiffColor.cs index 8168839ad..469767510 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero8TiffColor.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero8TiffColor.cs @@ -37,7 +37,7 @@ namespace ImageSharp.Formats.Tiff for (int x = left; x < left + width; x++) { byte intensity = (byte)(255 - data[offset++]); - color.PackFromBytes(intensity, intensity, intensity, 255); + color.PackFromRgba32(new Rgba32(intensity, intensity, intensity, 255)); pixels[x, y] = color; } }