made image factory serializable