如题$Wallpaper = @ScriptDir & '\Wallpaper\' & IniRead('Config.ini', 'Wallpaper', 'Wallpaper', 0)
$Wallpaper = @ScriptDir & '\Wallpaper\' & IniRead('Config.ini', 'Wallpaper', 'Wallpaper', 0)
$hImage = _GDIPlus_BitmapCreateFromFile($Wallpaper)
$Dimension = _GDIPlus_ImageGetDimension($hImage)
If $Dimension[0] <> @DesktopWidth Or $Dimension[1] <> @DesktopHeight Then
_PicChangeSize($Wallpaper, @ScriptDir & '\' & @DesktopWidth & 'x' & @DesktopHeight & '.jpg', @DesktopWidth, @DesktopHeight)
_WinAPI_DeleteObject($hImage)
$hImage = _GDIPlus_BitmapCreateFromFile(@ScriptDir & '\' & @DesktopWidth & 'x' & @DesktopHeight & '.jpg')
EndIf
正常运行时无问题,当设为开机启动时会报错。
|