Autocrop not working properly when on small images
QazCetelic opened this issue · 2 comments
QazCetelic commented
I was trying to learn how this library worked and noticed that the autocrop feature only removes half of the padding.
val resources = File("${System.getProperty("user.dir")}/src/main/resources")
val pngFile = resources.resolve("image.png")
val newPngFile = resources.resolve("new_image.png")
newPngFile.delete()
val pngImage: ImmutableImage = ImmutableImage.loader().fromFile(pngFile).autocrop()
pngImage.output(PngWriter.NoCompression, newPngFile)
QazCetelic commented
It does work when specifying colors. .autocrop(Color.BLACK)
sksamuel commented
Thanks for the bug report. Fixed in 4.0.23 !