Hier zwei kleine Skripte zum Jahreswechsel!
Zoomquilt:
AutoIt
;coded by UEZ build 2018-01-10, idea and images taken from http://zoomquilt.org/
;thanks to spudw2k for the MouseZoom function
#pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico")
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /pe /rm
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3"
#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
_GDIPlus_Startup()
Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit, $iW, $iH
Global Const $sTitle = "GDI Image Zoom v2.1.2 coded by UEZ"
AutoItSetOption("GUIOnEventMode", 1)
Downloader()
GDIPlus_ZoomImage()
AutoItSetOption("GUIOnEventMode", 0)
_GDIPlus_Shutdown()
Func GDIPlus_ZoomImage($bMultimonitor = False)
$bExit = False
Local $i, $aImages[46], $hImage, $hObj
ConsoleWrite("Loading images from local disk..." & @CRLF)
Local $fTimer = TimerInit()
For $i = 0 To UBound($aImages) - 1
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Images\TheZoomquilt" & StringFormat("%02i.jpg", $i))
$aImages[$i] = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
_GDIPlus_ImageDispose($hImage)
Next
ConsoleWrite(UBound($aImages) & " images loaded in " & TimerDiff($fTimer) & " ms" & @CRLF)
Local $tDim = DllStructCreate($tagBITMAP)
DllCall("GDI32.dll", 'int', 'GetObject', 'int', $aImages[0], 'int', DllStructGetSize($tDim), 'ptr', DllStructGetPtr($tDim))
$iW = $tDim.bmWidth
$iH = $tDim.bmHeight
Local $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]"), $aFullScreen[4], $iW_Dt, $iH_Dt
$aFullScreen = WinGetPos($hFullScreen)
If $bMultimonitor Then
$iW_Dt = $aFullScreen[2]
$iH_Dt = $aFullScreen[3]
Else
$iW_Dt = @DesktopWidth
$iH_Dt = @DesktopHeight
$aFullScreen[0] = ""
$aFullScreen[1] = ""
EndIf
$hGUI = GUICreate($sTitle, $iW_Dt, $iH_Dt, $aFullScreen[0], $aFullScreen[1], $WS_POPUP, $WS_EX_TOPMOST)
GUISetState(@SW_SHOW, $hGUI)
GUISetCursor(16, 1)
;create canvas elements
Local Const $hDC = _WinAPI_GetDC($hGUI)
Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW_Dt, $iH_Dt)
Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC)
Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap)
Local Const $hMemDC = _WinAPI_CreateCompatibleDC($hDC)
_WinAPI_SetStretchBltMode($hDC_backbuffer, $STRETCH_DELETESCANS)
Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer)
_GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
_GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xFF000000), _
$hBrush_FPS = _GDIPlus_BrushCreateSolid(0xFFFFFFFF), _
$hFormat_FPS = _GDIPlus_StringFormatCreate(), _
$hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _
$hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _
$tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 130, 16)
$iFPS = 0
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About")
AdlibRegister("CalcFPS", 1000)
Local $a[3], $b = 1, $c, $x, $e, $y, $w, $h, $w2 = $iW_Dt / 2, $h2 = $iH_Dt / 2, $q, $r
If $iW_Dt > 1.5 * $iH_Dt Then
$q = $iW_Dt
$r = 0.75 * $iW_Dt
Else
$q = 1.5 * $iH_Dt
$r = 0.75 * $iH_Dt
EndIf
Do
For $e = 0 To 2
$a[$e] = $aImages[Mod(Floor($b) + $e, UBound($aImages))]
Next
$c = 2^(Mod($b, 1))
For $e = 0 To 2
$x = $w2 - $q / 2 * $c
$y = $h2 - $r / 2 * $c
$w = $q * $c
$h = $r * $c
$hObj = _WinAPI_SelectObject($hMemDC, $a[$e])
_WinAPI_StretchBlt($hDC_backbuffer, $x, $y, $w, $h, $hMemDC, 0, 0, $iW, $iH, $SRCCOPY)
$c *= 0.5
Next
$b += MouseZoom()
IF $b < 0 Then $b = UBound($aImages) - $b
_GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS & " @ " & $iW_Dt & "x" & $iH_Dt & " px", $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS)
_WinAPI_BitBlt($hDC, 0, 0, $iW_Dt, $iH_Dt, $hDC_backbuffer, 0, 0, $SRCCOPY)
$iFPS += 1
If $bExit Then ExitLoop
Until Not Sleep(0)
AdlibUnRegister("CalcFPS")
;release resources
_GDIPlus_FontDispose($hFont_FPS)
_GDIPlus_FontFamilyDispose($hFamily_FPS)
_GDIPlus_StringFormatDispose($hFormat_FPS)
_GDIPlus_BrushDispose($hBrush_Clr)
_GDIPlus_BrushDispose($hBrush_FPS)
_GDIPlus_GraphicsDispose($hCanvas)
_WinAPI_SelectObject($hMemDC, $hObj)
_WinAPI_DeleteDC($hMemDC)
_WinAPI_SelectObject($hDC_backbuffer, $DC_obj)
_WinAPI_DeleteDC($hDC_backbuffer)
_WinAPI_DeleteObject($hHBitmap)
_WinAPI_ReleaseDC($hGUI, $hDC)
For $i = 0 To UBound($aImages) - 1
_WinAPI_DeleteObject($aImages[$i])
Next
GUIDelete($hGUI)
EndFunc ;==>GDIPlus_ZoomImage
Func MouseZoom()
;https://www.arduino.cc/reference/en/language/functions/math/map/
Local $iInput = MouseGetPos(1), $iInMin = 0, $iInMax = @DesktopHeight, $iOutMin = 1, $iOutMax = -1, $iStep = 0.025
Return (($iInput - $iInMin) * ($iOutMax - $iOutMin) / ($iInMax - $iInMin) + $iOutMin) * $iStep
EndFunc ;MouseZoom()
Func _Exit_About()
$bExit = True
EndFunc ;==>_Exit_About
Func CalcFPS() ;display FPS
$iShowFPS = $iFPS
$iFPS = 0
EndFunc ;==>CalcFPS
Func Downloader()
Local $i, $A = StringSplit("FUjD9hf gbHhxTR 8YyzJdR xP3aNkR 2Qi4fQr E6pW5Ky zmtWIBF Af7LtYp TuXy30d 3nKGLr2 hNoWscB mSBvv3K f4wJ70e mIt9XmM M4TkAyh P4L4qhd hNM6bTv VoT8JXM jqcGH0B DYVoN8n bOPQkOI NeaTfJ1 18ppMNr FZ3d8Jv HsoX2RP mjv4kzI 6rpJbef pySKauq WjNQYRV Ffooo8y Xei5XfD T5A415r LiV0VNB nGcwiO4 b1Gdjjy GE828iy eSQ7SLe 1mPyGgL GNtwJIr KxBlU7E aKXhms5 9Quu2wu Y07quDf r0yC5Qa 273fCkD 2wMyCUw FUjD9hf", " ", 2)
Local $sURL
For $i = 0 To UBound($A) - 1
If Not FileExists(@ScriptDir & "\Images\TheZoomquilt" & StringFormat("%02i.jpg", $i)) Then
If Not FileExists(@ScriptDir & "\Images") Then DirCreate(@ScriptDir & "\Images")
$sURL = "http://imgur.com/" & $A[Mod(20 + $i, 46)] & ".jpg"
ConsoleWrite("Downloading " & $sURL & ": " & InetGet($sURL, @ScriptDir & "\Images\TheZoomquilt" & StringFormat("%02i.jpg", $i), 8) & " bytes" & @CRLF)
ToolTip("Downloading images...Please wait! -> " & $i + 1 & " / " & UBound($A), MouseGetPos(0), MouseGetPos(1))
EndIf
Next
ToolTip("")
EndFunc ;==>Downloader
Alles anzeigen
Arkadia:
AutoIt
;coded by UEZ build 2018-01-10, idea and images taken from http://arkadia.xyz
;thanks to spudw2k for the MouseZoom function
#pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico")
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /pe /rm
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3"
#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
_GDIPlus_Startup()
Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit, $iW, $iH
Global Const $sTitle = "GDI Image Zoom v2.2.1 coded by UEZ"
AutoItSetOption("GUIOnEventMode", 1)
Downloader()
GDIPlus_ZoomImage()
AutoItSetOption("GUIOnEventMode", 0)
_GDIPlus_Shutdown()
Func GDIPlus_ZoomImage($bMultimonitor = False)
$bExit = False
Local $i, $aImages[49], $hImage, $hObj
ConsoleWrite("Loading images from local disk..." & @CRLF)
Local $fTimer = TimerInit()
For $i = 0 To UBound($aImages) - 1
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Images\Arkadia" & $i & ".jpg")
$aImages[$i] = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
_GDIPlus_ImageDispose($hImage)
Next
ConsoleWrite(UBound($aImages) & " images loaded in " & TimerDiff($fTimer) & " ms" & @CRLF)
Local $tDim = DllStructCreate($tagBITMAP)
DllCall("GDI32.dll", "int", "GetObject", "int", $aImages[0], "int", DllStructGetSize($tDim), "ptr", DllStructGetPtr($tDim))
$iW = $tDim.bmWidth
$iH = $tDim.bmHeight
Local $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]"), $aFullScreen[4], $iW_Dt, $iH_Dt
$aFullScreen = WinGetPos($hFullScreen)
If $bMultimonitor Then
$iW_Dt = $aFullScreen[2]
$iH_Dt = $aFullScreen[3]
Else
$iW_Dt = @DesktopWidth
$iH_Dt = @DesktopHeight
$aFullScreen[0] = ""
$aFullScreen[1] = ""
EndIf
$hGUI = GUICreate($sTitle, $iW_Dt, $iH_Dt, $aFullScreen[0], $aFullScreen[1], $WS_POPUP, $WS_EX_TOPMOST)
GUISetState(@SW_SHOW, $hGUI)
GUISetCursor(16, 1)
;create canvas elements
Local Const $hDC = _WinAPI_GetDC($hGUI)
Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW_Dt, $iH_Dt)
Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC)
Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap)
Local Const $hMemDC = _WinAPI_CreateCompatibleDC($hDC)
_WinAPI_SetStretchBltMode($hDC_backbuffer, $STRETCH_DELETESCANS)
Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer)
_GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
_GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xFF000000), _
$hBrush_FPS = _GDIPlus_BrushCreateSolid(0xFFFFFFFF), _
$hFormat_FPS = _GDIPlus_StringFormatCreate(), _
$hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _
$hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _
$tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 130, 16)
$iFPS = 0
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About")
AdlibRegister("CalcFPS", 1000)
Local $a[3], $b = 1, $c, $x, $e, $y, $w, $h, $w2 = $iW_Dt / 2, $h2 = $iH_Dt / 2, $q, $r
If $iW_Dt > 1.5 * $iH_Dt Then
$q = $iW_Dt
$r = 0.75 * $iW_Dt
Else
$q = 1.5 * $iH_Dt
$r = 0.75 * $iH_Dt
EndIf
Do
For $e = 0 To 2
$a[$e] = $aImages[Mod(Floor($b) + $e, UBound($aImages))]
Next
$c = 2^(Mod($b, 1))
For $e = 0 To 2
$x = $w2 - $q / 2 * $c
$y = $h2 - $r / 2 * $c
$w = $q * $c
$h = $r * $c
$hObj = _WinAPI_SelectObject($hMemDC, $a[$e])
_WinAPI_StretchBlt($hDC_backbuffer, $x, $y, $w, $h, $hMemDC, 0, 0, $iW, $iH, $SRCCOPY)
$c *= 0.5
Next
$b += MouseZoom()
IF $b < 0 Then $b = UBound($aImages) - $b
_GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS & " @ " & $iW_Dt & "x" & $iH_Dt & " px", $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS)
_WinAPI_BitBlt($hDC, 0, 0, $iW_Dt, $iH_Dt, $hDC_backbuffer, 0, 0, $SRCCOPY)
$iFPS += 1
If $bExit Then ExitLoop
Until Not Sleep(0)
AdlibUnRegister("CalcFPS")
;release resources
_GDIPlus_FontDispose($hFont_FPS)
_GDIPlus_FontFamilyDispose($hFamily_FPS)
_GDIPlus_StringFormatDispose($hFormat_FPS)
_GDIPlus_BrushDispose($hBrush_Clr)
_GDIPlus_BrushDispose($hBrush_FPS)
_GDIPlus_GraphicsDispose($hCanvas)
_WinAPI_SelectObject($hMemDC, $hObj)
_WinAPI_DeleteDC($hMemDC)
_WinAPI_SelectObject($hDC_backbuffer, $DC_obj)
_WinAPI_DeleteDC($hDC_backbuffer)
_WinAPI_DeleteObject($hHBitmap)
_WinAPI_ReleaseDC($hGUI, $hDC)
For $i = 0 To UBound($aImages) - 1
_WinAPI_DeleteObject($aImages[$i])
Next
GUIDelete($hGUI)
EndFunc ;==>GDIPlus_ZoomImage
Func MouseZoom()
;https://www.arduino.cc/reference/en/language/functions/math/map/
Local $iInput = MouseGetPos(1), $iInMin = 0, $iInMax = @DesktopHeight, $iOutMin = 1, $iOutMax = -1, $iStep = 0.025
Return (($iInput - $iInMin) * ($iOutMax - $iOutMin) / ($iInMax - $iInMin) + $iOutMin) * $iStep
EndFunc ;MouseZoom()
Func _Exit_About()
$bExit = True
EndFunc ;==>_Exit_About
Func CalcFPS() ;display FPS
$iShowFPS = $iFPS
$iFPS = 0
EndFunc ;==>CalcFPS
Func Downloader()
Local $sURL, $i
For $i = 0 To 48
If Not FileExists(@ScriptDir & "\Images\Arkadia" & $i & ".jpg") Then
If Not FileExists(@ScriptDir & "\Images") Then DirCreate(@ScriptDir & "\Images")
$sURL = "http://arkadia.xyz/images/arkadia" & $i & ".jpg"
ConsoleWrite("Downloading " & $sURL & ": " & InetGet($sURL, @ScriptDir & "\Images\Arkadia" & $i & ".jpg", 8) & " bytes" & @CRLF)
ToolTip("Downloading images...Please wait! -> " & $i + 1 & " / " & $i, MouseGetPos(0), MouseGetPos(1))
EndIf
Next
ToolTip("")
EndFunc ;==>Downloader
Alles anzeigen
Quelle der Inspirationen / Bilder: http://zoomquilt.org/, http://arkadia.xyz
Ist schon ziemlich krass, wie flüssig der Zoom im Browser läuft...
PS: Zu Risiken und Nebenwirkungen lesen Sie die Packungsbeilage und fragen Sie Ihren Arzt oder Apotheker!