You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
There is a problem with BMP decoding. The padding is calculated as 4 - (bytesPerRow % 4). Which means when the width is exactly divisible by 4, you have a padding of 4. This messes up the image considerably.
The check should probably be:if (padding != 4) { instead of if (padding != 0){
There is a problem with BMP decoding. The padding is calculated as
4 - (bytesPerRow % 4)
. Which means when the width is exactly divisible by 4, you have a padding of 4. This messes up the image considerably.The check should probably be:
if (padding != 4) {
instead ofif (padding != 0){
https://github.com/korlibs/korim/blob/d05eff45d0cb156336cf8dd9557731a3ec9243cb/korim/src/commonMain/kotlin/com/soywiz/korim/format/BMP.kt#L59
https://github.com/korlibs/korim/blob/d05eff45d0cb156336cf8dd9557731a3ec9243cb/korim/src/commonMain/kotlin/com/soywiz/korim/format/BMP.kt#L65
The text was updated successfully, but these errors were encountered: