Honestly, I'm not entirely sure myself. There's some kind of bug in the Java method that DrawingPanel is calling to save JPEG images, regarding whether there are three channels (R,G,B) or four channels (R,G,B, A) where A is for alpha/transparency. Other people have run into this problem too. The DrawingPanel reads JPEG files just fine, but doesn't save/write them correctly.
My recommended (work-around) solution: just output all your artwork as .PNG files (like the assignment specifies.)