Questions tagged [rendertargetbitmap]
The RenderTargetBitmap class, part of the .NET Framework (from version 3.0), converts a System.Windows.Media.Visual object into a bitmap.
rendertargetbitmap
126
questions
0
votes
1
answer
43
views
WPF, ListView. RenderTargetBitmap - how to render whole ListView, not limited to screen
I have ListView, which displays some pictures. Not all pictures are visible on screen (in Window). I want to make something like 'contact sheet' - all pictures.
I got ScrollViewer from ListView, and ...
0
votes
1
answer
40
views
Problem Creating png image of TextBlock using RenderTargetBitmap in WPF
When using RenderTargetBitmap to generate a PNG file from a TextBlock that is a child of a Canvas, the text is stretched to match the width of the TextBlock. The TextBlock has a TextAlignment set to '...
-1
votes
1
answer
73
views
How do I get a Visual (e.g. a UserControl) to be ready for copying by a RenderTargetBitmap?
The question has now been answered in a comment.
Original question:
The following is not enough:
this.Background = Brushes.Yellow;
RenderTargetBitmap bmp = new RenderTargetBitmap(...);
Measure(...);
...
0
votes
1
answer
92
views
JpegBitmapEncoder / RenderTargetBitmap - excessive sharpening since .net 2 vs 4.7.2
I've been working on migrating legacy ASP.Net/C# system to Azure.
Initially just changing the minimal amount possible, but part of that is moving to updated .Net framework (2/3/3.5 => 4.7+)
Part of ...
1
vote
1
answer
158
views
UWP - Use RenderTargetBitmap and only capture the visual area
I want to use RenderTargetBitmap to just capture the visual area in UWP app.
But the result is to capture the full element image in canvas that include offscreen's part.
This is my application Image.
...
1
vote
1
answer
88
views
UWP RenderTargetBitmap.RenderAsync Hangs
I wrote a function to rasterize stroke data from an InkCanvas, but for some reason renderBMP.RenderAsync(...) hangs indefinitely. Any advice?
RenderTargetBitmap rasterizePage(int pageNumber) {
...
0
votes
1
answer
131
views
Cancel long running render operation in WPF
Is there any way to cancel a possibly long running render operation in WPF?
In my case, I want to render a complex control (in a non-UI-thread) to a bitmap.
var bitmap = new RenderTargetBitmap((int)...
1
vote
0
answers
82
views
While converting the circle or ellipse element to the image using the RenderTargetBitmap gets blank image
Description:
Need to save the specific circular portion of the image using the RenderTargetBitmap gets blank image.
Steps to reproduce:
Load the image control with the image.
Save the image source ...
2
votes
2
answers
986
views
How can I draw a Polyline onto an Image (WPF)
I've tried a few different approaches to this, but can't seem to get a combination that works.
Creating WPF app in C#, Visual Studio.
System.Windows.Shapes.Polyline works really nicely to draw into a ...
0
votes
1
answer
93
views
How to capture the rotated image to stream?
I am using the UWP image control.
I have rotated the image to 45 degrees by applying the Rotate transform(Angle = 45) now I want to convert the rendered rotated image to stream. So I have tried the ...
4
votes
2
answers
311
views
RenderTargetBitmap using a PngBitmapEncoder is generating blank images on a virtual machine when there is no display, Windows 10 Version 1903
Our .NET application has the ability to generate .png files which are screenshots of a WPF Canvas.
This can be triggered from a client and handled by another of our applications (essentially something ...
1
vote
0
answers
136
views
Is there any possible to convert the UI elements into multiple images(UWP)
I try to save the UI elements into an image file. but we have More UI elements(like 100 list of rows). So the image quality is very poor. Is there any possibility to convert the UI elements into ...
0
votes
1
answer
226
views
Issues with MediaPlayer and RenderTargetBitmap getting a frame image from video
I'm trying to use MediaPlayerto get a frame from video as an image.
MediaPlayer _mediaPlayer = new MediaPlayer();
_mediaPlayer.ScrubbingEnabled = true;
_mediaPlayer.Open(new Uri("c:\\Sample.mp4&...
1
vote
1
answer
259
views
RenderTargetBitmap takes an empty image of my UserControl
I am working on a weekly scheduler on WPF.
I took care of everything but I have a problem.
RenderTargetBitmap takes an empty image of my UserControl, I also tried element.ApplyTmeplate(); it didn't ...
-1
votes
1
answer
836
views
WPF C# Capture Canvas image with semi-transparent background [duplicate]
UPDATE: Is not a duplicate.
My question is not how to take a screenshot. I know this, but it's not what I need. I can have others controls over the Canvas and I don't want to capture them but just ...