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

Allow sending pictures up to 2560px #1790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gobonja
Copy link

@gobonja gobonja commented Nov 4, 2023

  • This PR will allow sending pictures up to 2560px.

  • Telegram API already allows to send photos with that size.

  • Telegram Desktop and some android client forks (e.g. Nekogram) also supports this.

  • There is also bug report for this: https://bugs.telegram.org/c/15370

@Kris35hoog
Copy link

Ok

@gobonja
Copy link
Author

gobonja commented Jan 23, 2024

@dkaraush @DrKLO @xaxtix any news about this PR?

@dkaraush
Copy link
Collaborator

dkaraush commented Mar 14, 2024

This increases the initial texture buffer allocation by significant amount in painting screen. You might want to apply this increase only for photos that are already that size or larger. Considering reports of OutOfMemoryException, it would be also great to do that only for HIGH and AVERAGE devices...

@QuAzI
Copy link

QuAzI commented May 24, 2024

Waiting for this feature as currently photos quality in TG is terrible and TG gallery works ugly with photos which uploaded as files

@gobonja
Copy link
Author

gobonja commented May 24, 2024

This increases the initial texture buffer allocation by significant amount in painting screen. You might want to apply this increase only for photos that are already that size or larger. Considering reports of OutOfMemoryException, it would be also great to do that only for HIGH and AVERAGE devices...

As far as I can see, this functionality is already implemented:

if (photoWidth > AndroidUtilities.getPhotoSize()) {
photoWidth = AndroidUtilities.getPhotoSize();
}
if (photoHeight > AndroidUtilities.getPhotoSize()) {
photoHeight = AndroidUtilities.getPhotoSize();
}

It will use actual image size if size is not bigger then 2560px, if it is bigger it will downscale image to 2560px.
So it will never increase image size, just allow images up to 2560px.

@fhnb16
Copy link

fhnb16 commented Jul 17, 2024

Still waiting for this feature and suffering with overcompressed images..

Copy link

@vovmomyt vovmomyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like

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.

6 participants