No EncodeToJPG?

Hey, I can’t seem to find any way that will let me take a screenshot and save it as .jpg…
Is this really true??
Does no one have a solution for this?

I’m using the webplayer and uploading to the server using a .php script. On completion I so far make a call to the html-file that opens up a window containing the screenshot.
It works but it takes forever!! (Let’s say 10-15 seconds).
I figured the reason might simply be that the .png files made are 1 MB big…

If you can get the colors out of the screenshot you could take a look at this: Bitmap Class (System.Drawing) | Microsoft Learn

Don’t know what the speed holdback is though, but you may want to try using some of those image formats available in System.Drawing

http://technology.blurst.com/unity-jpg-encoding-javascript/

Thats awesome.

System.Drawing isn’t available in Unity.

–Eric

Did not know that, time to look at the list of namespaces again.

Wish i could look at this without being owned by my browser

Should be faster if you load the local version; takes about 3-4 seconds here with Safari.

–Eric

Wohooo! Great, thanks :slight_smile:
Was hoping there was something like that around…

What happend to: http://docs.unity3d.com/ScriptReference/Texture2D.EncodeToJPG.html?

Exactly what I wanted to suggest.

Why not simply use a rendertexture populated with the current camera render, write that to a texture2d and encode it to jpg or png? Thats all given stuff…

That was just added in Unity 4.5. The topic you’re replying to is from 2011. So…

Not everyone has Pro.

–Eric