Added generic parameter to fix `ImageRectangleContext`