Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How to convert a UIImage or a in memory PNG representation to a usable Gideros Texture — Gideros Forum

How to convert a UIImage or a in memory PNG representation to a usable Gideros Texture

OZAppsOZApps Guru
edited November 2013 in Plugins
@ar2rsawseen, there's been no response from @atilim which is a good thing as he can focus on the core engine amongst other things. So, whoever from the both of you can answer this, it would be helpful.

How can we use the image returned by UIImage or the memory pointer holding the png representation. There is another via method of saving the UIImage to disk and then loading it up as a sprite using Bitmap or Texture. Is there a shorter way?

Dislikes: bali001

twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
+1 -1 (+0 / -1 )Share on Facebook

Comments

  • Unfortunately no way to create image from UIImage directly, so the only thing seems to be saving it as file and creating the Texture from it in lua.

    For that purpose, you may use Temporary directory, as saving file in |T|file.png and then reading it.

    To get the actual path of Temporary directory inside plugin, you may use g_pathForFile(const char* path); function
Sign In or Register to comment.