Browse Source
Merge pull request #728 from jongleur1983/addToStringToBgr24
Add ToString implementations to Bgr24 and Bgra32
af/conversion-experiments
James Jackson-South
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
0 deletions
-
src/ImageSharp/PixelFormats/Bgr24.cs
-
src/ImageSharp/PixelFormats/Bgra32.cs
|
|
|
@ -197,5 +197,11 @@ namespace SixLabors.ImageSharp.PixelFormats |
|
|
|
/// <inheritdoc/>
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
|
|
public void ToRgba64(ref Rgba64 dest) => dest.PackFromScaledVector4(this.ToScaledVector4()); |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return $"({this.B},{this.G},{this.R})"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -280,5 +280,11 @@ namespace SixLabors.ImageSharp.PixelFormats |
|
|
|
this.B = (byte)vector.Z; |
|
|
|
this.A = (byte)vector.W; |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return $"({this.B},{this.G},{this.R},{this.A})"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |