How to free transform / shear image in pygame?

  image-processing, pygame, pygame-surface, python

The title basically describes my question. I seemingly can’t find a way to easily and efficiently transform Surfaces in pygame. I’ve tried converting the Surface to a numpy array and apply the operation on it, the converting it back to Surface. However, this method seems to be very slow.

Source: Python Questions