Load as a texture a png created with Application.CaptureScreenshot();

Hi,

I want to create a photo album for my architecture visualizer. I’ve done the GUIs and the album photo

Everything is scripted.

But I’ve got a problem, I can’t load my pictures which are just created from the Application.CaptureScreenshot();

Is there a way to import new pictures ? (it’s for standalone, not web).

If someone knows… please help

Cheers,

BooBi

http://forum.unity3d.com/threads/50908-solved-Load-PNGs-at-runtime-to-texture-GUI-buttons

cheers for the help

hum I’ve got a problem with the

FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);

It’s maybe a vocabulary problem (I speak french as a mother tong) Should I replace Filestream with something like my file path? because I can’t see anything in the API about FileStream; FileMode, etc…

Thank’s a lot for your help mate !

BooBi

In fact I need to load the file locally like if it’s on a computer without internet, ( I’ve tried different things, without any working solution).

So the screenshots will be in the exe folder and I won’t know the path because it won’t be launched on my computer but on my client’s one.

FileStream is normal c# class and can be used if you add line “using System.IO;” at the beginning of the file…

To get proper path for the file, use:

In editor, this will print the right path to the project folder:

string assetpath = Application.dataPath;
string path = assetpath.Substring(0, assetpath.Length - 6);

Debug.Log("File path:" + path);

Done !

Thank’s a lot!

BooBi