L
Loren Pechtel
I suspect screen settings. When I set my display settings really
poorly, then I see what you observe. My normal settings are 1680x1050
32 bit color.
3x 1280x1024 @ 32bit.
I suspect screen settings. When I set my display settings really
poorly, then I see what you observe. My normal settings are 1680x1050
32 bit color.
You've yet to establish it's _not_ drawing what Mike is seeing.
Visual inspection isn't good enough. Just because you've drawn a bitmap
a certain way, that's no guarantee it will be presented on the screen
that way.
Loren said:Confirmed--it's drawn right, rendered wrong. It doesn't take blowing
it up to find, either.
Ok, I've been barking up the wrong tree. What could be causing the
errant display?
When stripes turn into a blob instead it's quite obvious.
I can see fine alternated lines on both on both 1280x1024 on a old Dell
monitor, and 1920x1200 on a little newer Samsung SyncMaster. BUT if I change
the SyncMaster to 1280 x 1024, then I obtain ugly thick horizontal dark bars
alternating with fine light ones BECAUSE 1280x1024 IS NOT a recommended
resolution for it. Nothing to do with C#, DotNet, the driver, the video
card. In fact, capturing the screen in 1280x1024, saving the file, changing
back the resolution to the recommended one by Samsung for that monitor, and
then displaying the captured bitmap in that new resolution... it shows ok,
the ugly pattern has disappear! Or sliding the image from the Samsung at
1280x1024 onto the Dell also at 1280x1024 (which is the recommended one for
that particular Dell), and the image is drawn as intended!
So my recommendation, try to set the resolution to the recommended one by
the MONITOR maker, and if you have lost the doc, try different resolutions
and keep the one which look best. No code involved.
Lots of things. With a concise-but-complete code example, we could at
least examine how you're using .NET and see whether there's anything
there that would cause the problem. My guess is that it will turn out
to be a system configuration issue, with nothing at all to do with C# or
.NET (in which case, you'll want to try to reproduce similar behavior
with a delivered application -- e.g. WordPad, Paint, etc. -- so that you
can repost your question in a different context, in a different forum).
Obviously, the first thing should be to review everything you're doing
in terms of presenting the bitmap on the screen, to see if you can find
any code or Designer settings you might have enabled that cause some
scaling to occur.
Of course, if it _is_ a configuration issue -- that is, you've posted a
concise-but-complete code example and several people have confirmed it
works fine on other computers -- then one option is to just forget about
it, at least for the moment.After all, if the code is fine, you
can get on with the rest of the program rather than worrying about this
thing.![]()
Try to change the resolution then.
Or use a texture brush.
As you said, it is between the bitmap, which is ok, and the screen. That
betweeness includes the video card and the monitor driver. If you captured
the image, you read what is in the video card (I assume the monitor memory
is write only in most cases), and it seems to prove that the image is ok
there too. So even if you are in native resolution, maybe you use generic
driver for the monitor, rather than the manufacturer one? Furthermore, as
proven by the image I posted (which was captured by an external camera),
your code ***works*** fine. Can you try on another PC?
A texture can repeats itself (wrap mode) to fill variable size area, rather
than being limited to enlarge its original 'pixels' to fit the area, and
will even fill convex area with matching the pattern (example, painting a
T, the texture in the steam is aligned with the texture in the flanges,
automatically... if you use the same brush to paint). See "Pro .Net 2.0
Graphics Programming", by Eric White, at Apress, pp49+
Loren said:But when I save the bitmap and load it with another program *ON THE
SAME MONITOR* it works.
Thus the system is messing with it (probably scaling it on the x-axis)
somewhere between the bitmap and the screen. [...]