Jump to content

gdip rotate image


tic
 Share

Recommended Posts

I have tried several methods to take an image and rotate it (not place it onto another) and none seem to work so far. can anyone point me in the right direction?

I can load the image fine and display it, but it is not rotated.

I am using

GdipRotateWorldTransform

then GdipTranslateWorldTransform

and finally GdipDrawImageRectRectI

Link to comment
Share on other sites

not place it onto another

I need to get a handle to a graphic object without that object being another image. i created this, but not sure if it works:

Func _GDIPlus_CreateBitmap($Width, $Height, $Format)
    Local $aResult
    
    $aResult = DllCall($ghGDIPDll, "int", "GdipCreateBitmapFromScan0", "int", $Width, "int", $Height, "int", 0, "int", $Format, "hwnd", 0, "int*", 0)
    Return SetError($aResult[0], 0, $aResult[6])
EndFunc;==>_GDIPlus_CreateBitmap

and then need to place the image rotated into that "blank canvas" and save with a transparent background.

Edited by tic
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...