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

send images as sticker not only when they have the 140x140 dimensions, but also when they have transparent corner(s) #2258

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Simon-Laux
Copy link
Member

also add the send as sticker logic to darg and droping an image into a chat, this makes it super convinient to create stickers from images with iOS's AI selection feature.
(long press to select your favorite pet or person then hold the object and use a second finger to navigate to the chat you want to send it to.)

…, but also when they have transparent corner(s)

also add the send as sticker logic to darg and droping an image into a chat, this makes it super convinient to create stickers from images with iOS's AI selection feature.
(long press to select your favorite pet or person then hold the object and use a second finger to navigate to the chat you want to send it to.)
@Simon-Laux Simon-Laux marked this pull request as draft August 2, 2024 23:48
@Simon-Laux
Copy link
Member Author

Simon-Laux commented Aug 2, 2024

  • dropping the image to send as sticker is still unreliable
  • and for some images there is still a black background (core or sth else seems to decide to convert some HEIF pictures to jpg with black background instead of transparency and some to correctly to png; maybe it has sth to do with image dimensions? I tested 2 images, the bigger one was correctly converted to png, the smaller one was converted to jpg and lost transparency).

so not ready to be merged yet.

@Simon-Laux
Copy link
Member Author

Simon-Laux commented Aug 4, 2024

I tested 2 images, the bigger one was correctly converted to png, the smaller one was converted to jpg and lost transparency

meanwhile I tested more images (create a sticker with iOS AI selection), and I haven't found another image yet where the black background appeared. It she not seem to be realtime to image dimensions, because I tried smaller images and they worked just fine.

Furthermore the transparency is preserved when I drop the image in question (with the black bg) into other apple apps, like Notes.
I suspect there is some conversion going on either in core or in deltachat-ios code before giving core the image, I haven't looked at the whole code path/flow yet (how do images get to core and treated there).

The files app says it's HEIF files, but when I send them to deltachat desktop the good ones arrive as png, while the bad one is a jpg. So maybe this HEIF issue in desktop is related?: deltachat/deltachat-desktop#3879

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

Successfully merging this pull request may close these issues.

1 participant