| 146 | ) |
| 147 | |
| 148 | def center_image(self, input_image): |
| 149 | # Center the image |
| 150 | height_start = int( ( self.max_height - input_image.size[1] ) / 2 ) |
| 151 | height_end = int( height_start + input_image.size[1] ) |
| 152 | width_start = int( ( self.max_width - input_image.size[0] ) / 2 ) |
| 153 | width_end = int( width_start + input_image.size[0] ) |
| 154 | return height_start, height_end, width_start, width_end |
| 155 | |
| 156 | def prepare_view(self, input_image, height_start, height_end, width_start, width_end): |
| 157 | # Iterate over all of the pixels |