Table of Contents

Class HeicContextExtensions

Namespace
Egami.Heic
Assembly
Egami.Heic.dll

Registers Egami.Heic with an EgamiContext.

public static class HeicContextExtensions
Inheritance
HeicContextExtensions
Inherited Members

Examples

// Opt in to HEVC once: register Egami.Heic in a context (at startup, EgamiContext.SetDefault(new EgamiContext().WithHeic())
// makes it the default for every call).
EgamiContext heic = new EgamiContext().WithHeic();
RasterInfo info = Raster.Probe("photo.heic", heic);
bool fromPackage = info.Format == HeicFormat.Info;

Methods

WithHeic(EgamiContext)

Returns a copy of context that reads and writes HEIC with Egami.Heic. Nothing registers it on its own: an app calls this once, for example EgamiContext.SetDefault(new EgamiContext().WithHeic()) at startup, and so opts in to decoding and encoding HEVC.

public static EgamiContext WithHeic(this EgamiContext context)

Parameters

context EgamiContext

The context to add HEIC to.

Returns

EgamiContext

The new context, with core Egami's HEIC entry replaced by Info.

Remarks

HEVC is covered by patents, encoding as well as decoding. Egami's authors grant no patent rights and are not lawyers. Whether you need a patent licence depends on your country and on how you use and distribute this package; commercial products may need one from the HEVC patent pools or holders. The core Egami package contains no HEVC code and does not depend on this package.

Exceptions

ArgumentNullException

context is null.