Code Monkey home page Code Monkey logo

Comments (7)

pgills avatar pgills commented on May 18, 2024

@cyrilcathala Thanks for the reduced repo. This is super helpful.

We've been seeing some issues with the image loader helper. Which is what we can believe is the root cause. But we'll get someone to investigate to verify.

We're working on update for more efficient ways for uploading image data. So stay tuned for that.

from windowscompositionsamples.

cyrilcathala avatar cyrilcathala commented on May 18, 2024

Great news, and thanks for the quick reply!

Do you have any timeline to share for the update?
I'd like to publish a new app, and that's quite the last piece of the puzzle to solve...

from windowscompositionsamples.

pgills avatar pgills commented on May 18, 2024

@cyrilcathala Unfortunately, we can't share out direct timelines (which doesn't help you), but we are actively working on it.

However there are some possible workarounds to unblock you in the very near term, note things can change though.

A DIY more flexible, but more complex version:

  • Leverage Win2D + Windows.UI.Composition interop
    • Load the image data using CanvasBtimap from Win2D
    • Use Win2D to draw the image data on a CompositionDrawingSurface using the Win2D CompositionExample
    • Use that CompositionDrawingSurface to create a SurfaceBrush and use that as input to your Effect

This gives you super flexibility in terms of you can use Win2D to draw effects directly to the image data(these aren't animated by the Compositor at runtime), and then use that as input to an Effect that you want to animate with the Compositor at runtime.

Like I said more flexible, but a little more complex.

@robmikh has been experimenting in this area and you can have a look at what he's being doing here:
(https://github.com/robmikh/compositionimageloader).

Hope that helps for the relatively short term.

By the way, what build(s) are you looking to target and are you on the Windows Insider program?

from windowscompositionsamples.

cyrilcathala avatar cyrilcathala commented on May 18, 2024

Ok great, now I have what I need, thanks for the detailed answer, really appreciate.
I'll definitively have a look at @robmikh project.

Can't wait to see what's next with those awesome APIs :)

from windowscompositionsamples.

cyrilcathala avatar cyrilcathala commented on May 18, 2024

Just to let you know, I am now using the CompositionImageLoader, and it is a winner! No more memory leaks, I'm thrilled! :)

Thanks again @pgills, I close the issue.

from windowscompositionsamples.

pgills avatar pgills commented on May 18, 2024

@cyrilcathala Thanks! I'm going to keep this issue open for a little bit longer incase other folks run into this so they have a temporary work around, until publish our update.

from windowscompositionsamples.

pgills avatar pgills commented on May 18, 2024

Closing. We have an updated ImageLoader in the Samples Common project file. Recommending moving to that implementation.

from windowscompositionsamples.

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.