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
open fun displayThumbNail(bitmap: Bitmap?) {
var runnable = Runnable {
var thumbImg: Bitmap?
if (bitmap == null)
thumbImg = BitmapUtils.getBitmapFromAsests(activity, MainActivity.pictureName, 100, 100)
else
thumbImg = Bitmap.createScaledBitmap(bitmap, 100, 100, false)
if (thumbImg == null)
return@Runnable
ThumbnailsManager.clearThumbs()
thumbnailList?.clear()
val thumbnailItem = ThumbnailItem()
thumbnailItem.image = thumbImg
thumbnailItem.filterName = "Normal"
ThumbnailsManager.addThumb(thumbnailItem)
var filters = FilterPack.getFilterPack(activity!!) as MutableList
for (f in filters) {
val item = ThumbnailItem()
item.image = thumbImg
item.filter = f
item.filterName = f.name
ThumbnailsManager.addThumb(item)
Log.d("filterpack", f.name)
}
thumbnailList!!.addAll(ThumbnailsManager.processThumbs(activity))
activity!!.runOnUiThread {
thumbnailAdapter.notifyDataSetChanged()
}
}
It throws this exeption kotlin.KotlinNullPointerException
at com.example.sg772.textonimage.ImageFiltersFragment$displayThumbNail$runnable$1.run(ImageFiltersFragment.kt:110)
line 110: var filters = FilterPack.getFilterPack(activity!!) as MutableList P.S
When i dont open image from gallery and work with default image , everythings works fine
The text was updated successfully, but these errors were encountered:
When i open image from gallery:
and try to display this image in thumbnail
It throws this exeption
kotlin.KotlinNullPointerException
at com.example.sg772.textonimage.ImageFiltersFragment$displayThumbNail$runnable$1.run(ImageFiltersFragment.kt:110)
line 110:
var filters = FilterPack.getFilterPack(activity!!) as MutableList
P.S
When i dont open image from gallery and work with default image , everythings works fine
The text was updated successfully, but these errors were encountered: