If I have a wpf window with an Image control (of a fixed smallish size) with the source bound to a writeablebitmap and I fill the writeablebitmap with a colour, then when the writeablebitmap is smallish (width less that 100000) then the window renders as expected but if the writeablebitmap is large (width of 100000) then I just see weird artefacts in the Image control.
↧
Created Unassigned: Clear doesnt seem to work for large images [20649]
↧
Commented Unassigned: Clear doesnt seem to work for large images [20649]
If I have a wpf window with an Image control (of a fixed smallish size) with the source bound to a writeablebitmap and I fill the writeablebitmap with a colour, then when the writeablebitmap is smallish (width less that 100000) then the window renders as expected but if the writeablebitmap is large (width of 100000) then I just see weird artefacts in the Image control.
Comments: ** Comment from web user: teichgraf **
Comments: ** Comment from web user: teichgraf **
Please provide a repro solution so we can debug the issue. Thanks.
- Rene
↧
↧
New Post: Edit JPEG metadata?
Greetings -
I was wondering (hoping, really) if this library could be used to edit metadata in an existing jpeg?
For example add text to the comments or description field(s) ?
Thanks!
I was wondering (hoping, really) if this library could be used to edit metadata in an existing jpeg?
For example add text to the comments or description field(s) ?
Thanks!
↧
New Post: Edit JPEG metadata?
That's out of scope for this library. This lib here is pretty cool and provides what you are looking for: http://www.codeproject.com/Articles/47486/Understanding-and-Reading-Exif-Data
- Rene
↧
Created Unassigned: Different behavior of DrawLine* methods with points outside bitmap [20684]
Hi!
We came across an issue with DrawPolyline. When the array contains points that are outside the bitmap the lines is not correct. It seems that there is a problem with he slope of the line. This also leaves holes between the lines of the polyline. I have prepared a demo that demonstrates this problem. While I was doing the demo I noticed, that the different DrawLine methods return different results when provided with the same points.
* __DrawLineDDa__ and __DrawLineBresenham__ work always correctly.
* __DrawLine__ fluctuate depending on the slope of the line
* __DrawLineDDA__ is clipped incorrectly and simply doesn't work in scenario with points outside the bitmap.
The problem can be reproduced both in SL and WPF with the latest version of the library (1.0.9.0).
We came across an issue with DrawPolyline. When the array contains points that are outside the bitmap the lines is not correct. It seems that there is a problem with he slope of the line. This also leaves holes between the lines of the polyline. I have prepared a demo that demonstrates this problem. While I was doing the demo I noticed, that the different DrawLine methods return different results when provided with the same points.
* __DrawLineDDa__ and __DrawLineBresenham__ work always correctly.
* __DrawLine__ fluctuate depending on the slope of the line
* __DrawLineDDA__ is clipped incorrectly and simply doesn't work in scenario with points outside the bitmap.
The problem can be reproduced both in SL and WPF with the latest version of the library (1.0.9.0).
↧
↧
Commented Unassigned: BitmapContext not thread safe [20143]
It seems the dictionaries used in the context class have some thread racing occurring when you have multiple WPF render threads (with own dispatchers). Some locks should fix it.
Comments: ** Comment from web user: RaceRalph **
Comments: ** Comment from web user: RaceRalph **
This has already been discussed [HERE](https://writeablebitmapex.codeplex.com/workitem/20005). It seems just replacing Dictionary with ConcurrentDictionary helps. In my project I haven't noticed any performance penalty introduced by this change (I have used a profiler).
↧
Created Unassigned: AccessViolationException when drawing long line [20711]
Hello
I have a problem with an AccessViolationException on a long image. Is there a max size for the image?
I have created a small program that shows the problem:
```
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DrawLine(737, 11700); //crashes with AccessViolationException
DrawLine(737, 11000); //renders ok
}
private void DrawLine(int w, int h)
{
var bmp = BitmapFactory.New(w, h);
using (bmp.GetBitmapContext())
{
bmp.DrawLine(0, 0, 0, h-1, Color.FromRgb(0, 0, 0));
}
image1.Source = bmp;
}
```
I have a problem with an AccessViolationException on a long image. Is there a max size for the image?
I have created a small program that shows the problem:
```
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DrawLine(737, 11700); //crashes with AccessViolationException
DrawLine(737, 11000); //renders ok
}
private void DrawLine(int w, int h)
{
var bmp = BitmapFactory.New(w, h);
using (bmp.GetBitmapContext())
{
bmp.DrawLine(0, 0, 0, h-1, Color.FromRgb(0, 0, 0));
}
image1.Source = bmp;
}
```
↧
Closed Unassigned: AccessViolationException when drawing long line [20711]
Hello
I have a problem with an AccessViolationException on a long image. Is there a max size for the image?
I have created a small program that shows the problem:
```
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DrawLine(737, 11700); //crashes with AccessViolationException
DrawLine(737, 11000); //renders ok
}
private void DrawLine(int w, int h)
{
var bmp = BitmapFactory.New(w, h);
using (bmp.GetBitmapContext())
{
bmp.DrawLine(0, 0, 0, h-1, Color.FromRgb(0, 0, 0));
}
image1.Source = bmp;
}
```
Comments: Yes, there's a limit with the WriteableBitmap class and you are over it. ;)
I have a problem with an AccessViolationException on a long image. Is there a max size for the image?
I have created a small program that shows the problem:
```
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DrawLine(737, 11700); //crashes with AccessViolationException
DrawLine(737, 11000); //renders ok
}
private void DrawLine(int w, int h)
{
var bmp = BitmapFactory.New(w, h);
using (bmp.GetBitmapContext())
{
bmp.DrawLine(0, 0, 0, h-1, Color.FromRgb(0, 0, 0));
}
image1.Source = bmp;
}
```
Comments: Yes, there's a limit with the WriteableBitmap class and you are over it. ;)
↧
Created Unassigned: Blit doesn't work well with transparent PNG images [20713]
Hello
I am trying to apply an transparent image (in png format) over background image. The result is not very good as applied image has too much artifacts over it.
It is known problem?
I am making an application for Windows 8.1 RT.
```
img.Blit(r, talisman, new Rect(0, 0, talisman.PixelWidth, talisman.PixelHeight));
```
Using WriteableBitmapExtensions.BlendMode.Alpha doesn't help at all. When I put both images i XAML one over another, I see no artifacts.
I am trying to apply an transparent image (in png format) over background image. The result is not very good as applied image has too much artifacts over it.
It is known problem?
I am making an application for Windows 8.1 RT.
```
img.Blit(r, talisman, new Rect(0, 0, talisman.PixelWidth, talisman.PixelHeight));
```
Using WriteableBitmapExtensions.BlendMode.Alpha doesn't help at all. When I put both images i XAML one over another, I see no artifacts.
↧
↧
New Post: [SOLVED]FillEllipse() breaks for large ellipses
I would argue that this fix should be in the official release. Does it have a negative impact on performance?
Drawing large ellipses is not that uncommon nowadays.
Drawing large ellipses is not that uncommon nowadays.
↧
New Post: Draw rotated ellipse?
I need to draw rotated ellipses. It seems this is not supported by the library. How can I extend DrawEllipse with this feature? (Performance is top priority.)
Please advise!
Please advise!
↧
New Post: Draw rotated ellipse?
What do you mean rotated? If you rotate throught the z axis, then just provide different x, y value, you can compute those with an angle feeding into sin and cos.
↧
New Post: Draw rotated ellipse?
I want to simulate this WPF code:
<Ellipse.RotateTransform>
<RotateTransform Angle="30" />
</Ellipse.RotateTransform>
Thus, rotating around the center of the ellipse. I suppose that's the Z axis. Are you saying that x and y should be multiplied with cos(30 deg) and sin(30 deg) inside the loop?
<Ellipse.RotateTransform>
<RotateTransform Angle="30" />
</Ellipse.RotateTransform>
Thus, rotating around the center of the ellipse. I suppose that's the Z axis. Are you saying that x and y should be multiplied with cos(30 deg) and sin(30 deg) inside the loop?
↧
↧
New Post: Draw rotated ellipse?
What you want is a rotation after, so use the WBX RotateFree method after drawing the shape to the WB.
↧
New Post: Draw rotated ellipse?
And if there are multiple ellipses? Do I need one WBX for each ellipse that will later be combined into one larger WBX?
↧
New Post: How to handle very large Images?
Hallo,
is it possible to load image files which will need more that 2 Gb of Ram?
I found out that I can create a Writablebitmap which is over 2Gb with .net 4.5 like that.
new WriteableBitmap(30000, 30000, 96, 96, PixelFormats.Pbgra32, null);
But unfortunately I could not load a Image file with these dimensions from my hdd. :(
is it possible to load image files which will need more that 2 Gb of Ram?
I found out that I can create a Writablebitmap which is over 2Gb with .net 4.5 like that.
new WriteableBitmap(30000, 30000, 96, 96, PixelFormats.Pbgra32, null);
But unfortunately I could not load a Image file with these dimensions from my hdd. :(
↧
New Post: How to handle very large Images?
Yep,it's too big. There's a limitation you can find at MSDN.
↧
↧
New Post: drawing outside the boundaries
hi,
first, this is a really great extension!
my problem is with drawing a shape(any shape type) outside my boundaries.
i created a writablebitmap instance in the size of 20,20.
now i want to draw a rectangle from 15,0 to 35,40.
i know its out the area... , its done due to good reasons.
when trying to draw this shape i see its drawing extra lines.
any way to avoid this ?
regards.
benny.
first, this is a really great extension!
my problem is with drawing a shape(any shape type) outside my boundaries.
i created a writablebitmap instance in the size of 20,20.
now i want to draw a rectangle from 15,0 to 35,40.
i know its out the area... , its done due to good reasons.
when trying to draw this shape i see its drawing extra lines.
any way to avoid this ?
regards.
benny.
↧
New Post: drawing outside the boundaries
Yes, it will be clamped to the boundaries. Maybe you can use the DrawLine and just use two lines? Or just use the source code, change the boundary check and use your custom build of WBX. :)
↧
New Post: drawing outside the boundaries
mm, im drawing circles aslo.
any idea ?
any idea ?
↧