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

Embedding base64-encoded image on 53.0 takes 30× more space #1462

Closed
vojkny opened this issue Oct 6, 2021 · 1 comment
Closed

Embedding base64-encoded image on 53.0 takes 30× more space #1462

vojkny opened this issue Oct 6, 2021 · 1 comment

Comments

@vojkny
Copy link

vojkny commented Oct 6, 2021

Consider following html:

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
      <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQAQAAAACoxAthAAABiElEQVR4Xu3YPXLCMBCGYTEpKHMEjuKj4aPlKD5CSooMQvsjWQqeWDIUKd6vAa/22U6zmBCHE34X9gMZDWQ0kNEcI7fQ5FPrd3uY4tIcpgIE0gTSQT60S7PU5FoVNDMEAjlEtCOkgnTc0rdT7siFFAgE8jaiHRIIBPJuEuOPPT7NgEAgx0hJJmnx1TM8EAjkCGkil1CvqXUs7SkEAqnTQzaii8/IcyAbgUB2iXTZJTzXBYvPsLp/QiCQbuJ7LoRLtE148vM0wzahZpYZEAkEMkRKYQlyK8vr28YMyBoIpIdIIditnLRWXUIjvvgkEwQCOU4ktufuuUcKTmwOBKKBeMc+eUpDLlrSTShDJ0jVmgOB/EX8VuZUt/Kaupb1xCdCIHUgHcR/SkqWUPacEUkzAwKB5PQTLYS01oSUGbMWZUb5m3KCQCCvk/Kf45fVLVaCQCAvkpI5FSy+CaUDAoGMk5KGWL7DOW4svhLI+mCBREhLmlREO1ZSv75BIJBeMhrIaCCjgYzm35IH8TLVbS2jtlUAAAAASUVORK5CYII=">
</body>
</html>

When compiled with 52.5, the PDF takes 1.5 kb. When compiled with 53.0, it takes 40 kb.

I would expect the PDF not to grow so enormously.

@liZe
Copy link
Member

liZe commented Oct 6, 2021

Hello!

Thanks for the bug report.

That’s actually a duplicate of #1444. We transform the small PNG into a large JPEG2000, that’s both slower and bigger. We should definitely try to keep the PNG.

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

2 participants