Search code examples
imagelualove2dmoonscript

Can I save an ImageData or Image into a new file with löve2d in lua?


I need to know if it's possible to save an "ImageData" (or something like that) into a new file in Lua with Löve2D, and how ? If I can't, how can I do that ?

thank you in advance !


Solution

  • Love2D ImagaData objects can be encoded via the "Encode" function, in Love 0.10.0

    img:encode(type, filename)
    

    in 0.8.0 and later, Type was not required.