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

2.8.8版本 添加贴纸水印Bug #289

Closed
valianliu opened this issue Jul 26, 2023 · 8 comments
Closed

2.8.8版本 添加贴纸水印Bug #289

valianliu opened this issue Jul 26, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@valianliu
Copy link

如标题。添加贴纸水印,平铺格式选择单个,预览正常。但生成的图片就是按照重复的排列添加的水印
版本2.8.8
系统MIUI14
设置页面截图:
Screenshot_2023-07-26-23-04-12-494_me rosuh easywatermark
生成的图片:
ewm_1690383676271
初步判断是bug,期待修复😂
感谢开发

@rosuH rosuH added the bug Something isn't working label Jul 26, 2023
@rosuH
Copy link
Owner

rosuH commented Jul 26, 2023

有什么复现路径吗

@valianliu
Copy link
Author

我的操作流程如下:
开软件选图,
选贴纸,图片用的是存好在手机里的透明的PNG图,
样式,平铺格式,选单个,简单调整位置和大小,看预览图如截图1,然后输出格式JPG,质量 100,导出来的完成图就是平铺效果不是单个的。如果有必要我可以试着录屏传到个网盘?

@rosuH
Copy link
Owner

rosuH commented Jul 26, 2023

谢谢,有录屏的话会更好:D

@valianliu
Copy link
Author

valianliu commented Jul 26, 2023

又试了几次,大概定位到问题了!
是出现在选择多个文件的情况下,第一张调整成了单个贴纸,但其他的多选文件并没有联动,导致后边的其他文件都是默认的 重复。
我想这里边可能涉及到一个逻辑,如果用户多选了文件,基本是想偷懒套用一样的水印样式吧,单张的设置应该套用给其他多选上的图😂
还辛苦看下这个逻辑是否可以优化一下,匹配多选图片想套用样式的用户想法

@valianliu valianliu reopened this Jul 26, 2023
@rosuH
Copy link
Owner

rosuH commented Jul 27, 2023

