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

Blurred images #1344

Closed
marcusps opened this issue Mar 15, 2012 · 5 comments · Fixed by #13683 or #13991
Closed

Blurred images #1344

marcusps opened this issue Mar 15, 2012 · 5 comments · Fixed by #13683 or #13991

Comments

@marcusps
Copy link

PDF.js displays blurry plots in PDF documents, e.g.

http://arxiv.org/pdf/1202.5344v1.pdf

When viewed in Chrome or Adobe Acrobat all the plots show sharp-edged squares. When viewed in Preview or PDF.js, all the squares show as blurry pixelated blobs.

@timvandermeij
Copy link
Contributor

TilingType issue. From the console:

"Warning: TODO: TilingType: 1"

Still there with Windows 7 x64, Firefox 25.0.1 (HWA on) and the latest PDF.js development version

@marcusps
Copy link
Author

This is still a problem with OSX 10.8.5, Firefox 29.

@Rob--W
Copy link
Member

Rob--W commented Oct 3, 2015

Remark: The dots have disappeared in some cases. And while working on something else, I discovered that the Matrix of the tiling pattern has 0 and 0 for the x and y scale, respectively.

page2

@SamyCookie
Copy link

Still blurry plots with Firefox 62 and PDF.js: 2.0.625

@SamyCookie
Copy link

Still blurry plots with Firefox 66.0.1 and PDF.js: 2.2.107.
However, I have not the TilingType log anymore, so maybe it is not a related to a tiling type bug, but more to this kind of issue #7838 ?

brendandahl added a commit to brendandahl/pdf.js that referenced this issue Jun 30, 2021
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of mozilla#13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.

These fixes broke mozilla#11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes mozilla#6297,  mozilla#13561, mozilla#13441, mozilla#13111

Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
brendandahl added a commit to brendandahl/pdf.js that referenced this issue Jul 6, 2021
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of mozilla#13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.

These fixes broke mozilla#11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes mozilla#6297,  mozilla#13561, mozilla#13441, mozilla#13111

Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
brendandahl added a commit to brendandahl/pdf.js that referenced this issue Jul 7, 2021
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of mozilla#13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.

These fixes broke mozilla#11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes mozilla#6297,  mozilla#13561, mozilla#13441

Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
@Snuffleupagus Snuffleupagus reopened this Jul 7, 2021
brendandahl added a commit to brendandahl/pdf.js that referenced this issue Sep 10, 2021
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of mozilla#13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.

These fixes broke mozilla#11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes mozilla#6297,  mozilla#13561, mozilla#13441

Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
rousek pushed a commit to signosoft/pdf.js that referenced this issue Aug 10, 2022
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants