diff --git a/src/ImageSharp/Formats/WebP/ExtendedDecoder.cs b/src/ImageSharp/Formats/WebP/ExtendedDecoder.cs new file mode 100644 index 0000000000..04a52f12be --- /dev/null +++ b/src/ImageSharp/Formats/WebP/ExtendedDecoder.cs @@ -0,0 +1,14 @@ +// Copyright (c) Six Labors and contributors. +// Licensed under the Apache License, Version 2.0. + +using System; +using System.IO; + +namespace SixLabors.ImageSharp.Formats.WebP +{ + class ExtendedDecoderCore : WebPDecoderCoreBase + { + public override Image Decode(Stream stream) + => throw new NotImplementedException(); + } +} diff --git a/src/ImageSharp/Formats/WebP/SimpleLosslessDecoder.cs b/src/ImageSharp/Formats/WebP/SimpleLosslessDecoder.cs new file mode 100644 index 0000000000..e4cf9d1038 --- /dev/null +++ b/src/ImageSharp/Formats/WebP/SimpleLosslessDecoder.cs @@ -0,0 +1,14 @@ +// Copyright (c) Six Labors and contributors. +// Licensed under the Apache License, Version 2.0. + +using System; +using System.IO; + +namespace SixLabors.ImageSharp.Formats.WebP +{ + class SimpleLosslessDecoder : WebPDecoderCoreBase + { + public override Image Decode(Stream stream) + => throw new NotImplementedException(); + } +} diff --git a/src/ImageSharp/Formats/WebP/SimpleLossyDecoder.cs b/src/ImageSharp/Formats/WebP/SimpleLossyDecoder.cs new file mode 100644 index 0000000000..ad3e1d9c94 --- /dev/null +++ b/src/ImageSharp/Formats/WebP/SimpleLossyDecoder.cs @@ -0,0 +1,14 @@ +// Copyright (c) Six Labors and contributors. +// Licensed under the Apache License, Version 2.0. + +using System; +using System.IO; + +namespace SixLabors.ImageSharp.Formats.WebP +{ + class SimpleLossyDecoder : WebPDecoderCoreBase + { + public override Image Decode(Stream stream) + => throw new NotImplementedException(); + } +} diff --git a/src/ImageSharp/Formats/WebP/WebPDecoder.cs b/src/ImageSharp/Formats/WebP/WebPDecoder.cs index 2675e8610b..8dd11dff21 100644 --- a/src/ImageSharp/Formats/WebP/WebPDecoder.cs +++ b/src/ImageSharp/Formats/WebP/WebPDecoder.cs @@ -15,6 +15,7 @@ namespace SixLabors.ImageSharp.Formats.WebP public Image Decode(Configuration configuration, Stream stream) where TPixel : struct, IPixel { + // TODO: [brianpopow] parse chunks and decide which decoder (subclass of WebPDecoderCoreBase) to use throw new System.NotImplementedException(); } diff --git a/src/ImageSharp/Formats/WebP/WebPDecoderCoreBase.cs b/src/ImageSharp/Formats/WebP/WebPDecoderCoreBase.cs new file mode 100644 index 0000000000..0a26cc6e5c --- /dev/null +++ b/src/ImageSharp/Formats/WebP/WebPDecoderCoreBase.cs @@ -0,0 +1,18 @@ +// Copyright (c) Six Labors and contributors. +// Licensed under the Apache License, Version 2.0. + +using System.IO; + +using SixLabors.ImageSharp.PixelFormats; + +namespace SixLabors.ImageSharp.Formats.WebP +{ + /// + /// Base class for the WebP image decoders. + /// + public abstract class WebPDecoderCoreBase + { + public abstract Image Decode(Stream stream) + where TPixel : struct, IPixel; + } +}