Gorgon
Show / Hide Table of Contents

Class GorgonCodecJpeg

A codec to handle read/writing of JPEG files.

Inheritance
object
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>
GorgonCodecJpeg
Implements
IGorgonImageCodec
IGorgonNamedObject
Inherited Members
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.Codec
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.CodecDescription
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportsBlockCompression
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportsMipMaps
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportsDepth
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportedPixelFormats
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.Save(IGorgonImage, Stream)
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.GetMetaData(Stream)
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.GetMetaData(Stream, IGorgonWicDecodingOptions)
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.GetFrameOffsets(string)
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.GetFrameOffsets(Stream)
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.IsReadable(Stream)
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportsMultipleFrames
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.CanEncode
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.CanDecode
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.CodecCommonExtensions
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.FromStream(Stream, long?)
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.FromFile(string)
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.Save(IGorgonImage, string)
GorgonImageCodec<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.ToString()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: Gorgon.Graphics.Imaging.Codecs
Assembly: Gorgon.Graphics.Imaging.dll
Syntax
public sealed class GorgonCodecJpeg : GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>, IGorgonImageCodec, IGorgonNamedObject
Remarks

This codec will read and write lossy compression files using the Joint Photographics Experts Group (JPEG) format.

This codec supports the following pixel formats:

  • B8G8R8X8_UNorm
  • B8G8R8A8_UNorm (Alpha channel is ignored)
  • R8G8B8A8_UNorm (Alpha channel is ignored)

important

This codec requires the Windows Imaging Components (WIC) to be installed for the operating system.

Constructors

| Edit this page View Source

GorgonCodecJpeg(GorgonJpegEncodingOptions)

Initializes a new instance of the GorgonCodecJpeg class.

Declaration
public GorgonCodecJpeg(GorgonJpegEncodingOptions encodingOptions = null)
Parameters
Type Name Description
GorgonJpegEncodingOptions encodingOptions

[Optional] Options to use when encoding a JPEG image.

Properties

| Edit this page View Source

ImageQuality

Property to set or return the quality of an image compressed with lossy compression.

Declaration
public float ImageQuality { get; set; }
Property Value
Type Description
float
Remarks

Use this property to control the fidelity of an image compressed with lossy compression. 0.0f will give the lowest quality and 1.0f will give the highest.

| Edit this page View Source

SupportedPixelFormats

Property to return the supported pixel formats for this codec.

Declaration
public override IReadOnlyList<BufferFormat> SupportedPixelFormats { get; }
Property Value
Type Description
IReadOnlyList<BufferFormat>
Overrides
GorgonCodecWic<GorgonJpegEncodingOptions, IGorgonWicDecodingOptions>.SupportedPixelFormats

Implements

IGorgonImageCodec
IGorgonNamedObject

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author