Skip to content

Add support for raster image interpolation in PDF viewers #1400

Closed

Description

@chcore

Description

The latex \includegraphics function has an interpolate parameter, that when set to true produces PDFs that scale images in higher quality (when zooming in) as compared to typst. I would like to request that a similar feature/flag be added to typst.

Use Case

I write documents that include a lot of screenshots in PNG format. These screenshots only take up a small portion of the size of the page. When the PDF reader zooms in on these screenshots, the image quality should be maintained.

Here is what I see when I zoom in on the screenshot in the typst-generated PDF:

image

And the latex-generated one, which looks somewhat nicer:

image

Activity

  1. added
    feature request
    on Jun 3, 2023
  2. added
    pdf
    on Jun 3, 2023
  3. reknih commented on Jun 6, 2023

    @reknih
    Member

    We can discuss this! It's worth noting that PDF/X forbids the interpolate keys (likely to ensure reproducibility across viewers because the PDF spec does not specify how to interpolate).

  4. added
    good contribution
    on Sep 18, 2023
  5. added 2 commits that reference this issue on Dec 28, 2024
    39b397c
    9789fdb
  6. chcore commented on Feb 19, 2025

    @chcore
    Author

    This was implemented in version 0.13.0, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestgood contributionpdf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions