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

Fix of #1753 causes white lines for incorrectly cropped cards, deal with this more gracefully (somehow) #2248

Open
solokot opened this issue Dec 23, 2024 · 7 comments
Labels
state: consensus-needed A consensus needs to be reached before this can be implemented

Comments

@solokot
Copy link
Contributor

solokot commented Dec 23, 2024

After upgrading from version 2.33 to 2.34.1, the thumbnails have vertical white stripes (F-Droid builds were used, as they were a few years earlier).
OS: Android 11 MIUI 12.5
Strip 3
Perhaps this is due to #2199

Attached are a couple of thumbnail samples from the backup file and their original images used when adding maps to the database.

card_1_icon
card_1_original
card_17_icon
card_17_original

@TheLastProject TheLastProject added state: invalid This doesn't seem right state: consensus-needed A consensus needs to be reached before this can be implemented labels Dec 23, 2024
@TheLastProject
Copy link
Member

The display isn't broken, these thumbnails weren't cropped correctly and thus don't exactly fit.

Catima's old behaviour was to use the dominant colour as background, which caused issues like #1753 and #1972. A lot of pkpass files contain transparent images, meaning the old behaviour would make the logo unreadable for the vast majority of pkpass files, which is why I changed it in #2201.

Sure, the new behaviour isn't perfect either, but these images were always wrong, it just was less obvious because Catima added a small green/blue/orange line instead, which was less visible than a white or black line.

I don't think there is a perfect solution here sadly, not sure what I could do here without breaking something else :/

@TheLastProject
Copy link
Member

According to #2249 (comment) this was fixed by #2253 too. Not sure how, but can always reopen if it comes back :)

@solokot
Copy link
Contributor Author

solokot commented Dec 26, 2024

It's fixed
Strip 2

@solokot
Copy link
Contributor Author

solokot commented Dec 27, 2024

Oh, the thumbnail display has not been corrected in the release https://github.com/CatimaLoyalty/Android/releases/tag/v2.34.2, need to open the PR back.
Screenshot_2024-12-27-14-13-49-318_me hackerchick catima

@TheLastProject TheLastProject reopened this Jan 4, 2025
@TheLastProject TheLastProject removed the state: invalid This doesn't seem right label Jan 4, 2025
@TheLastProject
Copy link
Member

I'm still quite confused that this "suddenly changed", it really shouldn't because the aspect ratio of a card is hardcoded and hasn't changed ever (maybe I made a mistake in margin/padding?). Did this change between some release?

Someone else suggested outside of GitHub to stretch the images to make them fit if they're too small, but I worry that might break pkpass-created images, as those aren't necessarily the right size and may look bad stretched out (and so may other images).

Not quite sure what would be the right solution here, also not quite sure what's even going wrong in the first place.

@solokot
Copy link
Contributor Author

solokot commented Jan 5, 2025

Did this change between some release?

The problem with the light vertical stripes in the thumbnails appeared in 2.34, it did not exist in 2.33 & any previous version of Catima (three years for sure).
In a couple of days, will I be able to check the behavior on a couple of other devices (including non-MIUI), I'll post the results.

@TheLastProject
Copy link
Member

Okay, so, if it broke in 2.34.0 I still think the issue lied with your images in that they weren't cropped correctly then. Because 2.34 changed the images to no longer use a background based from the dominant colour, but just a white/black background, as described in #2248 (comment).

So I don't think this is really a Catima bug, it's more a feature request to deal more nicely with images which weren't cropped to the correct size. In which case the discussion is: what should Catima do if the image doesn't fit?

@TheLastProject TheLastProject changed the title Display of thumbnails in 2.34.x is broken Fix of #1753 causes white lines for incorrectly cropped cards, deal with this more gracefully (somehow) Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: consensus-needed A consensus needs to be reached before this can be implemented
Projects
None yet
Development

No branches or pull requests

2 participants