Giter Club home page Giter Club logo

wpf.imageeffects's People

Contributors

usercode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wpf.imageeffects's Issues

Would this work for 8-bit grayscale images?

This shader appears to deal only in floating-point pixels. I know next to nothing about DirectX and how the image pipeline works. If I were showing a bitmap created as 8-bit grayscale, would this shader work for that? Or would I need to try to learn how to write my own shader.

Memory Leak caused by this effect

I have an application which allows the user to browse folders containing hundreds of images. I show them all in a ListBox and apply this effect to each of them as a StaticResource. It works wonderfully -- I really love this -- but after many hours tracking down a big memory leak, I narrowed it down to this effect alone.

Literally this is my XAML

First in a resource dictionary

    <imageeffects:BrightnessContrastEffect x:Key="SettingsImageBrightnessEffect"
        Brightness="{Binding Source={svc:ViewSettings}, Path=BrightnessOffset}" />

And then later in my page -- this is the DataTemplate for each thumbnail I show. There can be hundreds of these in a folder

<Image Grid.Row="0" Grid.RowSpan="2" 
       Source="{Binding ThumbnailSource}"
       Effect="{StaticResource SettingsImageBrightnessEffect}"
       />

As long as this effect is applied to an image, the image source memory is apparently never released. I've profiled it in Resharper's Dot Memory. IT is like looking at a staircase; Navigate to one folder, watch the memory go way up. Navigate to another folder, watch that happen again. It never goes back down. Even repeatedly resizing the one folder I'm in (so that more or fewer images appear) makes the memory used go way up.

But as soon as I remove the one line that applies the effect to the image,

Effect="{StaticResource SettingsImageBrightnessEffect}"

The memory usage goes all the way back down with every page navigate

Is there any thing I can do to turn this off? I love your project (and would love to learn how to do it myself) but I am unfortunately forced to cut out that line for now

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.