<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_dict(self):
 """Convert Image into raw dictionary data."""

        if not self.url:
            return None
        return {
            'url': self.url,
            'width': self.width,
            'height': self.height
        }