Saving Texture2D image to file

I have search the forum on this topic but could not find the particular solution. I’m using the code by nikolayplekhanov, this class save the current frame into a Texture2D object. Now I want to save this texture2d object in either jpeg, gif format. Is there any library or simple method to achieved this ?

God Bless

Eng Huat

this is similiar to this : com.jme3.texture.Image to java.awt.Image

I dont know if it will give you any insight.

If you find the solution, you can tell us in case someone has same question in the future.