Save image problem

Hello all,
When I tried to save the image, I encountered an assertion error. The printed statement was’ assignment failed ', and the program was displayed in img. save (‘r1. jpeg’, jpgrect, jpgQuality). Is it because there was a logical problem when I saved the image, but I did not encounter this problem when saving it in flash before? Now, I have encountered this problem after adding an SD card. My previous solution was to save the image from a jpg file to a jpeg file, But now there are always assertion errors when saving the jpeg file, and I am unable to solve them. I hope you can help me solve them,Thanks!

Hi, I cannot debug this unless you provide a script that can duplicate the issue. When you post a problem it’s helpful if you give me a script that’s the minimal possible amount of code that causes the issue. Otherwise, I have no idea.

Please note, we DO NOT recommend using the internal flash for writing files to, just reading. Please use an SD card if you want to save files.