Willow icon indicating copy to clipboard operation
Willow copied to clipboard

Generic operations

Open kaedroho opened this issue 5 years ago • 0 comments

This PR implements a new feature called "generic operations". This allows third party apps to register operations that only interact with other operations and not the image directly, which means the operation could be called using any image class that supports those operations it depends on.

The first generic operation is get_pixel_count which calls get_size and get_frame_count and multiplies the results together. This operation gets automatically added on to the Pillow, Wand and OpenCV image classes as they all support the get_size and get_frame_count operations.

This will be really nice once we have the Affine Transformations API as this would allow us to implement the higher-level operations (eg, rotate, scale, etc) for all backends that support that API generically.

kaedroho avatar Apr 12 '19 11:04 kaedroho