Click here to Skip to main content
15,886,830 members

Render target bitmap quality issues

bat3a asked:

Open original thread
ok, it's a simple case, i rendered a viewport3d object using RenderTargetBitmap @ resolution 600 * 600 @ 96 dpi, the problem is there are a big deference in quality between the view port and the saved image:

here are some code:

'rendering viewport3D to image
Dim viewportPlate As New RenderTargetBitmap(600, 600, 96 , 96 , PixelFormats.Pbgra32)
viewportPlate.Render(viewport3d)

'path to save
Dim path As String = imgSave
Dim fs As FileStream = New FileStream(path, FileMode.Create)

'encoding to PNG and saving
Dim encoder As BitmapEncoder = New PngBitmapEncoder()
encoder.Frames.Add(BitmapFrame.Create(viewportPlate))
encoder.Save(fs)




now i tried to render to a larger resolution then scale it down and it got better, but a new problem arises of the big render time (because of the software rendering) and the out of memory issues!!!

i'm using .net 4.0, is there a clear way to achieve a better anti-aliased solutions and render times, as it was for GDI+ which i consider is a bless besides WPF?????

any tips will be welcome :)
Tags: Visual Basic, WPF

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900