DCSIMG
Imaging,WPF - Essential XAML

Browse by Tags

All Tags » Imaging » WPF (RSS)

WPF Official Image Interop by Tomer Shamam

As I wrote my few last posts about how to access the BitmapSource WIC image pixels, I have found a post in the MSDN forum, which exposes a static class called Imaging . This amazing class which somehow was very hard to find, can do a great work with image-interop. Looking inside the MSDN for the Imaging class, I found the following methods: CreateBitmapSourceFromHBitmap CreateBitmapSourceFromHIcon CreateBitmapSourceFromMemorySection The CreateBitmapSourceFromMemorySection is the best match for creating...
תגים:, , ,

WPF Image Processing Under the Hood by Tomer Shamam

In the last two posts I have showed how to create a BitmapSource image and access its underlying WIC image, for manipulating its pixels. In this post I will explain how does the WICBitmap* works. Download the code from here . Looking inside the BitmapSource class using Reflector , it figures out that it encapsulates a WIC image (_ wicSource ). The WICBitmap class uses reflection to retrieve this private field: public WICBitmap( BitmapSource source) { Type bitmapSource = typeof ( BitmapSource ); FieldInfo...

WPF Raw Video by Tomer Shamam

In my last post I showed how to access the WPF's BitmapSource underlying WIC image, and I promised to explain my code, and also to post an Image stream (Video) code based on my solution. In this post I will quickly talk about the unique CompositionTarget class, and I will show how to render a Raw Video using its Rendered event. Download the code from here ( FYI - I refractor the code from the last post and fixed several bugs ). I will start by reminding one of the disadvantages of my WICBitmap...

WPF Image Processing by Tomer Shamam

With the release of Windows Vista and WPF, Microsoft has also released the WIC: "an extensible framework for working with images and image metadata. WIC makes it possible for independent software vendors (ISVs) and independent hardware vendors (IHVs) to develop their own image codecs and get the same platform support as standard image formats (for example, TIFF, JPEG, PNG, GIF, BMP, and WMPhoto)" (MSDN). Unsurprisingly, WPF uses WIC in its core (for example, BitmapSource ). Unfortunately...
Powered by Community Server (Commercial Edition), by Telligent Systems