Skip to content

Commit

Permalink
fix: destroy magick image after crop
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd committed Jul 3, 2023
1 parent 1f4fc5b commit 8f7a054
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/image/renderer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ local render = function(image, state)
cropped_image:crop(pixel_width, pixel_height, 0, crop_offset_top)
local tmp_path = state.tmp_dir .. "/" .. utils.random.id() .. ".png"
cropped_image:write(tmp_path)
cropped_image:destroy()
image.path = tmp_path
image.is_cropped = true
end
Expand Down

0 comments on commit 8f7a054

Please sign in to comment.