|
|
|
@ -1,6 +1,10 @@ |
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
|
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Formats |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
@ -21,5 +25,9 @@ namespace SixLabors.ImageSharp.Formats |
|
|
|
/// Gets color depth, in number of bits per pixel.
|
|
|
|
/// </summary>
|
|
|
|
public int BitsPerPixel { get; } |
|
|
|
|
|
|
|
internal static PixelTypeInfo Create<TPixel>() |
|
|
|
where TPixel : struct, IPixel<TPixel> => |
|
|
|
new PixelTypeInfo(Unsafe.SizeOf<TPixel>() * 8); |
|
|
|
} |
|
|
|
} |
|
|
|
|