local media = Media.new(e.path)
local path = ""
media:crop(x, y, width, height)
media:copy("|D|stem_before.png")
media:save()
media:copy("|D|stem_after.png")
path = media:getPath()
The path never changes. 'e.path' is the same as 'path' if I do media:getWidth() at any point, it's the old width, uncropped.