panpf/zoomimage

使用Glide Rotate transform 旋转图片,双支缩放图像显示异常

Closed this issue · 6 comments

Describe the bug

修改了Demo 中GlideZoomImageViewFragment loadImage方法
image

然后放大图片,图片旋转角度变化了

Affected platforms

Select of the platforms below:

  • Android

Affected components

  • GlideZoomImageView

Versions
io.github.panpf.zoomimage:zoomimage-view-glide:1.0.2"

  • zoomimage version*:
  • Kotlin version*:
  • Compose version(s)* (Jetpack/Multiplatform):
  • JDK version(Only Desktop):

Running Devices

  • MacBookPro 14 2021; macOS 13.4.1; arm64
  • Google pixel4; arm64

Sample code

If possible, provide a small piece of code that reproduces the problem. If the code snippet is too
large to paste here, please link to a Gist, a GitHub repo, or any other public code repository.

Reproduction steps

Please provide a detailed step-by-step guide on how to reproduce the issue you are experiencing.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

screen-20240724-153554.1.mp4

Additional context

Add any other context about the problem here.

为什么要在加载缩略图时旋转?

为什么要旋转?

旋转图片的需求不是很正常吗,我们这边有个需求是根据后端返回的rotation字段来加载旋转图片。本来是想用ZoomableEngine来旋转的,但是就会存在从正常角度闪一下然后才旋转的情况

按你的逻辑如果你在加载缩略图时还给缩略图增加了圆角,那 ZoomImage 在子采样时总不能也要跟着适配圆角吧。所以这根本就不是 ZoomImage 应该考虑的

按你的逻辑如果你在加载缩略图时还给缩略图增加了圆角,那 ZoomImage 在子采样时总不能也要跟着适配圆角吧。所以这根本就不是 ZoomImage 应该考虑的

大佬,我不是太理解,难道用ZoomImage就不能用Glide的来做transform了吗?

当然可以,只是你做了 transform 之后产生的任何差异或问题你都得自己解决了,不在 ZoomImage 的范畴了。
因为 transform 是自可以定义的,是无法预期的,ZoomImage 也不知道你做了什么 transform,更没法去适配

当然可以,只是你做了 transform 之后产生的任何差异或问题你都得自己解决了,不在 ZoomImage 的范畴了。 因为 transform 是自可以定义的,是无法预期的,ZoomImage 也不知道你做了什么 transform,更没法去适配

ok,辛苦大佬解惑~另外我还提了一个加载图片闪退的问题,辛苦大佬也看一下。感谢感谢。#32