Source

psd-tools / src / psd_tools / user_api / psd_image.py

Diff from to

File src/psd_tools/user_api/psd_image.py

         """ Returns a PIL image for this layer. """
         return self._psd._layer_as_PIL(self._index)
 
+    def as_pymaging(self):
+        """ Returns a pymaging.Image for this PSD file. """
+        return self._psd._layer_as_pymaging(self._index)
+
     @property
     def bbox(self):
         """ BBox(x1, y1, x2, y2) namedtuple with layer bounding box. """
 
     def as_pymaging(self):
         """
-        Retirns a pymaging.Image for this PSD file.
+        Returns a pymaging.Image for this PSD file.
         """
         return pymaging_support.extract_composite_image(self.decoded_data)
 
     def _layer_as_PIL(self, index):
         return layer_to_PIL(self.decoded_data, index)
 
+    def _layer_as_pymaging(self, index):
+        return pymaging_support.extract_layer_image(self.decoded_data, index)
+
 
 def _combined_bbox(layers):
     """