android-image-preview icon indicating copy to clipboard operation
android-image-preview copied to clipboard

Rotate improvement

Open 73k05 opened this issue 5 years ago • 3 comments

Hi @wangsun6 ,

in the preview when you take portrait pictures, these are rotated the wrong way. Could you implement the rotation? Do you need help?

Screenshot_1601568952

As you can see the thumbnail looks good but not the preview itself.

Cheers 73k05

73k05 avatar Oct 01 '20 16:10 73k05

For what I could see the library uses Gilde for the thumbnail but not for the main image. I fixed it for now by also using glide on the main image in ImageFragmentViewer around line 67.

I replaced view_pager_iv.setImage(ImageSource.uri(mUri)) with

Glide.with(this) .asBitmap() .load(mUri) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(object :CustomTarget<Bitmap>() { override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) { view_pager_iv.setImage(ImageSource.bitmap(resource)) } override fun onLoadCleared(placeholder: Drawable?) {}})

Now I can also load remote images into the component.

eemi2010 avatar Oct 27 '20 16:10 eemi2010

Hi @eemi2010 that seems nice, can you make a PR please? @wangsun6 would you be able to merge as long as it is well implemented?

73k05 avatar May 31 '21 09:05 73k05

@wangsun6 did you abandon the project? Do you want to give me the rights to modify it? Cheers

73k05 avatar Aug 26 '21 06:08 73k05