Code snippet how to perform 2 image transformations consequently

How to perform 2 transformations consequentially (rotate 90 degrees->resize), encode raw buffer to jpeg file in memory/decode jpeg file from memory. Privilege http://tizen.org/privilege/mediastorage should be added in manifest.