Share via


SurfaceLoader.FromStream Method ()

Loads a surface from a stream.

Overload List

public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, int, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, int, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, int, Rectangle, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, int, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, Rectangle, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Rectangle, Stream, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Stream, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Stream, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Stream, int, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Stream, int, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Stream, int, Rectangle, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Stream, int, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, out PaletteEntry, Stream, Rectangle, Filter, int);
public static void FromStream(Surface, out PaletteEntry, Stream, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Rectangle, Stream, int, Rectangle, Filter, int);
public static void FromStream(Surface, Rectangle, Stream, int, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Rectangle, Stream, Rectangle, Filter, int);
public static void FromStream(Surface, Rectangle, Stream, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Stream, Filter, int);
public static void FromStream(Surface, Stream, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Stream, int, Filter, int);
public static void FromStream(Surface, Stream, int, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Stream, int, Rectangle, Filter, int);
public static void FromStream(Surface, Stream, int, Rectangle, Filter, int, ref ImageInformation);
public static void FromStream(Surface, Stream, Rectangle, Filter, int);
public static void FromStream(Surface, Stream, Rectangle, Filter, int, ref ImageInformation);

Remarks

This method handles conversion to and from compressed texture formats and supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. For more information, see ImageFileFormat.

Writing to a surface level other than zero does not cause the dirty rectangle to be updated. If SurfaceLoader.FromStream is called and the surface is not already dirty (which is unlikely under normal usage scenarios), the application must explicitly call Texture.AddDirtyRect on the surface.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

InvalidDataException

The data is invalid.