New changes of issue and write function for resize image