Sign in to follow this  
Followers 0
tic

gdip rotate image

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

dont worry. i solved it. i decided to do it in ahk though as i do not like the syntax of au3, so no point in me posting the solution here

Edited by tic

Share this post


Link to post
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
Sign in to follow this  
Followers 0