Cauldron3D.Formats.Bmp (Cauldron3D.Formats v0.3.3)

Copy Markdown View Source

Windows bitmap pictures, uncompressed 8-bit (with their palette) or 24- and 32-bit, read into Cauldron3D.Textures: an 8-bit picture as an indexed texture with its own palette, the others as RGBA.

{:ok, texture} = Cauldron3D.Formats.Bmp.parse(File.read!("gfx/env/desertup.bmp"))

Summary

Functions

The picture in data.

Functions

parse(data)

@spec parse(binary()) :: {:ok, Cauldron3D.Texture.t()} | {:error, :not_a_bmp}

The picture in data.