Module ui.renderimage

Image rendering module.

Functions

RenderImage:renderImageFile (filename[, want_frames=false], width, height) Renders image file as a BlitBuffer with the best renderer
RenderImage:renderImageData (string, size[, want_frames=false], width, height) Renders image data as a BlitBuffer with the best renderer
RenderImage:renderImageDataWithMupdf (string, size, width, height) Renders image data as a BlitBuffer with MuPDF
RenderImage:renderGifImageDataWithGifLib (string, size[, want_frames=false], width, height) Renders image data as a BlitBuffer with GifLib
RenderImage:scaleBlitBuffer (BlitBuffer, width, height[, free_orig_bb=true]) Rescales a BlitBuffer to the requested size if needed


Functions

RenderImage:renderImageFile (filename[, want_frames=false], width, height)
Renders image file as a BlitBuffer with the best renderer

Parameters:

  • filename string image file path
  • want_frames bool whether to return a list of animated GIF frames (default false)
  • width int requested width
  • height int requested height

Returns:

    BlitBuffer or list of frames (each a function returning a Blitbuffer)
RenderImage:renderImageData (string, size[, want_frames=false], width, height)
Renders image data as a BlitBuffer with the best renderer

Parameters:

  • string data or userdata (pointer) with image bytes
  • size int size of data
  • want_frames bool whether to return a list of animated GIF frames (default false)
  • width int requested width
  • height int requested height

Returns:

    BlitBuffer or list of frames (each a function returning a Blitbuffer)
RenderImage:renderImageDataWithMupdf (string, size, width, height)
Renders image data as a BlitBuffer with MuPDF

Parameters:

  • string data or userdata (pointer) with image bytes
  • size int size of data
  • width int requested width
  • height int requested height

Returns:

    BlitBuffer
RenderImage:renderGifImageDataWithGifLib (string, size[, want_frames=false], width, height)
Renders image data as a BlitBuffer with GifLib

Parameters:

  • string data or userdata (pointer) with image bytes
  • size int size of data
  • want_frames bool whether to also return a list with animated GIF frames (default false)
  • width int requested width
  • height int requested height

Returns:

    BlitBuffer or list of frames (each a function returning a Blitbuffer)
RenderImage:scaleBlitBuffer (BlitBuffer, width, height[, free_orig_bb=true])
Rescales a BlitBuffer to the requested size if needed

Parameters:

  • BlitBuffer bb
  • width int
  • height int
  • free_orig_bb bool free() original bb if scaled (default true)

Returns:

    BlitBuffer
generated by LDoc 1.4.6 Last updated 2019-09-14 22:30:13