Make ImageData class implement Serializable