Displaying pixel in a bitmap as a rectangular pixel

P

Piotrekk

Hi

I i am zooming part of an image ( 15x15 px for example ). What i see
are pixels ( but kinda renderred or something like that ) i nnot
rectangular form. I need to see them as rectangular pixels - to
clearly see differences between colours.
Can anyone of you help me with that?
PK
 
N

Nicholas Paldino [.NET/C# MVP]

In order to do this, you will basically have to scale them to a size
where you can make out individual pixels. You will want to look at the
Graphics class, and the DrawImage method on the Graphics class which you
will use to redraw the image onto a larger image, zoomed appropriately.

What is appropriate, however, is up to the user, as what point each user
can differentiate individual pixels will be different.
 
P

Piotrekk

I have tried to think about your method. DrawImage however doesn't
change anything -> i am passing image as an argument together with
client rectangle ...
Image is resized but pixels remain unchanged....
 
P

Peter Duniho

Piotrekk said:
I i am zooming part of an image ( 15x15 px for example ). What i see
are pixels ( but kinda renderred or something like that ) i nnot
rectangular form. I need to see them as rectangular pixels - to
clearly see differences between colours.

Can you be more specific about the issue?

AFAIK, assuming the CompositingMode of the Graphics instance is
unchanged (or possibly set to HighSpeed), and you draw a square image
into a square area (e.g. draw a 15x15 image to a 30x30 area), the output
should be enlarged square pixels.

What specifically are you doing, and why isn't it working for you?
Posting a concise-but-complete example of code that reliably reproduces
the problem will allow for the best answers to your question.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top