check image writability