Table of Contents

Available since version: Gideros 2016.08


Create a texture from pixel data.

Syntax:, width, height [, filtering, options])


  • pixels: (string) A string containing actual R,G,B,A compoents of each pixel in the new texture. Each component is stored as a byte. You can pass nil if you don't need to initialize texture content
  • width: (number) width of the texture to create
  • height: (number) Height of the texture to create
  • filtering: (boolean, default to false) indicate that the texture should be filtered
  • options: (table, optional) A table that specifies optional paramaters. Currently, "transparentColor", "wrap", "format" and "extend" fields are supported.


local texture =,300,400;, false, {extend=false})	-- Create a 300x400 empty texture. Prevent gideros from extending the texture to the next power of two size