Giter Club home page Giter Club logo

Comments (7)

a-shafaat avatar a-shafaat commented on May 31, 2024 1

I'm using symfony framework. The symfony framework has a web GUI profiler with a performance tab that shows peak memory usage and some other related info.

Screenshot 2024-01-23 010653

from image.

olivervogel avatar olivervogel commented on May 31, 2024

Thanks for your report. This is already addressed in #1269

from image.

olivervogel avatar olivervogel commented on May 31, 2024

reading a 2 MB image using GD uses only 160 MB

Reading a 2 MB image with GD used 5.70 MB in a example I just created. How did you calculate these values?

from image.

a-shafaat avatar a-shafaat commented on May 31, 2024

the image i have used:
https://cdn.tizbam.ir/600dpi_Page_1.jpg

from image.

olivervogel avatar olivervogel commented on May 31, 2024

Thanks. The topic will be pursued further here.

from image.

olivervogel avatar olivervogel commented on May 31, 2024

One more note: The decoding process of Intervention Image involves more than just opening the image. The following tasks are performed:

  • Extraction of EXIF data for appropriate formats
  • Adjust the image rotation according to the EXIF data.

In your example image, the image rotation is set to 6 in the EXIF data. This means that the image is rotated once by 270 degrees to make so it is aligned correctly. This can take a lot of memory for large image sizes, especially with GD.

The examples from your code samples are therefore not 1:1 comparable.

from image.

a-shafaat avatar a-shafaat commented on May 31, 2024

thanks for your notes. I think any further processing must be optional and developers should be able to ignore them with a flag or some other way.
in my case, as you may guessed already, I want to do some OMR, and most of the work is done in another environment (python + opencv + ...). In php part of my environment, I only want to resize the picture if it's larger than 3000 pixels in any dimension and convert it to webp.
The Python part has some computer vision capabilities and can recognize the rotations. so exif rotation is a redundancy for me.

from image.

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.