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

clipboard filesize bloat #3466

Open
D063 opened this issue Jun 18, 2024 · 2 comments
Open

clipboard filesize bloat #3466

D063 opened this issue Jun 18, 2024 · 2 comments

Comments

@D063
Copy link

D063 commented Jun 18, 2024

300kb clipboard image files are somehow converted to 1.5-2.5mb when pasted into 'anonymous' text boxes.

inb4 why can't I hold all this metadata

@notevenaperson
Copy link
Contributor

I think it's because right-clicking > copy copies the pixel data and it's pasted as a PNG. (from something that was originally a JPEG) This isn't particular to 4chan X, I think. I've seen the file size increase when pasting images in places like Discord or Element.

@import-that
Copy link

I think it's because right-clicking > copy copies the pixel data and it's pasted as a PNG.

i havent bothered to look into the code to confirm the paste format, but i suspect this is near the issue; im not convinced its raw pixel data pixel data that is copied into the form (298829883 = 26784432 = 3.348 MB, paste was ~ 9MB), inflating file size. i dont know if there is any browser api that can overload paste behavior for images or if its possible to somehow apply an encoder (like jpg) between the image data paste and the file submission to the form (possibly the current behavior). the latter option seems more feasible and productive, though the potential bloat to the extension could be of concern.

as a solution to inflated pasted image size, id like to see a jpg encoder that varies its quality based on the current boards filesize limit and image data size, optimizing for maximum permissible quality.

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

No branches or pull requests

3 participants