utils for make image and read/write image