View Source Exray.Textures.Image.Loading (Exray v0.6.0)
Handles the loading, conversion and export of Image types
Summary
Functions
Export image data to file, returns true on success
Export image as code file defining an array of bytes, returns true on success
Export image to memory buffer
Check if an image is ready
Load image sequence from file (frames appended to image.data)
Load image from memory buffer, fileType refers to extension: i.e. '.png'
Load image from screen buffer and (screenshot)
Load image from GPU texture data
Load image from RAW file data
Load image from SVG file data or string with specified size
Unload image from CPU memory (RAM)
Functions
@spec export_image(image :: Exray.Structs.Image.t(), file_name :: binary()) :: exported :: boolean()
Export image data to file, returns true on success
@spec export_image_as_code(image :: Exray.Structs.Image.t(), file_name :: binary()) :: exported :: boolean()
Export image as code file defining an array of bytes, returns true on success
@spec export_image_to_memory( image :: Exray.Structs.Image.t(), file_type :: binary(), file_size :: [integer()] ) :: buffer :: binary()
Export image to memory buffer
@spec image_is_ready?(image :: Exray.Structs.Image.t()) :: image_is_ready :: boolean()
Check if an image is ready
@spec load_image_anim(file_name :: binary(), frames :: [integer()]) :: image :: Exray.Structs.Image.t()
Load image sequence from file (frames appended to image.data)
@spec load_image_from_memory( file_type :: binary(), file_data :: binary(), data_size :: integer() ) :: image :: Exray.Structs.Image.t()
Load image from memory buffer, fileType refers to extension: i.e. '.png'
@spec load_image_from_screen() :: image :: Exray.Structs.Image.t()
Load image from screen buffer and (screenshot)
@spec load_image_from_texture(texture :: Exray.Structs.Texture.t()) :: image :: Exray.Structs.Image.t()
Load image from GPU texture data
@spec load_image_raw( file_name :: binary(), width :: integer(), height :: integer(), format :: integer(), header_size :: integer() ) :: image :: Exray.Structs.Image.t()
Load image from RAW file data
@spec load_image_svg( file_name_or_string :: binary(), width :: integer(), height :: integer() ) :: image :: Exray.Structs.Image.t()
Load image from SVG file data or string with specified size
@spec unload_image(image :: Exray.Structs.Image.t()) :: :ok
Unload image from CPU memory (RAM)