Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Restore ImageInfo.orientation ThreadLocal that was removed by mistake (
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz-invideo committed Mar 7, 2022
1 parent dded653 commit 269467e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.soywiz.korim.atlas.MutableAtlasUnit
import com.soywiz.korim.bitmap.*
import com.soywiz.korio.file.VfsFile
import com.soywiz.korma.geom.ISizeInt
import kotlin.native.concurrent.*

data class ImageOrientation(
val rotation: Rotation = Rotation.R0,
Expand Down Expand Up @@ -60,6 +61,7 @@ suspend fun VfsFile.readBitmapSliceWithOrientation(premultiplied: Boolean = true
}
}

@ThreadLocal
var ImageInfo.orientation: ImageOrientation? by Extra.Property { null }
val ImageInfo?.orientationSure: ImageOrientation get() = this?.orientation ?: ImageOrientation.ORIGINAL

0 comments on commit 269467e

Please sign in to comment.