(&mut self)
| 695 | type Item = u8; |
| 696 | |
| 697 | fn next(&mut self) -> Option<u8> { |
| 698 | |
| 699 | if self.x >= self.image.width() { |
| 700 | self.x = 0; |
| 701 | self.y += 1; |
| 702 | } |
| 703 | |
| 704 | if self.y >= self.image.height() { |
| 705 | return None; |
| 706 | } |
| 707 | |
| 708 | self.x += 1; |
| 709 | Some(self.image.pixel(self.x - 1, self.y).unwrap().val) |
| 710 | } |
| 711 | } |
| 712 | |
| 713 |