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
1
vote
0 answers

Manipulating image (translate + scale) and then crop the image in Universal App?

After 2 frustrating days of trying to build an image cropper control I turn to StackOverflow to find an answer. I'm porting my WP8.0 (Silverlight) app to WinRT (Universal app for WP8.1 and W8.1), and I got everything covered... Except the page where…
Niels
  • 2,496
  • 5
  • 24
  • 38
1
vote
1 answer

writeablebitmap in windows phone 8.1

I create universal project type in vs 2013 for 8.1. In windows phone project i added reference to WriteableBitmapEx via nuget. In references i see WriteableBitmapEx.WinRT. I write code which creates WriteableBitmap from content (use image in project…
1
vote
1 answer

Blur an Image on windows phone

I'm using WriteableBitmapEX library trying to blur a Bitmap image at windows phone 8 I tried this code Uri uri = new Uri(AnyUri, UriKind.RelativeOrAbsolute); BitmapImage img1 = new BitmapImage(); img1.UriSource = uri; img1.CreateOptions =…
Hesham
  • 132
  • 2
  • 12
1
vote
0 answers

Improve WriteableBitmap performance

I'm working on a project were I need to draw N ellipses every X milliseconds, where 0 <= N <= 10^5 and 5 <= X <= 500. I started using WPF, and its relative controls like Canvas for the viewport and Ellipse controls for the ellipses. I store the…
Nick
  • 10,309
  • 21
  • 97
  • 201
1
vote
1 answer

Alpha channel not working as expected with WriteableBitmap

My current code is blit'ing a small Pbgra32 bitmap onto a larger Pbgra32 bitmap. Works fine. What I would like to do now is make that smaller one partly transparent. To do this, before the blit, I am passing the smaller one to a method that should…
davecove
  • 1,001
  • 4
  • 16
  • 36
1
vote
1 answer

How to crop a rotated portion of a WriteableBitmap in Windows Store app and C#

In a Windows Store app I want to crop a rotated rectangle part of a WriteableBitmap like Case 2 in the following image. I have P0, Width, Height and P1 and rotation angle of the rectangle. Rotation is based on center of each rectangle I am using…
Ali
  • 83
  • 3
  • 10
1
vote
1 answer

Draw a fluid set of circles in real time using WriteableBitmapEx

I have a WriteableBitmap object which I load a .jpg image into and show it in an image control. Now I would like to be able to let the user draw on that image with a little half-transparent brush. Right now I am handling the MouseDown and MouseMove…
1
vote
1 answer

How to Resolve WriteableBitmap AccessViolationException

I'm currently using the WriteableBitmapEx extension for my writeable Bitmap class. So far everything works now I'm doing this in a WinRT project. I run this code to merge the bitmaps together. Windows.Storage.Pickers.FileSavePicker save = new…
1
vote
1 answer

Select an image from rectangle using writeablebitmap

I have written an application in silverlight, I am placing a rectangle on the image and want to select the part of image covered by rectangle and show it on a image control on click of a button. I am not good at handling ratios and image…
1
vote
2 answers

When using a DirectX-based API with WPF (i.e. SlimDX, SharpDX, etc.) can you do sub-window-sized controls?

In our WPF application, we have a need to display about 64 real-time level meters for an audio application. The tests we've thrown at WPF, even when rendering basic primitives as efficiently as we can still show it to be nowhere near where our…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
1
vote
1 answer

WriteableBitmap crashes program with no message?

I create a WriteableBitmap object, draw a line and try to set it as the source to an Image control. For some reason, the program stops responding and then closes 5 seconds later when I try to set the Source. Anyone have any idea what's wrong? (I am…
Oztaco
  • 3,399
  • 11
  • 45
  • 84
1
vote
1 answer

AccessViolationException when accessing pixel color using WriteableBitmapEx

I'm using WriteableBitmapEx library to edit an image taken with tablet's cam with Windows 8 Pro. I'm getting an AccessViolationException every time I call to GetPixel() function, here's the code: Windows.Media.Capture.MediaCapture captureMgr = new…
Branyac
  • 459
  • 2
  • 8
1
vote
1 answer

WriteableBitmapEx in console application?

I was wondering if it's possible to use the WriteableBitmap class / the WriteableBitmapEx framework in an ordinary C# console application? I have tried to add it via nuget and also included a using statement for System.Windows.Media.Imaging, but the…
Thomas
  • 4,030
  • 4
  • 40
  • 79
1
vote
1 answer

Rectifiy image of DVD cover

I'm trying to get the cover image of a DVD as a rectangular image from a photo. Now as the cover on the photo is usually a bit skewed I need to rectify it programmatically. I've already removed most of the surroundings using the Laplacian of Gauss…
1
vote
1 answer

Manipulate WriteableBitmap Pixels

I'm trying to merge two images I have as WriteableBitmaps. I want to square each pixel value, add it to the other image and then take the 2nd root (+ check, if the value is above 255). As I had no luck doing so using WriteableBitmapEx and ForEach()…
Thomas
  • 4,030
  • 4
  • 40
  • 79