open FH, ">o.png"; binmode FH; print FH $i->png