谢谢!这样的设计是故意的(
主要考虑到用户可能混合设置,所以没有同步整个列表的模式。🌚

@rosuH rosuH added enhancement New feature or request and removed bug Something isn't working labels Jul 27, 2023
@valianliu
Copy link
Author

谢谢!这样的设计是故意的(
主要考虑到用户可能混合设置,所以没有同步整个列表的模式。🌚

我设想的逻辑可能略有不同:
选多张照片的用户应该大多数是想一起设置水印,即同一个规格和样式的水印套用到多选的这一组多张图片上,单张样式用户操作优先会用单独选图进行编辑把?
多选的情况下,想单独为每张设置不同的水印,按照正常思维逻辑,这种目的应该是少数。
所以是否这个多选后,默认为多张套用同一个水印样式,单张有具体需求可以单独去调整,这样的设定是否更优,更符合用户思考路径和使用逻辑呢。
目前多选后,还不能默认套用同一个水印设置,逻辑上多少有点奇怪😆
这大概是我的思考,仅供参考,谢谢。

@valianliu
Copy link
Author

另外我发现多选图片的编辑状态下,布局里,水印位置的设置,默认是套用给所有多选的图,至少为了逻辑上的一致性,样式里的设定是不是也应该保持一致😆

rosuH added a commit that referenced this issue Jul 29, 2023
…gment.kt, WaterMark.kt, WaterMarkImageView.kt, and WaterMarkRepository.kt (#289)

- Removed imports for android.graphics.Shader and android.os.Build from ImageInfo.kt and WaterMark.kt respectively.
- Removed the obtainTileMode() function from ImageInfo.kt and added it to IntExtension.kt as an extension function named toTileMode().
- Renamed the parameter "imageInfo" in the updateTileMode() function of MainViewModel.kt to "tmpConfig".
- Renamed the parameter "imageInfo" in the updateTileMode() function of WaterMarkRepository.kt to "mode".
- Removed unnecessary null check in TileModeFragment.kt for the selectedImage LiveData.
- Simplified comparisons of tileMode in TileModeFragment.kt and WaterMarkImageView.kt.
- Refactored the updateTileMode() function of WaterMarkRepository.kt to save the tileMode value to DataStore and emit the updated value to the corresponding LiveData.
rosuH added a commit that referenced this issue Jul 29, 2023
* ⬆️ Bump androidx.profileinstaller:profileinstaller (#267)

Bumps androidx.profileinstaller:profileinstaller from 1.2.2 to 1.3.0.

---
updated-dependencies:
- dependency-name: androidx.profileinstaller:profileinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump roomVersion from 2.5.0 to 2.5.1 (#263)

Bumps `roomVersion` from 2.5.0 to 2.5.1.

Updates `androidx.room:room-runtime` from 2.5.0 to 2.5.1

Updates `androidx.room:room-ktx` from 2.5.0 to 2.5.1

Updates `androidx.room:room-compiler` from 2.5.0 to 2.5.1

---
updated-dependencies:
- dependency-name: androidx.room:room-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: androidx.room:room-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: androidx.room:room-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.fragment:fragment-ktx from 1.5.5 to 1.5.6 (#266)

Bumps androidx.fragment:fragment-ktx from 1.5.5 to 1.5.6.

---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.lifecycle:lifecycle-runtime-ktx (#265)

Bumps androidx.lifecycle:lifecycle-runtime-ktx from 2.5.1 to 2.6.1.

---
updated-dependencies:
- dependency-name: androidx.lifecycle:lifecycle-runtime-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.activity:activity-ktx from 1.6.1 to 1.7.0 (#264)

Bumps androidx.activity:activity-ktx from 1.6.1 to 1.7.0.

---
updated-dependencies:
- dependency-name: androidx.activity:activity-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated gradle-wrapper.properties to use the new distributionUrl for Gradle-7.5, and updated settings.gradle.kts to use the new version of com.android.tools.build:gradle:7.4.2.

* :arrow_up: Bump roomVersion from 2.5.1 to 2.5.2 (#287)

Bumps `roomVersion` from 2.5.1 to 2.5.2.

Updates `androidx.room:room-runtime` from 2.5.1 to 2.5.2

Updates `androidx.room:room-ktx` from 2.5.1 to 2.5.2

Updates `androidx.room:room-compiler` from 2.5.1 to 2.5.2

---
updated-dependencies:
- dependency-name: androidx.room:room-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: androidx.room:room-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: androidx.room:room-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.profileinstaller:profileinstaller (#277)

Bumps androidx.profileinstaller:profileinstaller from 1.3.0 to 1.3.1.

---
updated-dependencies:
- dependency-name: androidx.profileinstaller:profileinstaller
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.core:core-ktx from 1.7.20 to 1.10.1 (#278)

Bumps androidx.core:core-ktx from 1.7.20 to 1.10.1.

---
updated-dependencies:
- dependency-name: androidx.core:core-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.activity:activity-ktx from 1.7.0 to 1.7.2 (#282)

Bumps androidx.activity:activity-ktx from 1.7.0 to 1.7.2.

---
updated-dependencies:
- dependency-name: androidx.activity:activity-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump kotlinVersion from 1.8.0 to 1.8.22 (#285)

Bumps `kotlinVersion` from 1.8.0 to 1.8.22.

Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 1.8.0 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Updates `org.jetbrains.kotlin:kotlin-stdlib` from 1.8.0 to 1.8.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump androidx.fragment:fragment-ktx from 1.5.6 to 1.6.1 (#290)

Bumps androidx.fragment:fragment-ktx from 1.5.6 to 1.6.1.

---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update build.gradle.kts to use Kotlin jvmToolchain(17) instead of compileOptions.
Update build.gradle.kts to use Kotlin jvmToolchain(17) instead of kotlinOptions.
Add Kotlin jvmToolchain(17) to build.gradle.kts.
Update build.gradle.kts to use classpath "com.android.tools.build:gradle:8.1.0" instead of libs.tools.gradle.
Add android.defaults.buildfeatures.buildconfig=true, android.nonTransitiveRClass=false, android.nonFinalResIds=false to gradle.properties.
Update distributionUrl to https\://services.gradle.org/distributions/gradle-8.2-bin.zip in gradle-wrapper.properties.

* Update java version from 11 to 17 in pr_pre_check.yml and release.yml

* Refactor ImageInfo.kt, IntExtension.kt, MainViewModel.kt, TileModeFragment.kt, WaterMark.kt, WaterMarkImageView.kt, and WaterMarkRepository.kt (#289)

- Removed imports for android.graphics.Shader and android.os.Build from ImageInfo.kt and WaterMark.kt respectively.
- Removed the obtainTileMode() function from ImageInfo.kt and added it to IntExtension.kt as an extension function named toTileMode().
- Renamed the parameter "imageInfo" in the updateTileMode() function of MainViewModel.kt to "tmpConfig".
- Renamed the parameter "imageInfo" in the updateTileMode() function of WaterMarkRepository.kt to "mode".
- Removed unnecessary null check in TileModeFragment.kt for the selectedImage LiveData.
- Simplified comparisons of tileMode in TileModeFragment.kt and WaterMarkImageView.kt.
- Refactored the updateTileMode() function of WaterMarkRepository.kt to save the tileMode value to DataStore and emit the updated value to the corresponding LiveData.

* [AboutActivity.kt]

- Removed the code block related to checking the SDK version and setting the foreground to null for the window.

[WaterMarkImageView.kt]

- Removed the condition to check the SDK version for creating a static layout instance and created a static layout unconditionally.

[MainActivity.kt]

- Removed the code block related to checking the SDK version and setting the foreground to null for the window.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@rosuH
Copy link
Owner

rosuH commented Jul 29, 2023

感谢建议,已经在最新版 2.8.9 调整为应用到全部图片,欢迎体验 :D

@rosuH rosuH closed this as completed Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants