Git Product home page Git Product logo

Comments (1)

saucecontrol avatar saucecontrol commented on May 30, 2024

the documentation leads me to believe that it composes multiple transforms but only one "output" stream at the end. Is that correct?

That's correct. The ProcessingPipeline model was built around a few specific low-level interop scenarios, and it would need more work to completely support what you're looking for. I have a couple of sample gists I've written up for other issues you might find helpful for seeing how it's used:

It would be possible, using the same basic pattern in those gists, to write the output of your first resize into a memory buffer and then use that buffer as a source to do a null transform and save for your first image, then re-use that same buffer as a source for your second and third resizes.

would any of it actually result in a more efficient (memory, compute) than our current approach of orchestrating the streams and multiple calls to Process?

Probably not, actually. At least not enough to justify the added complexity. Using that technique would disable the planar (YCbCr) processing ProcessImage does with a JPEG source, making more work for both the pipeline and the output codec. And it would use more memory since the entire 1200px output would be in memory, which the pipeline normally avoids.

I have a longer-term vision for extending the pipeline model to support forking/merging for more advanced processing. I'll keep this use case in mind when I get around to designing and building that out.

This library runs circles around the nightmare that was our old GDI approach.

I can imagine, with that many images of that size πŸ‘€ . It's always interesting to hear what kind of volume people are throwing at this thing. Glad to know it's working out.

from photosauce.

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.