cannot correctly change a TIFF's interleave


I'm looking for some help about how to change a TIFF's interleave. My code could change a TIFF's nodata value but cannot succeed on the interleave, could anyone give me some advice? I'll appreciate your kindness.

Join to automatically receive all group messages.