Giter Club home page Giter Club logo

Comments (9)

Belval avatar Belval commented on July 29, 2024 1

Sure, I'll have a look.

from pdf2image.

Belval avatar Belval commented on July 29, 2024 1

I'll see if I can implement the -scale_to argument, but for anyone who runs into that issue, you can set the maximum pixel count in Pillow using:

from PIL import Image
Image.MAX_IMAGE_PIXELS = 1000000000

or simply suppress the warning altogether using:

import warnings
warnings.simplefilter ('ignore', Image.DecompressionBombWarning)

See python-pillow/Pillow#963 for more details.

There is nothing to "solve" per say. This is a security measure implemented in Pillow which is used by pdf2image. When processing huge images simply change the maximum pixel count.

from pdf2image.

Belval avatar Belval commented on July 29, 2024 1

The size parameter is now implemented in the latest version, feel free to use the Pillow workaround as well if you are still experiencing this issue.

from pdf2image.

Belval avatar Belval commented on July 29, 2024

I'll see if I can implement the -scale_to argument, but for anyone who runs into that issue, you can set the maximum pixel count in Pillow using:

from PIL import Image
Image.MAX_IMAGE_PIXELS = 1000000000

or simply suppress the warning altogether using:

import warnings
warnings.simplefilter ('ignore', Image.DecompressionBombWarning)

See python-pillow/Pillow#963 for more details.

from pdf2image.

RAJAT--PALIWAL avatar RAJAT--PALIWAL commented on July 29, 2024

@Belval Thanks for suggestions.
We have implemented -scale-to argument the same way dpi argument has been set. Code has been tested and available with @Rao2321 repository https://github.com/Rao2321/pdf2image/tree/dev_scale. Should we create a pull request?

from pdf2image.

Belval avatar Belval commented on July 29, 2024

Closing for inactivity.

from pdf2image.

stripathi669 avatar stripathi669 commented on July 29, 2024

@Belval Was this code merged?

from pdf2image.

Belval avatar Belval commented on July 29, 2024

Unfortunately no, there was no PR opened. Is this still relevant to your use case?

from pdf2image.

NullYing avatar NullYing commented on July 29, 2024

Is it solved? I also have the same problem.

from pdf2image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.