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



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.

"carsten.unterberg@xxxxxxxxxxxxxx" wrote:

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

.



Relevant Pages

  • System.Drawing.Graphics.DrawImage seems to be not exact...
    ... I sliced that Bitmap in nine parts ... top and bottom middlepart ... middlepart has a width of scaled bitmap - 10px and a height of 5px, ... if I want to scale the new bitmap I think smaller than the ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Scale bitmaps using GDI+
    ... "Michael Phillips, Jr." ... In order to scale an indexed bitmap, ... The approach is the same but you use GDI instead of gdi+. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Scale bitmaps using GDI+
    ... You cannot instantiate a Graphics object from an indexed bitmap ... In order to scale an indexed bitmap, ... Use gdi+'s jpeg encoder to save your scaled bitmap. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Print Preview colors
    ... Printing goes fine at every scale. ... // make compatible dc for bitmap selection ... interBM.CreateCompatibleBitmap;// final sizes ... // put the memory image into the main window DC ...
    (microsoft.public.vc.mfc)
  • Re: Scale a vector
    ... I need to resize a one-dimensional array. ... is greater than the width of the original bitmap. ... The array lenght must be the same, so I've to scale RGB proj. ... the value of the middle pixel, I think the solution is basically the ...
    (microsoft.public.dotnet.languages.csharp)