After a trim() call is made, crop() results in incorrect sized images when using left or top coordinates close to the corner.
Create a blank image, put some text on it, then cut it up in to quarters - correct functionality.
Create a blank image, put some text on it, trim it, then cut it up in to quarters - incorrect functionality.
adding a rotate(360) after the trim() seems to reset whatever needs to be reset
Correct. Because Image.rotate() method has a reset_coords=True kwarg. It may be possible to add such an argument to Image.trim(), but that would default to False, as (in my opinion) this method is used often by GIF animators, and resetting coordinates would be destructive.
Great thanks. I messed around with reset_coords a bit, but only on the crop - it clearly needed to happen beforehand. Would be a useful addition to the trim statement, or even a note in the doc saying it's a necessary second step. I'll look at the code and see if i can raise create a pull request.