Git Product home page Git Product logo

Comments (5)

fintelia avatar fintelia commented on September 26, 2024

I'd probably suggest seeing how far you can get with the existing incremental decoding functionality we have. Either ImageDecoder::into_reader or ImageDecoderRect::read_rect. Basically move the early_exit flag into your own code. Only some decoders have meaningful implementations of those, which is mostly a consequence of it being much easier to define an API than to actually implement it for all our decoders...

from image.

sophie-h avatar sophie-h commented on September 26, 2024

I'm already cutting off the data source, but that doesn't seem to help. Do you mean manually reading different parts of the image with read_rect? I don't understand your suggestion yet.

from image.

fintelia avatar fintelia commented on September 26, 2024

You have to check the code to see whether the format you're using supports streaming decode. For instance, PNG has a real implementation while JPEG just decodes the entire image into a Vec<u8> when you first call into_reader.

from image.

sophie-h avatar sophie-h commented on September 26, 2024

Well, it sounds like zune-jpeg has given up on implementing streaming decoding, which is fine. But for an image viewer, we need a way to stop decoding. Since I'm planning to maybe move decoding to separate processes, we could just kill them if they don't react. But being able to recycle the process might be neater. But before we have to chase every decoder to support shutdown, we might just go with the brute-force method.

I'm undecided 😆

from image.

sophie-h avatar sophie-h commented on September 26, 2024

I will handle this by putting decoding in a separate process.

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.