Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I used Glide to load image, the image is being rotated #154

Closed
cai9311 opened this issue Jun 6, 2019 · 5 comments
Closed

I used Glide to load image, the image is being rotated #154

cai9311 opened this issue Jun 6, 2019 · 5 comments
Labels

Comments

@cai9311
Copy link

cai9311 commented Jun 6, 2019

The link is http://wefootball.oss-cn-shanghai.aliyuncs.com/upload/backend/2019-06-06/94f44a8ff7e245bf9025aa6b4e699a32.jpg
When I used GlideImageLoader,Is is rotated.

@Piasy
Copy link
Owner

Piasy commented Jun 7, 2019

@cai9311 That should be a SSIV issue, please file an issue here with the sample image link.

@Piasy Piasy added the SSIV label Jun 7, 2019
@DennyWeinberg
Copy link

I did that:

            photoView.setImageLoaderCallback(new ImageLoader.Callback() {
                @Override
                public void onCacheHit(int imageType, File image) {
                    photoView.getSSIV().setOrientation(ORIENTATION_USE_EXIF);
                }

                @Override
                public void onCacheMiss(int imageType, File image) {

                }

                @Override
                public void onStart() {

                }

                @Override
                public void onProgress(int progress) {

                }

                @Override
                public void onFinish() {

                }

                @Override
                public void onSuccess(File image) {

                }

                @Override
                public void onFail(Exception error) {

                }
            });

Just for information

@Piasy
Copy link
Owner

Piasy commented Jun 12, 2019

@DennyWeinberg You should move your code into onFinish or onSuccess, although GlideLoader won't fire onCacheMiss, which means onCacheHit could work.

@DennyWeinberg
Copy link

I use a custom Glide Loader so it worked in my case because I call onCacheHit manually...

@hereisderek
Copy link

I don't really understand why not extracting the orientation automatically when first load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants