writeImageattrs