Questions tagged [writeablebitmapex]

The WriteableBitmapEx library is a collection of extension methods for the WriteableBitmap. The WriteableBitmap class is available for Windows Phone, WPF, WinRT Metro Style XAML and Silverlight and allows the direct manipulation of a bitmap and could be used to generate fast procedural images by drawing directly to a bitmap.

The WriteableBitmapEx library is a collection of extension methods for the WriteableBitmap. The WriteableBitmap class is available for Windows Phone, WPF, WinRT Metro Style XAML and Silverlight and allows the direct manipulation of a bitmap and could be used to generate fast procedural images by drawing directly to a bitmap.

The WriteableBitmap API is very minimalistic and there's only the raw Pixels array for such operations. The WriteableBitmapEx library tries to compensate that with extensions methods that are easy to use like built in methods and offer GDI+ like functionality. The library extends the WriteableBitmap class with elementary and fast (2D drawing) functionality, conversion methods and functions to combine (blit) WriteableBitmaps.

The extension methods are grouped into different CS files with a partial class. It is possible to include just a few methods by using the specific source CS files directly or all extension methods through the built library assembly.

85 questions
6
votes
1 answer

Performance of WriteableBitmap(Ex) vs DrawingContext

I am building a custom UI framework in WPF where I basically ditch as much of the built-in layout system and controls as I can. So far I have been branching off from UIElement directly, but since I am already doing the measure, arrange and rendering…
d7samurai
  • 3,086
  • 2
  • 30
  • 43
4
votes
1 answer

System.Windows.Media.Imaging.WriteableBitmap leaking memory?

Consider the following code throws an exception 'MILERR_WIN32ERROR': while(true) { System.Windows.Media.Imaging.WriteableBitmap writableBitMap = new…
meds
  • 21,699
  • 37
  • 163
  • 314
4
votes
3 answers

WriteableBitmapEx.DrawRectangle Thickness?

How do you change the thickness/weight for the rectangle outline drawn with the WriteableBitmapEx.DrawRectangle extension method? The code I use to draw the rectangle is: WriteableBitmap wbmp = new WriteableBitmap(bmp); wbmp.DrawRectangle(0, 0, 480,…
msbg
  • 4,852
  • 11
  • 44
  • 73
4
votes
2 answers

How do I add watermark text to a bitmap in WinRT?

I would like to do something like this http://weblogs.asp.net/broux/archive/2011/02/08/silverlight-how-to-watermark-a-writeablebitmapimage-with-a-text.aspx. I am having a tough time getting this to work in WinRT. I am using the WriteableBitmap…
4
votes
1 answer

Converting from Pbgra32 to Bgr32 PixelFormats using FormatConvertedBitmap

I am having trouble understanding how to use FormatConvertedBitmap to convert a WriteableBitmap I have from Pbgra32 to Bgr32. The application I'm building was initially using Bgr32, and I introduced WriteableBitmapEx (which uses Pbgra32) to flip an…
cryptic_star
  • 1,863
  • 3
  • 26
  • 47
3
votes
1 answer

Resize image for Live Tile - WriteableBitmapEx

** Found the solution Because of the fact this is a tile, the image will always be strechted to 173 by 173! To avoid this first create a dummy 173 by 173 and merge this with the resized one! Rect rect = new Rect(0.0, 0.0, width,…
Depechie
  • 6,102
  • 24
  • 46
3
votes
1 answer

Performance of WriteableBitmapEx

I am generating a full screen image with 37000 or so markers. To do this I use the following code private void DrawMarkers(WriteableBitmap bitmap) { WriteableBitmap marker = BitmapFactory.New(5, 5); var sourceRect =…
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
3
votes
3 answers

Sobel operator & Convolution with WriteableBitmapEx

So I'm using WriteableBitmapEx for an app on Windows RT. I'm trying to implement edge detection on an image using the sobel operator. I have successfully applied both kernels for x and y detection onto the image using .Convolute(), but now I'm stuck…
Thomas
  • 4,030
  • 4
  • 40
  • 79
3
votes
1 answer

WriteableBitmapEx GetPixel() returns wrong value

I need to combine two color values from two WriteableBitmap objects and compute something with them. Therefore I run a ForEach loop on the first object and parse its color value and the color value of the second object into a…
Thomas Mondel
  • 1,944
  • 3
  • 20
  • 25
2
votes
1 answer

Windows Store App - WriteableBitmap , blit method

Alright , i am trying to merge two images(superimpose one image on top of another) using writeablebitmapex library's blit method. And after applying the blit all i am getting is a transparent image with no content. I would like to superimpose the…
Mohammed Aamir K
  • 311
  • 5
  • 17
2
votes
0 answers

How to convert WriteableBitmap to byte[] in Windows Phone 8.1 Store app

I want to convert a WriteableBitmap to byte[] and there are tons of examples in Internet yet not a single one works, or has methods that are not current in my runtime which is Windows Phone 8.1 store project. Here is my WriteableBitmap…
v.g.
  • 1,076
  • 5
  • 19
  • 38
2
votes
1 answer

Is there a way to crop and deskew a quadrilateral from an image in a Windows Store (WinRT) application?

I'm writing an application for the windows store that uses Canny Edge Detection to find the borders of a document on an image. I need to be able to crop this image once the corners are found. I can use the WriteableBitmapExtension methods to crop a…
2
votes
1 answer

Cropping Image with Xamlcropcontrol for UI and WriteableBitmapEx

For the past week I've been researching as much as i can on how to add the ability to crop a profile image in my windows store app. So far I have looked at the Microsoft solution to this but have decided to go a different route. I downloaded a…
BurningBOB
  • 195
  • 2
  • 12
2
votes
1 answer

WriteableBitmap renders PNG incorrectly

I am having trouble rendering PNGs that use Palette as "Color Type". Here is some simple code to reproduce the issue: private async System.Threading.Tasks.Task Fetch() { HttpClient httpClient = new HttpClient(); Uri uri = new…
2
votes
0 answers

How to resize images in windows phone 8 applications?

How to Resize the image in windows phone 8.0 application using C# without loss of quality and to display full image What I did, My XAML Code:
user1934329
  • 529
  • 1
  • 6
  • 18
1
2 3 4 5 6