| 1 | ;#include<GDIPlus.au3>
|
|---|
| 2 | ;Global $src, $dst, $exit = True
|
|---|
| 3 | ;Global $himage, $sclsid, $result
|
|---|
| 4 | ;ProcessSetPriority(@AutoItPID, 3)
|
|---|
| 5 | ;Opt('OnExitFunc', 'Exit_All')
|
|---|
| 6 | ;Opt('MustDeclareVars', 1)
|
|---|
| 7 | ;If @Compiled Then
|
|---|
| 8 | ; If $cmdline[0] = 2 Then
|
|---|
| 9 | ; $src = $cmdline[1]
|
|---|
| 10 | ; $dst = $cmdline[2]
|
|---|
| 11 | ; $exit = False
|
|---|
| 12 | ; EndIf
|
|---|
| 13 | ;EndIf
|
|---|
| 14 | ;If $exit Then
|
|---|
| 15 | ; ConsoleWrite('Error')
|
|---|
| 16 | ; Exit 0
|
|---|
| 17 | ;EndIf
|
|---|
| 18 | ;_GDIPlus_Startup()
|
|---|
| 19 | ;$himage = _GDIPlus_ImageLoadFromFile($src)
|
|---|
| 20 | ;$sclsid = _GDIPlus_EncodersGetCLSID('BMP')
|
|---|
| 21 | ;$result = _GDIPlus_ImageSaveToFileEx($himage, $dst, $sclsid)
|
|---|
| 22 | ;_GDIPlus_Shutdown()
|
|---|
| 23 | ;ConsoleWrite($result)
|
|---|
| 24 | ;Exit 0
|
|---|
| 25 | ;Func Exit_All()
|
|---|
| 26 | ; Exit 0
|
|---|
| 27 | ;EndFunc
|
|---|