-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF Font Scaling Problem with Render Target Bitmap at Format1bppIndexed #346
Comments
Hi Blair Wang, Do I need to clone repository of Git and its fixed there? Please let me know. Thanks. |
Smooth text rendering on a 1bpp bitmap is rather contradictory. 1bpp is black & white so you basically end up drawing up text without any kind of antialiasing. |
@vsfeedback It's recommended to use |
@walterlv @vsfeedback is a bot that shuffles bugs from the VS Feedback site to GitHub. WPF doesn't own the code to it, but we'll bring up your suggestion to them. There might be specific reasons they don't want to embed images like that, perhaps to cut down traffic. |
Out of curiousity, why is here the correct place for this issue? |
This is still a valid place to put all WPF related issues. The fact that it happens in .Net Framework 4.6.1 just means we might get to it after the initial release, since we're focusing on ensuring parity right now. Presumably this is still an issue in the netcore3 version of WPF, @ssalmanshah have you been able to confirm that? |
Hi Steven,
Thanks for the update.
We are using .Net Framework 4 and yes this is happening in all WPF versions
until now.
In the attached project we can clearly see it.
…On Thu, Apr 4, 2019 at 6:10 PM Steven Kirbach ***@***.***> wrote:
This is still a valid place to put all WPF related issues. The fact that
it happens in .Net Framework 4.6.1 just means we might get to it after the
initial release, since we're focusing on ensuring parity right now.
Presumably this is still an issue in the netcore3 version of WPF,
@ssalmanshah <https://github.com/ssalmanshah> have you been able to
confirm that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#346 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AUFMpX_dA6D7BtaOwNeDbNT7XEOYgn_Qks5vdfnCgaJpZM4a1yPx>
.
--
Syed Salman Sattar Shah.
Microsoft Certified Professional
PH # +92333-5204489
|
It's still not clear how do you expect this to work. You are basically rendering text without antialiasing. It's simply not going to look smooth. |
Basically its beyond Anti aliasing, if you try generate 1 format Bpp image
while dragging it give you lag on every font.
…On Fri, Apr 5, 2019 at 10:58 AM mikedn ***@***.***> wrote:
It's still not clear how do you expect this to work. You are basically
rendering text without antialiasing. It's simply not going to look smooth.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#346 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AUFMpcprlYpWLFFjn_ZUQer-Ow-iPoLNks5vduX4gaJpZM4a1yPx>
.
--
Syed Salman Sattar Shah.
Microsoft Certified Professional
PH # +92333-5204489
|
As far as I can tell the lag has nothing to do with 1bpp images and fonts, it's just the consequence of the way the image is updated - on a timer that fires every 200ms. |
But Image should be smooth every time as this is doing with other image
generation formats.
And more to it stays in that partial rendered position even after multiple
refreshes, so this is WPF conversion issue with Format 1 BPP.
…On Fri, Apr 5, 2019 at 12:20 PM mikedn ***@***.***> wrote:
As far as I can tell the lag has nothing to do with 1bpp images and fonts,
it's just the consequence of the way the image is updated - on a timer that
fires every 200ms.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#346 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AUFMpU_StXIz_-XheFyepS75BPQxfsQtks5vdvlSgaJpZM4a1yPx>
.
--
Syed Salman Sattar Shah.
Microsoft Certified Professional
PH # +92333-5204489
|
yes the image on the right is not workable for me as I only need black and
white that can be done by removing background, but I need assurance that it
did not have noise in dragging at different points.
…On Fri, Apr 5, 2019 at 10:59 PM mikedn ***@***.***> wrote:
But Image should be smooth every time as this is doing with other image
generation formats.
Hmm, can't seem to reproduce this. For me things are pretty smooth with a
timer interval of 30ms. Changing the bitmap format doesn't seem to have any
effect.
That said, the format conversion code that you're using is pretty
convoluted and it involves System.Drawing. You could try to use
FormattedConvertedBitmap instead of all that:
DiagramImage.Source = new FormatConvertedBitmap(targetBitmap, PixelFormats.BlackWhite, null, 0);
though it produces a different image and that may be a problem for you.
[image: image]
<https://user-images.githubusercontent.com/9973420/55647185-b0fcde00-57e5-11e9-88ef-38d78258f0b0.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#346 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AUFMpVkIp34NNu4B1VnABymRu6cxXr4fks5vd48NgaJpZM4a1yPx>
.
--
Syed Salman Sattar Shah.
Microsoft Certified Professional
PH # +92333-5204489
|
Please see variation of middle image in this video |
I am using .Net framework 4.6.1 and faced following scaling problem in Arial Font.
Below image is generated with same program at DPI 96 for [100% windows 10 Scaling] and
DPI 120 for [125% recommended windows 10 Scaling]
In the result we can clearly see non homogeneity in rendering
I am also attaching project file,
You can experience same with program and executable (Its based on Arial Font)
Steps to reproduce:
Drag/move canvas elements on left and you will see Format1bppIndexed Image
image generated on left side.
All I want is to have homogeneous and smooth text rendering under different windows 10 scaling when rendering target bitmap @ Format1bppIndexed from WPF Element.
I am also attaching solution for reproducing,
scalingissuewpf.zip
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/449544/wpf-font-scaling-problem-with-render-target-bitmap.html
VSTS ticketId: 789260
These are the original issue comments:
(no comments)
These are the original issue solutions:
(no solutions)
The text was updated successfully, but these errors were encountered: