imwrite hack working