Skip to content

Commit

Permalink
Add method to convert sample size to scale
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Oct 13, 2024
1 parent 006b076 commit 70103e5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ object BitmapUtils {
}
}

fun sampleSizeToScale(sampleSize: Int): Float {
return 1f / sampleSize
}

/**
* Decodes a region of a bitmap. If the region is odd, Android may not respect the size.
* @param stream The stream to decode
Expand Down

0 comments on commit 70103e5

Please sign in to comment.