PROCEDURE Rotate(ImageFile,OutName,angle)
DECLARE INTEGER GdipLoadImageFromFile IN gdiplus.DLL STRING wFilename, INTEGER @nImage
DECLARE INTEGER GdipSaveImageToFile IN gdiplus.DLL INTEGER nImage, STRING wFilename, STRING qEncoder, STRING 小学英语五年级下册
DECLARE INTEGER GdipGetImageHeight IN gdiplus.dll INTEGER img,INTEGER @ imgheight
DECLARE INTEGER GdipGetImageWidth IN gdiplus.dll INTEGER img,INTEGER @ imgwidth
DECLARE INTEGER GdipDispoImage IN gdiplus.dll INTEGER img教师节国旗下讲话稿
DECLARE INTEGER GdipRotateWorldTransform IN gdiplus.dll Long,Single,long
DECLARE INTEGER GdipTranslateWorldTransform IN gdiplus.dll Long,Single,Single,long
Declare INTEGER GdipDrawImageRect IN gdiplus.dll Long,Long,Single,Single,Single,Single
DECLARE INTEGER GdipGetImageGraphicsContext IN gdiplus.DLL INTEGER,INTEGER @
DECLARE INTEGER GdipCreateBitmapFromScan0 IN gdiplus.DLL INTEGER, INTEGER, INTEGER,INTEGER,STRING @, INTEGER @
DECLARE INTEGER GdipGraphicsClear IN gdiplus.DLL long,Long
DECLARE INTEGER GdipDeleteGraphics IN GdiPlus.dll INTEGER
nutritious
nGraphics=0
nImage1=0
nimage=0
GdipLoadImageFromFile(AnsiToUnCode(ImageFile),@nimage)
w=0
h=0
GdipGetImageWidth(nImage,@w)
GdipGetImageHeight(nImage,@h)
lcEncoder=0h01F47C55041AD3119A730000F81EF32E中秋快乐 英文
SinAngle=SIN(DTOR(angle))
CosAngle=COS(DTOR(angle))
DO CASE
CASE angle<=90
w1=w*CosAngle+h*SinAngle
h1=h*CosAngle+w*SinAngle
greece
w2=h*SinAngle
h2=0
CASE angle>90 AND angle<=180
chris hughesw1=h*SinAngle-w*CosAngle
h1=w*SinAngle-h*CosAngle
w2=h*SinAngle-w*CosAngle
h2=-h*CosAngle
CASE angle>180 AND angle<=270
w1=-(w*CosAngle+h*SinAngle)
h1=-(h*CosAngle+w*SinAngle)
npr news
w2=-w*CosAngle
英文翻译器在线翻译h2=-h*CosAngle-w*SinAngle
OTHERWISE
w1=w*CosAngle-h*SinAngle
h1=h*CosAngle-w*SinAngle
w2=0
h2=-w*SinAngle
ENDCASE
GdipCreateBitmapFromScan0(w1,h1,0,925707,0,@nImage1)
GdipGetImageGraphicsContext(nImage1,@nGraphics)
GdipRotateWorldTransform(nGraphics,angle,1)
GdipTranslateWorldTransform(nGraphics,w2,h2,1)
GdipGraphicsClear(nGraphics,-1)
GdipDrawImageRect(nGraphics,nImage,0,0,w,h)
GdipSaveImageToFile (nImage1, AnsiToUnCode(OutName), lcEncoder,Null)
GdipDeleteGraphics(nGraphics)
fun怎么读GdipDispoImage(nImage1)
GdipDispoImage(nImage)
PROCEDURE AnsiToUnCode(_InStr)
duke
DECLARE Long MultiByteToWideChar In kernel32 Long iCodePage, Long dwFlags, String @ lpStr, Long iMultiByte,String @ lpWideStr, Long iWideChar
InLen=Len(_InStr)
OutLen=2*InLen+1
_OutStr=Replicate(Chr(0),OutLen)
MultiByteToWideChar(0,0,_InStr,InLen,@_OutStr,OutLen)
RETURN _OutStr