image_processing icon indicating copy to clipboard operation
image_processing copied to clipboard

rotate leaves a black line on edge of image

Open etherbob opened this issue 3 years ago • 2 comments

Seeing black lines on the edge of non-square images when rotating them.

Seeing this when rotating by multiples of 90 degrees using Image-processing via ActiveStorage::Variant against homebrew-installed vips: stable 8.12.2 (bottled)

Haven't dug too deeply but apparently this was an unavoidable issue in earlier versions of vips and the nodejs wrapper sharp. Trying to figure out now if I just need to pass some extra options, but also wondered if it would make sense to change how ImageProcessing::Vips called rotate to avoid this.

etherbob avatar Jun 17 '22 19:06 etherbob

Per https://github.com/libvips/ruby-vips/issues/338 it looks like I should've been using rot90 and friends for this purpose. I asked there, but also wonder if image processing might be the right place to short-circuit rotate to the appropriate rot* command when degrees are 90, 180, 270, -90, -180, -270?

etherbob avatar Jun 20 '22 18:06 etherbob

@janko not trying to rush, but any chance you'd be able to look at my PR that attempts to resolve this issue?

etherbob avatar Feb 22 '24 16:02 etherbob