(self, dim: NodeDim)
| 97 | |
| 98 | impl WrappedWand { |
| 99 | pub fn wand_to_sixel(self, dim: NodeDim) -> Vec<u8> { |
| 100 | self.0.fit(100000, dim.height); |
| 101 | |
| 102 | if let Some(crop) = dim.crop { |
| 103 | self.0.crop_image(self.0.get_image_width(), crop.0, 0, crop.1 as isize).unwrap(); |
| 104 | } |
| 105 | |
| 106 | self.0.write_image_blob("sixel").unwrap() |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | unsafe impl Send for WrappedWand {} |