mirror of https://github.com/SixLabors/ImageSharp
18 changed files with 263 additions and 196 deletions
@ -1,18 +1,24 @@ |
|||
// Copyright (c) Six Labors.
|
|||
// Licensed under the Six Labors Split License.
|
|||
|
|||
using SixLabors.ImageSharp.Formats.Bmp; |
|||
using SixLabors.ImageSharp.Formats.Icon; |
|||
using SixLabors.ImageSharp.Metadata; |
|||
|
|||
namespace SixLabors.ImageSharp.Formats.Cur; |
|||
|
|||
internal sealed class CurDecoderCore(DecoderOptions options) : IconDecoderCore(options) |
|||
internal sealed class CurDecoderCore : IconDecoderCore |
|||
{ |
|||
protected override void SetFrameMetadata(ImageFrameMetadata metadata, in IconDirEntry entry, IconFrameCompression compression, Bmp.BmpBitsPerPixel bitsPerPixel) |
|||
public CurDecoderCore(DecoderOptions options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
|
|||
protected override void SetFrameMetadata(ImageFrameMetadata metadata, in IconDirEntry entry, IconFrameCompression compression, BmpBitsPerPixel bitsPerPixel) |
|||
{ |
|||
CurFrameMetadata curFrameMetadata = metadata.GetCurMetadata(); |
|||
curFrameMetadata.FromIconDirEntry(entry); |
|||
curFrameMetadata.Compression = compression; |
|||
curFrameMetadata.BitsPerPixel = bitsPerPixel; |
|||
curFrameMetadata.BmpBitsPerPixel = bitsPerPixel; |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,24 @@ |
|||
// Copyright (c) Six Labors.
|
|||
// Licensed under the Six Labors Split License.
|
|||
|
|||
using SixLabors.ImageSharp.Formats.Bmp; |
|||
using SixLabors.ImageSharp.Formats.Icon; |
|||
using SixLabors.ImageSharp.Metadata; |
|||
|
|||
namespace SixLabors.ImageSharp.Formats.Ico; |
|||
|
|||
internal sealed class IcoDecoderCore(DecoderOptions options) : IconDecoderCore(options) |
|||
internal sealed class IcoDecoderCore : IconDecoderCore |
|||
{ |
|||
protected override void SetFrameMetadata(ImageFrameMetadata metadata, in IconDirEntry entry, IconFrameCompression compression, Bmp.BmpBitsPerPixel bitsPerPixel) |
|||
public IcoDecoderCore(DecoderOptions options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
|
|||
protected override void SetFrameMetadata(ImageFrameMetadata metadata, in IconDirEntry entry, IconFrameCompression compression, BmpBitsPerPixel bitsPerPixel) |
|||
{ |
|||
IcoFrameMetadata icoFrameMetadata = metadata.GetIcoMetadata(); |
|||
icoFrameMetadata.FromIconDirEntry(entry); |
|||
icoFrameMetadata.Compression = compression; |
|||
icoFrameMetadata.BitsPerPixel = bitsPerPixel; |
|||
icoFrameMetadata.BmpBitsPerPixel = bitsPerPixel; |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue