Blender TGA -> JPEG

What I want to do is get the RGB from a TGA texture loaded in blender, then compress this RGB array to a JPEG. How can I do that? I know I can get access to the pixel of an Image with getPixelI, as well as getting the width / height / depth. The only thing I can’t figure out is how to save an array of RGB as a JPEG let’s say 85% of compression…

Any ideas anyone?


The best way to open TGA in Gimp and save as JPG.