Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BALUSANGEM/483eb7ffed206eb9bea45fcc3d80ed9f to your computer and use it in GitHub Desktop.
Save BALUSANGEM/483eb7ffed206eb9bea45fcc3d80ed9f to your computer and use it in GitHub Desktop.
val listener = ImageDecoder.OnHeaderDecodedListener { decoder, imageinfo, source ->
decoder.setTargetSize(100, 100)
//you can use setTargetSampleSize(2) to create a image with half of original height and width
}
val drawable = ImageDecoder.decodeDrawable(source, listener);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment