Enable writeback upon image rotation; add param numbers for the sql query.