img2 = img; // I tried with clone() to
img2.draw(0,0); // draws ok
img2.saveImage("someOtherName.jpg"); //doesn't save
“img2” can draw image that I made copy from “img” , but I can’t use “img2” to save it.
Program is far more complicated, but problem turns out that simple. I checked several times everything and tried serveral things. I used setPixels(), update() etc. I can only draw, but no save.
if you do it in update() or draw(), you might have a problem – because when the app closes, it might be in the middle of saving the results. then when you try to open the results, it will be corrupted.