Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#24

AW: Resample oder Resize mit GDI+

  Alt 2. Dez 2010, 18:02
Du mußt graphics vorher neu erstellen
und dann kenn ich nur GdipDrawImageRectRectI

Sample!
Delphi-Quellcode:
    if GdipCreateFromHDC(hDCdest, Graphics) = 0 then
    begin
      GdipCreateBitmapFromHBITMAP(hBM2, 0, Pointer(Img));
      GdipSetInterpolationMode(Graphics, 2);
      GdipDrawImageRectRectI(Graphics, Img, xDest, yDest,
        xWidth, yHeight, 0, 0, xDiv, yDiv, 2, nil, False, nil);
      GdipDeleteGraphics(Graphics);
      GdipDisposeImage(Img);
    end;
    skDeleteObject(hBM2);
    DeleteDC(hDC2);
EDIT:
Definition von GdipDrawImageRectRectI ist..
GdipDrawImageRectRectI Graphics, Img, 0, 0, newwidth, newheight, 0, 0, origwidth, origheight, UnitPixel


gruss

Geändert von EWeiss ( 2. Dez 2010 um 18:20 Uhr)
  Mit Zitat antworten Zitat