Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
Available since: Gideros 2016.1


  • Get/save files from file system (desktop only)
  • Get image from Camera, gallery or file system (mobile and desktop)
  • Resize image
  • Make copy of an image
  • Take screenshots
  • Play videos (for cutscenes)
  • Manipulate pictures (getting/setting pixels, flood fill)
  • And much more...
require "media"


This plugin is not available for windows 32 bits

By resizing image you will actually resize the file of the image, so there is no going back to upscale it later.

getPicture method gives you copies of the image, so you won't harm the original.

The dimensions when resizing are all actual dimensions of the image and not logical dimensions in your project.


Saves a picture on your phone or on your pc.

require "media"
-- draw your gfx
local source =, 1, 128, 128)
-- create a render target and draw to it
local rt =, source:getHeight())
-- save your render target to gideros documents folder
local myfilepath = "|D|mysavedpicture2.png"
-- create a new media and save your gfx
local media =
-- android saved path = internal storage/pictures !!! NEED permission write external storage !!!
-- show your gfx on stage
local mybmprt =
mybmprt:setPosition(64, 64)


mediamanager:deleteFile deletes file at provided path
mediamanager:getFile selects file from file system
mediamanager:getPicture selects picture from gallery
mediamanager:isCameraAvailable returns true if you can get picture from camera
mediamanager:playVideo plays video file in given path (bool force to watch till the end, or quit playing on tap)
mediamanager:postPicture adds picture from given path to gallery (or opens save file dialog on pc)
mediamanager:saveFile saves file to file system
mediamanager:takePicture allows user to provide picture input from camera
mediamanager:takeScreenshot captures a screenshot of the app creates a new Media object with provided image creates a blank Media object with provided dimensions

Media:copy(destination) makes a copy of an image
Media:crop(x, y, width, height) crops an image
Media:drawFill(x, y, width, height, hexColor, alpha, blendAlpha) draws a filled rectangle on current image
Media:drawImage(x, y, media, alpha) draws another image on current one
Media:drawLine(x0, y0, x1, y1, hexColor, alpha, blendAlpha) draws a line on current image
Media:drawText(x, y, text, hexColor, fontSize, alpha) draws a text on current image
Media:flipHorizontal() flips image horizontally
Media:flipVertical() flips image vertically
Media:floodFill(x, y, hexColor, alpha, tolerance, blendAlpha) flood fills current image
Media:getHeight() returns the height of the image
Media:getPath() returns the path that was used to create the media
Media:getPixel(x, y) returns r, g, b, a values of pixel at x,y coordinate
Media:getRotation() returns current rotation
Media:getWidth() returns the width of the image
Media:resize(newWidth, newHeight, fixed, crop) resizes image width and height
Media:resizeHeight(newHeight, fixed) resizes image height
Media:resizeWidth(newWidth, fixed) resizes image width
Media:save() saves the changes made to file
Media:setPixel(x, y, r, g, b, a) sets r, g, b, a values to pixel at x,y coordinate
Media:setPixel(x, y, hex, a, blendAlpha) sets hex color and alpha values to pixel at x,y coordinate
Media:setRotation(angle) rotates image
Media:trim(hexColor) trims current image


Event.MEDIA_RECEIVE (e.path) path to image
Event.MEDIA_CANCEL user cancelled media input
Event.VIDEO_COMPLETE user completed watching video