回复 46# Duvet
我截图下来的bmp,实验失败,大侠帮看看。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ScreenCapture.au3>
$a = 497
$b = 54
_ScreenCapture_Capture(@TempDir & "\GDIPlus_Image0.bmp",0,0,$a,$b)
_Photo_Flip(@TempDir & "\GDIPlus_Image0.bmp",1,@TempDir & "\GDIPlus_Image1.bmp")
#include <GUIConstantsEx.au3>
#Include <WinAPI.au3>
$Form1 = GUICreate("",497,54)
$t = _WinAPI_LoadImage(0,@TempDir & "\GDIPlus_Image1.bmp",0,0,0,0x2010)
$d = DllOpen(@ScriptDir&"\waterctrl.dll")
$d = DllCall($d,"int","enablewater","HWND",$Form1,"int",0,"int",0,"ptr",$t,"int",3,"int",50)
GUISetState()
While GUIGetMsg() <> $GUI_EVENT_CLOSE
Sleep(100)
WEnd
Func _Photo_Flip($Path,$Dire,$OutPath)
If Not FileExists($Path) Then Return -1
$Jpeg=_Photo_OpenCalss($Path)
With $Jpeg
If $Dire=1 Then
.FlipV
Else
.FlipH
EndIf
.Save($OutPath)
EndWith
$Jpeg.Close
EndFunc;;;;;;;上下左右翻转 _Photo_Flip("7.jpg","","x.jpg")
Func _Photo_OpenCalss($Path)
If Not FileExists($Path) Then Return -1
$Jpeg = ObjCreate("Persits.Jpeg")
If Not IsObj($Jpeg) Then
FileCopy(@ScriptDir&"\aspjpeg.dll",@SystemDir,1)
RunWait("Regsvr32 /s "& @SystemDir & "\aspjpeg.dll")
RegWrite("HKLM\SOFTWARE\Persits Software\AspJpeg\RegKey","","REG_SZ","48958-77556-02411")
$Jpeg = ObjCreate("Persits.Jpeg")
EndIf
If $Jpeg.Version = "1.9.0.0" Then $Jpeg.PreserveMetadata = True
$Jpeg.Interpolation=2 ;;;图像加强(0-2)
$Jpeg.Quality=100 ;;;;图片质量(0-100)
$Jpeg.Open ($Path)
Return $Jpeg
EndFunc
|