Class Frame<TPixel>
- Namespace
- Egami
- Assembly
- Egami.dll
One frame of a raster: a pixel plane the size of the raster plus per-frame metadata.
public sealed class Frame<TPixel> where TPixel : unmanaged, IPixelType<TPixel>
Type Parameters
TPixelThe pixel type.
- Inheritance
-
Frame<TPixel>
- Inherited Members
Examples
using Raster<Rgba8> clip = Raster.Load<Rgba8>("pan.gif");
FrameList<Rgba8> frames = clip.Frames;
// Play the clip forward and then backward: append the middle frames in reverse.
for (int i = frames.Count - 2; i > 0; i--)
{
Frame<Rgba8> copy = frames.Add(frames[i]);
copy.Metadata.Delay = TimeSpan.FromMilliseconds(80);
copy.Metadata.Disposal = FrameDisposal.None;
copy.Metadata.Blend = FrameBlend.Source;
}
frames.RemoveAt(0);
clip.Save("pan-bounce.gif");
Properties
Metadata
Gets the frame's metadata.
public FrameMetadata Metadata { get; }
Property Value
Plane
Gets the frame's pixels.
public PixelPlane<TPixel> Plane { get; }
Property Value
- PixelPlane<TPixel>
Methods
Row(int)
Returns one row of pixels. See Row(int).
public Span<TPixel> Row(int y)
Parameters
yintThe row index.
Returns
- Span<TPixel>
The row.