System.Drawing.Graphics.DrawImage seems to be not exact...

  • Thread starter Thread starter carsten.unterberg
  • Start date Start date
C

carsten.unterberg

Hey everybody,

I've a little nice problem here. I want to scale a bitmap, everything
seems to be OK, but...

I sliced that Bitmap in nine (9) parts
- 4 corners (unscaled)
- top and bottom middlepart (only horizontal scaled)
- left and right middlepart (only vertical scaled)
- middlepart (horizontal and vertical scaled)

The 4 corners has a width and height of 5 px, top and bottom
middlepart has a width of scaled bitmap - 10px and a height of 5px,
left and right middlepart has a width of 5px and a height of the
scaled bitmap - 10px. The middlepart has a width and a height of the
scaled bitmap - 10px.

So, if I want to scale the new bitmap I think smaller than the
original on, everythink seems to be OK, but when want to scale it
larger, I got some problems with the top, bottom, left and right
middlepart. It looks like that the starting postions of the bitmap
parts had relocated by its own or evrythink else.

Does anybody of your had the some problems or the is problem between
my ears?

Thanks a lot...

Carsten
 
You would need to provide your drawing code. You should be able to use
DrawImage using the Graphics object to scale sections, but it is impossible
to understand what you are doing without code.

Regard,
Rick D.
 
Back
Top