1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. UEZ

Beiträge von UEZ

  • _GDIPlus_ImageCalcDif

    • UEZ
    • 5. November 2025 um 16:38

    Ich habe den Code oben aktualisiert. Mode 4 sollte auch so ähnliche Resultate liefern.

    Um diesen Thread nicht weiter zu missbrauchen, kann jemand einen neue Thread eröffnen, um den Code weiter zu behandeln, falls erwünscht, ansonsten mache ich jetzt einen Punkt zu meinem Code.

  • _GDIPlus_ImageCalcDif

    • UEZ
    • 4. November 2025 um 22:24

    Kannst du mal ein Beispiel posten, wie es mit Farbe aussieht?

  • _GDIPlus_ImageCalcDif

    • UEZ
    • 4. November 2025 um 00:06

    Passt gut hier rein - Differenz als Graustufe, wobei weiß = keine Differenz, je dunkler, desto größer die Differenz:

    AutoIt
    ;Coded by UEZ build 2025-11-05
    #include <Array.au3>
    #include <GDIPlus.au3>
    #include <MsgBoxConstants.au3>
    
    _GDIPlus_Startup()
    Global $hImage1, $hImage2
    Global $sImages = FileOpenDialog("Select 2 images", "", "Image (*.bmp;*.jpg;*.png;*.gif)", $FD_MULTISELECT)
    If @error Then _Exit("Nothing selected")
    Global $aFiles = StringSplit($sImages, "|", 2)
    If (UBound($aFiles) < 3) Then _Exit("Select at least 2 images")
    $hImage1 = _GDIPlus_ImageLoadFromFile($aFiles[1])
    If @error Then _Exit("Unable to load " & $aFiles[1])
    $hImage2 = _GDIPlus_ImageLoadFromFile($aFiles[2])
    If @error Then _Exit("Unable to load " & $aFiles[2])
    If (_GDIPlus_ImageGetWidth($hImage1) <> _GDIPlus_ImageGetWidth($hImage2)) Then _Exit("Width of both images are different")
    If (_GDIPlus_ImageGetHeight($hImage1) <> _GDIPlus_ImageGetHeight($hImage2)) Then _Exit("Height of both images are different")
    
    Global $iMode = 4
    Global $aDiff = _GDIPlus_ImageCompare($hImage1, $hImage2, $iMode)
    
    If $iMode = 1 Then Exit MsgBox($MB_SYSTEMMODAL, "Compared", "Equal: " & $aDiff & " / " & @extended & " ms")
    
    If $iMode = 2 Then
    	Global $iChk = MsgBox(BitOR($MB_SYSTEMMODAL, $MB_YESNO), "Information", "Found " & Round((UBound($aDiff) - 1) / ($aDiff[0][1] * $aDiff[0][2]) * 100, 2) & " % differences in " & Round($aDiff[0][0], 2) & " ms." & _
    							@CRLF & @CRLF & _
    							"Display the array with information")
    	If ($iChk = 6) Then _ArrayDisplay($aDiff, "Differences", Default, Default, Default, "Runtime / Coordinate (x,y)|Image1 Color|Image2 Color")
    	_Exit()
    	Exit
    EndIf
    ConsoleWrite($aDiff & " ms" & @CRLF)
    _Exit()
    
    Func _GDIPlus_ImageCompare($hImage1, $hImage2, $iMode = 1)
    	Local Const $iW = _GDIPlus_ImageGetWidth($hImage1), $iH = _GDIPlus_ImageGetHeight($hImage1)
    	If ($iW <> _GDIPlus_ImageGetWidth($hImage2)) Then Return SetError(1, 0, 0)
    	If ($iH <> _GDIPlus_ImageGetHeight($hImage2)) Then Return SetError(2, 0, 0)
    	Local $t = TimerInit()
    	Local $tBitmapData1 = _GDIPlus_BitmapLockBits($hImage1, 0, 0, $iW, $iH, $GDIP_ILMREAD, $GDIP_PXF32ARGB)
    	Local $tBitmapData2 = _GDIPlus_BitmapLockBits($hImage2, 0, 0, $iW, $iH, $GDIP_ILMREAD, $GDIP_PXF32ARGB)
    
        Local $pScan1 = DllStructGetData($tBitmapData1, "Scan0")
        Local $tPixel1 = DllStructCreate("uint[" & $iW * $iH & "];", $pScan1)
    	Local $iStride = Abs(DllStructGetData($tBitmapData1, "Stride"))
    
        Local $pScan2 = DllStructGetData($tBitmapData2, "Scan0")
        Local $tPixel2 = DllStructCreate("uint[" & $iW * $iH & "];", $pScan2)
    
    	Switch $iMode
    		Case 1
    			$iResult = DllCall("msvcrt.dll", "int:cdecl", "memcmp", "ptr", $pScan1, "ptr", $pScan2, "uint", DllStructGetSize($tPixel1))[0]
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			Return SetError(0, Int(TimerDiff($t)), $iResult = 0)
    		Case 2
    			If ($iW * $iH + 1) * 3 > 16 * 1024 ^ 2 Then Return SetError(3, 0, 0)
    			Local $iX, $iY, $iRowOffset, $iPixel1, $iPixel2, $c = 1, $aDiff[$iW * $iH + 1][3]
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX) ;get pixel color
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX) ;get pixel color
    					If $iPixel1 <> $iPixel2 Then
    						$aDiff[$c][0] = $iX & ", " & $iY
    						$aDiff[$c][1] = "0x" & Hex($iPixel1, 8)
    						$aDiff[$c][2] = "0x" & Hex($iPixel2, 8)
    						$c += 1
    					EndIf
    				Next
    			Next
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			$aDiff[0][0] = TimerDiff($t)
    			$aDiff[0][1] = $iW
    			$aDiff[0][2] = $iH
    			ReDim $aDiff[$c][3]
    			Return $aDiff
    		Case 3 ;Graustufen
    			If ($iW * $iH + 1) * 3 > 16 * 1024 ^ 2 Then Return SetError(4, 0, 0)
    			Local $stride = $iW * 4
    			Local $tDestBmp = DllStructCreate("uint color[" & $stride * $iH & "];")
    			Local $hBitmapDiff = _GDIPlus_BitmapCreateFromScan0($iW, $iH, $GDIP_PXF32ARGB, $stride, DllStructGetPtr($tDestBmp))
    			If @error Or Not $hBitmapDiff Then
    				_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    				_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    				Return SetError(5, @error, 0)
    			EndIf
    			Local $iX, $iY, $iRowOffset, $iPixel1, $iPixel2, $c = 1, $aDiff[$iW * $iH + 1][3], $a1, $a2, $r1, $r2, $g1, $g2, $b1, $b2, $dist3D, $dist4D, $alpha, $gamma = 0.1
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX) ;get pixel color
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX) ;get pixel color
    					$a1 = BitShift(BitAND($iPixel1, 0xFF000000), 24)
    					$a2 = BitShift(BitAND($iPixel2, 0xFF000000), 24)
    					$r1 = BitShift(BitAND($iPixel1, 0x00FF0000), 16)
    					$r2 = BitShift(BitAND($iPixel2, 0x00FF0000), 16)
    					$g1 = BitShift(BitAND($iPixel1, 0x0000FF00), 8)
    					$g2 = BitShift(BitAND($iPixel2, 0x0000FF00), 8)
    					$b1 = BitAND($iPixel1, 0x000000FF)
    					$b2 = BitAND($iPixel2, 0x000000FF)
    
    					;euklidische Distanz in 4D
    ;~ 					$dist4D = Sqrt(($a1 - $a2) * ($a1 - $a2) + ($r1 - $r2) * ($r1 - $r2) + ($g1 - $g2) * ($g1 - $g2) + ($b1 - $b2) * ($b1 - $b2))
    ;~ 					$tDestBmp.color($iRowOffset + $iX) = BitOR(0xFF000000, BitXOR(BitShift($dist4D, -16), BitShift($dist4D, -8), $dist4D, 0xFFFFFF))
    
    					;Alpha als Gewichtung der RGB-Distanz
    					$dist3D = Sqrt(($r1 - $r2) * ($r1 - $r2) + ($g1 - $g2) * ($g1 - $g2) + ($b1 - $b2) * ($b1 - $b2))
    
    					$alpha = Int(($a1 + $a2) / 2)
    					$dist3D = 255 - Int($dist3D / 441.67295593 * 255) ;Sqr(3 * 255^2) = 441.67295593
    
    					$tDestBmp.color($iRowOffset + $iX) = BitOR(BitShift($alpha, -24), BitShift($dist3D, -16), BitShift($dist3D, -8), $dist3D)
    
    ;~ 					$alpha = ($a1 + $a2) / 510 ;
    ;~ 					$dist3D = Int(($dist3D / 441.67295593) * 255 * $alpha)
    ;~ 					$tDestBmp.color($iRowOffset + $iX) = BitOR(0xFF000000, BitShift($dist3D, -16), BitShift($dist3D, -8), $dist3D)
    
    				Next
    			Next
    			_GDIPlus_ImageSaveToFile($hBitmapDiff, @ScriptDir & "\ImageDiff.png")
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			_GDIPlus_ImageDispose($hBitmapDiff)
    			Return TimerDiff($t)
    		Case 4 ;Graustufen mit Auto-Kontrast
    			If ($iW * $iH + 1) * 3 > 16 * 1024 ^ 2 Then Return SetError(6, 0, 0)
    			Local $stride = $iW * 4
    			Local $tDestBmp = DllStructCreate("uint color[" & $stride * $iH & "];")
    			Local $hBitmapDiff = _GDIPlus_BitmapCreateFromScan0($iW, $iH, $GDIP_PXF32ARGB, $stride, DllStructGetPtr($tDestBmp))
    			If @error Or Not $hBitmapDiff Then
    				_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    				_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    				Return SetError(6, @error, 0)
    			EndIf
    
    			Local $iX, $iY, $iRowOffset, $iPixel1, $iPixel2, $r1, $r2, $g1, $g2, $b1, $b2, $dist3D
    			Local $minDist = 999999, $maxDist = 0
    			Local $aDist[$iW * $iH + 1]
    
    			;Distanzen berechnen und Min/Max finden
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX)
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX)
    					$r1 = BitShift(BitAND($iPixel1, 0x00FF0000), 16)
    					$r2 = BitShift(BitAND($iPixel2, 0x00FF0000), 16)
    					$g1 = BitShift(BitAND($iPixel1, 0x0000FF00), 8)
    					$g2 = BitShift(BitAND($iPixel2, 0x0000FF00), 8)
    					$b1 = BitAND($iPixel1, 0x000000FF)
    					$b2 = BitAND($iPixel2, 0x000000FF)
    
    					$dist3D = Sqrt(($r1 - $r2) * ($r1 - $r2) + ($g1 - $g2) * ($g1 - $g2) + ($b1 - $b2) * ($b1 - $b2))
    					$aDist[$iRowOffset + $iX] = $dist3D
    
    					If $dist3D < $minDist Then $minDist = $dist3D
    					If $dist3D > $maxDist Then $maxDist = $dist3D
    				Next
    			Next
    
    			Local $range = $maxDist - $minDist
    			If $range < 0.001 Then $range = 1  ;Division durch 0 verhindern (Bilder identisch)
    
    			;Normalisieren
    			Local $a1, $a2, $alpha
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX)
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX)
    					$a1 = BitShift(BitAND($iPixel1, 0xFF000000), 24)
    					$a2 = BitShift(BitAND($iPixel2, 0xFF000000), 24)
    					$alpha = Int(($a1 + $a2) / 2)
    
    					; Kontrast-Stretch: voller Bereich 0-255
    					$dist3D = 255 - Int((($aDist[$iRowOffset + $iX] - $minDist) / $range) * 255)
    
    					$tDestBmp.color($iRowOffset + $iX) = BitOR(BitShift($alpha, -24), BitShift($dist3D, -16), BitShift($dist3D, -8), $dist3D)
    				Next
    			Next
    
    			_GDIPlus_ImageSaveToFile($hBitmapDiff, @ScriptDir & "\ImageDiff.png")
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			_GDIPlus_ImageDispose($hBitmapDiff)
    			Return TimerDiff($t)
    
    		Case 5 ;direkte Differenz RGBA
    			If ($iW * $iH + 1) * 3 > 16 * 1024 ^ 2 Then Return SetError(7, 0, 0)
    			Local $stride = $iW * 4
    			Local $tDestBmp = DllStructCreate("uint color[" & $stride * $iH & "];")
    			Local $hBitmapDiff = _GDIPlus_BitmapCreateFromScan0($iW, $iH, $GDIP_PXF32ARGB, $stride, DllStructGetPtr($tDestBmp))
    			If @error Or Not $hBitmapDiff Then
    				_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    				_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    				Return SetError(8, @error, 0)
    			EndIf
    			Local $iX, $iY, $iRowOffset, $iPixel1, $iPixel2, $c = 1, $aDiff[$iW * $iH + 1][3], $a1, $a2, $r1, $r2, $g1, $g2, $b1, $b2, $dr, $dg, $db, $rDiff, $gDiff, $bDiff, $alpha
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX) ;get pixel color
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX) ;get pixel color
    					$a1 = BitShift(BitAND($iPixel1, 0xFF000000), 24)
    					$a2 = BitShift(BitAND($iPixel2, 0xFF000000), 24)
    					$r1 = BitShift(BitAND($iPixel1, 0x00FF0000), 16)
    					$r2 = BitShift(BitAND($iPixel2, 0x00FF0000), 16)
    					$g1 = BitShift(BitAND($iPixel1, 0x0000FF00), 8)
    					$g2 = BitShift(BitAND($iPixel2, 0x0000FF00), 8)
    					$b1 = BitAND($iPixel1, 0x000000FF)
    					$b2 = BitAND($iPixel2, 0x000000FF)
    
    					$dr = Abs($r1 - $r2)
    					$dg = Abs($g1 - $g2)
    					$db = Abs($b1 - $b2)
    					$alpha = Int(($a1 + $a2) / 2)
    					$tDestBmp.color($iRowOffset + $iX) = BitOR(BitShift($alpha, -24), BitShift($dr, -16), BitShift($dg, -8), $db)
    				Next
    			Next
    			_GDIPlus_ImageSaveToFile($hBitmapDiff, @ScriptDir & "\ImageDiff.png")
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			_GDIPlus_ImageDispose($hBitmapDiff)
    			Return TimerDiff($t)
    
    		Case 6 ;Heatmap
    			If ($iW * $iH + 1) * 3 > 16 * 1024 ^ 2 Then Return SetError(9, 0, 0)
    			Local $stride = $iW * 4
    			Local $tDestBmp = DllStructCreate("uint color[" & $stride * $iH & "];")
    			Local $hBitmapDiff = _GDIPlus_BitmapCreateFromScan0($iW, $iH, $GDIP_PXF32ARGB, $stride, DllStructGetPtr($tDestBmp))
    			If @error Or Not $hBitmapDiff Then
    				_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    				_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    				Return SetError(10, @error, 0)
    			EndIf
    			Local $iX, $iY, $iRowOffset, $iPixel1, $iPixel2, $a1, $a2, $r1, $r2, $g1, $g2, $b1, $b2, $dr, $dg, $db, $alpha, $totalDiff, $heatR, $heatG, $heatB
    			For $iY = 0 To $iH - 1
    				$iRowOffset = $iY * $iW + 1
    				For $iX = 0 To $iW - 1
    					$iPixel1 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX)
    					$iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX)
    					$a1 = BitShift(BitAND($iPixel1, 0xFF000000), 24)
    					$a2 = BitShift(BitAND($iPixel2, 0xFF000000), 24)
    					$r1 = BitShift(BitAND($iPixel1, 0x00FF0000), 16)
    					$r2 = BitShift(BitAND($iPixel2, 0x00FF0000), 16)
    					$g1 = BitShift(BitAND($iPixel1, 0x0000FF00), 8)
    					$g2 = BitShift(BitAND($iPixel2, 0x0000FF00), 8)
    					$b1 = BitAND($iPixel1, 0x000000FF)
    					$b2 = BitAND($iPixel2, 0x000000FF)
    
    					$dr = Abs($r1 - $r2)
    					$dg = Abs($g1 - $g2)
    					$db = Abs($b1 - $b2)
    					$alpha = Int(($a1 + $a2) / 2)
    
    					$totalDiff = ($dr + $dg + $db) / 3
    					If $totalDiff < 64 Then ;Blau -> Cyan (0-63)
    						$heatR = 0
    						$heatG = Int($totalDiff * 4)
    						$heatB = 255
    					ElseIf $totalDiff < 128 Then ;Cyan -> Grün (64-127)
    						$heatR = 0
    						$heatG = 255
    						$heatB = Int(255 - ($totalDiff - 64) * 4)
    					ElseIf $totalDiff < 192 Then ;Grün -> Gelb (128-191)
    						$heatR = Int(($totalDiff - 128) * 4)
    						$heatG = 255
    						$heatB = 0
    					Else ;Gelb -> Rot (192-255)
    						$heatR = 255
    						$heatG = Int(255 - ($totalDiff - 192) * 4)
    						$heatB = 0
    					EndIf
    
    					$tDestBmp.color($iRowOffset + $iX) = BitOR(BitShift($alpha, -24), BitShift($heatR, -16), BitShift($heatG, -8), $heatB)
    				Next
    			Next
    			_GDIPlus_ImageSaveToFile($hBitmapDiff, @ScriptDir & "\ImageDiff.png")
    			_GDIPlus_BitmapUnlockBits($hImage1, $tBitmapData1)
    			_GDIPlus_BitmapUnlockBits($hImage2, $tBitmapData2)
    			_GDIPlus_ImageDispose($hBitmapDiff)
    			Return TimerDiff($t)
    
    	EndSwitch
    EndFunc
    
    
    Func _Exit($sError = "")
    	If $sError <> "" Then MsgBox($MB_ICONERROR, "ERROR", $sError)
    	If ($hImage1 <> 0) Then _GDIPlus_ImageDispose($hImage1)
    	If ($hImage2 <> 0) Then _GDIPlus_ImageDispose($hImage2)
    	_GDIPlus_Shutdown()
    	Exit
    EndFunc
    Alles anzeigen


    Sorry fürs Hijacken...:whistling:

  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 29. August 2025 um 10:54

    Andy

    Danke fürs Testen. Ja genau, nur wenn sich was verändert, wird aufgenommen. Je höher die Qualität, umso länger dauert das Encoden in WebP. Daher sind die Settings auf "Speed" eingestellt.

    Ich habe mal die Zeit für das Capturen und Encoden gemessen und bei mir sind es ca. 70 ms. Bei 30 FPS sollte es nicht mehr als 33.33 ms sein. Für Fullscreen Aufnahmen ist WebP einfach zu schwach.

    Wie gesagt, reicht das für rudimentäre Zwecke. Moderne Browser unterstützen WebP und du kannst das WebP File im Browser darstellen. MS Edge kann das zum Beispiel...


    Ich habe die Exe aktualisiert (siehe Post#1)!

    Meine Ergebnis:

    Code
    Target fps: 30
    Recording time: 30 seconds
    Recording screen dim: 1920 x 1200
    
    Starting fullscreen capturing in 3 seconds...
    ellapsed: 30.12809640000342 seconds
    frames captured: 452        15.0026073336631 fps
    frame index: 460            15.26814020682528 fps
    delta : 8     0.9826086956521739 %
    total frames: 900           target fps 30 delta: 0.5022222222222222 %
    average frame encoding speed: 66.34842522186845 ms, max encoding delay: 33 ms -> -33.34842522186845
    Return: 1
    File size: 33939266 bytes
    
    Done
    Alles anzeigen
  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 27. August 2025 um 23:16

    Danke argumentum .

    Hast einen schneller PC, denn 21 FPS sind ordentlich, falls du Bewegung auf dem Schirm hattest.

    WebP Anim ist kein Codec für Realtime Aufnahmen, da zu langsam. WebP Anim spielt in der gleichen Liga wie GIF und PNG Anim, d.h. WebP Anim ist eher für Animationen geeignet, wo man die Frames parat hat und nicht Realtime generierte Frames encodieren muss.

    Ich denke, das reicht, um mal schnell den Desktop aufzunehmen, um z.B. was mit anderen zu teilen.

  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 27. August 2025 um 16:21

    Komisch, der Code sucht die Monitore mit EnumDisplayMonitors() und gibt den Wert für den primären Monitor zurück.

  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 27. August 2025 um 15:21

    Vielen Dank.

    Was ich sagen kann, ist, dass die Aufnahmegeschwindigkeit anscheinend WebP bei großen Auflösungen überfordert und anscheinend nicht mit dem Encodieren der Frames in Echtzeit nachkommt.

    GetCapturedFrame() aus der DLL scheint nicht der Flaschenhals zu sein. Die Aufnahme im Speicher erst aufzunehmen und dann zu encoden könnte funktionieren, aber könnte der Speicheroverkill werden.

    Muss mal überlegen, welche Alternativen noch WebP bietet...


    Kanashius ist denn 2560 x 1440 nicht die tatsächliche Auflösung deines primären Monitors?


    Bei 3440x1440 -> das sind ~5 Mio. Pixel pro Frame -> bei 30 FPS ≈ 150 Mio. Pixel/s, die kodiert werden müssen!

  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 27. August 2025 um 12:59
    Zitat von AspirinJunkie

    Ja klappt super! :love:

    30s 1920x1080@30FPS ergibt .webp-Datei mit 1,3 MB Dateigröße!

    Danke fürs Testen! 30s? Sollten eigentlich 20s sein. ;)


    Zitat von BananaJoe

    Screencapture hat funktioniert, aber die Animation besteht nur aus einem kurzen Flackern

    Hmm, benötige mehr Infos. Welches OS? Hast du was mit DRM aufgenommen? Ist die Aufnahme komplett durchgelaufen? Hast du nur dein Desktop aufgenommen? Wie viele Monitore?


    Ich habe zum Testen YouTube im Fullscreen Modus genommen -> z.B. https://youtu.be/9E0NQ2_aPfY?si=AoH69ZZzPLRRgySx

    Das gibt einen guten Eindruck, ob das Capturing gut funktioniert.


    Könnt ihr bitte den Output in der CMD Box posten?

  • Windows Graphics Capture API (WinRT) Fullscreen Capturing Test

    • UEZ
    • 27. August 2025 um 11:04

    Könnt ihr bitte testen, ob das Fullscreen Capturing auf dem primären Monitor funktioniert? Das Ergebnis sollte ein WebP Animation sein, die im gleichen Verzeichnis angelegt wird. Die Frames von der WGC API werden an die WebP API übergeben, da dann die Animation erstellt.

    In der CMD Console gibt es ein paar Infos. Könnt ihr bitte den Output in der CMD Box auch posten?

    Aus welchen Gründen auch immer kann ich diese Funktion nicht aus Autoit aufrufen!

    Läuft nur ab Win10+, da die Windows Graphics Capture API (WinRT) genutzt wird.

    Danke.

    Parameter:

    Code
    config.lossless = 0
    config.quality = 50
    config.method = 0
    config.thread_level = 1
    config.segments = 1
    config.sns_strength = 1
    config.filter_strength = 0
    config.pass = 1

    Dateien

    Fullscreen Capturing.7z 354,93 kB – 59 Downloads
  • Duplication API -> schnelle Screenshots

    • UEZ
    • 27. August 2025 um 10:25

    Immer noch schwarz.

  • Duplication API -> schnelle Screenshots

    • UEZ
    • 27. August 2025 um 09:55

    Anscheinend wird ein falsches Device ausgesucht:

    Code
    $pIDXGIFactory: 0x0000028D2DFB4830
    IsObj($oDXGIFactory): 1
    $pAdapter: 2805385088016
    IsObj($oAdapter): 1
    >>>>>>>>>>>Adapter Information<<<<<<<<<<<<<
    Description: Intel(R) Graphics
    VendorId: 32902
    DeviceId: 32069
    SubSysId: 211357736
    Revision: 8
    DedicatedVideoMemory: 134217728
    DedicatedSystemMemory: 0
    SharedSystemMemory: 9498883031
    $pOutput: 2805385769472
    IsObj($oOutput): 1
    >>>>>>>>>>>Output Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY23
    Left: 0
    Top: 0
    Right: 1920
    Bottom: 1200
    AttachedToDesktop: 1
    Monitor: 0x000000000D0C1359
    >>>>>>>>>>>Output1 Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY23
    Left: 0
    Top: 0
    Right: 1920
    Bottom: 1200
    AttachedToDesktop: 1
    Monitor: 0x000000000D0C1359
    Rotation: 1
    $pD3D11Device: 0x0000028D2E064DD0
    $pD3D11DeviceContext: 0x0000028D2E176128
    $pOutput: 2805391252848
    IsObj($oOutput): 1
    >>>>>>>>>>>Output Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY21
    Left: -3840
    Top: 121
    Right: -1920
    Bottom: 1201
    AttachedToDesktop: 1
    Monitor: 0x00000000000D05CB
    >>>>>>>>>>>Output1 Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY21
    Left: -3840
    Top: 121
    Right: -1920
    Bottom: 1201
    AttachedToDesktop: 1
    Monitor: 0x00000000000D05CB
    Rotation: 1
    $pD3D11Device: 0x0000028D2E59A0F0
    $pD3D11DeviceContext: 0x0000028D2E5BD178
    $pOutput: 2805395519936
    IsObj($oOutput): 1
    >>>>>>>>>>>Output Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY22
    Left: -1920
    Top: 7
    Right: 0
    Bottom: 1207
    AttachedToDesktop: 1
    Monitor: 0x000000000793119F
    >>>>>>>>>>>Output1 Information<<<<<<<<<<<<<
    DeviceName: \\.\DISPLAY22
    Left: -1920
    Top: 7
    Right: 0
    Bottom: 1207
    AttachedToDesktop: 1
    Monitor: 0x000000000793119F
    Rotation: 1
    $pD3D11Device: 0x0000028D2E9AB9F0
    $pD3D11DeviceContext: 0x0000028D2E9EA118
    
    
    $pAdapter: 2805397182112
    IsObj($oAdapter): 1
    >>>>>>>>>>>Adapter Information<<<<<<<<<<<<<
    Description: Microsoft Basic Render Driver
    VendorId: 5140
    DeviceId: 140
    SubSysId: 0
    Revision: 0
    DedicatedVideoMemory: 0
    DedicatedSystemMemory: 0
    SharedSystemMemory: 9498883031
    Alles anzeigen
  • Duplication API -> schnelle Screenshots

    • UEZ
    • 26. August 2025 um 20:25
    Zitat von Andy

    d3d11 autoit_orginal plus 25 rendern nur gpu TEST APU.zip funktioniert? Deine Bildschirmauflösung?

    Leider immer noch nicht. Wieder nur schwarze GUI. Auf der Arbeit habe ich insgesamt 3 Monitore, 1920x1080 + 2x 1920x1200 -> 5760 x 1200.

  • Welche DLLs benutzt mein Programm.

    • UEZ
    • 26. August 2025 um 08:33

    Ich musste auch mal die Imports von DLLs rekursiv auslesen. Die die Autoit Variante: https://www.autoitscript.com/forum/topic/21…Comment-1540057

  • Duplication API -> schnelle Screenshots

    • UEZ
    • 25. August 2025 um 16:22

    Hi Andy,

    ich sehe nur ein schwarzen Bildschirm. Irgendwas scheint da nicht zu laufen.

    Edit: scheint daran zu liegen, wenn mehr als ein Monitor vorhanden ist. Bei einem Monitor funktioniert's.

    Ansonsten tolle Arbeit! :thumbup:


    Desktop Duplication API ist die ältere Capturing API - die neue heißt Windows Graphics Capture API (WinRT).

    Unterschiede:

    FeatureDesktop DuplicationWinRT Capture API
    Fenster-capture❌✅
    Monitor-capture✅✅
    Region-capture❌✅
    Cursor-Erfassung❌ (selbst implementieren)✅ (ein-/ausschaltbar)
    Multi-Threadedteilweise✅
    Modern & Win10+ Optimiert❌✅
    Einfachheit für Win32/UWP❌✅

    Nachteil von WinRT: nur Windows 10 Version 1803+ und Windows 11.

  • Rollende Kugel mit Textur

    • UEZ
    • 12. August 2025 um 23:07

    Ich habe nach langer Pause weitergemacht und mit Unterstützung der KIs in Free Basic es hinbekommen, dass die Textur Rotation gemäß dem Richtungsvektor realistisch aussieht.

    Siehe Post#2 für die Link zu meinem 1Drv.


    https://i.ibb.co/GQf6S9xk/Captured.webp

    [Blockierte Grafik: https://i.ibb.co/GQf6S9xk/Captured.webp]

  • QOI.au3

    • UEZ
    • 7. August 2025 um 13:40

    Sieht fehlerfrei aus. :thumbup:

    Mittlerweile ist auch PNG in die Tage gekommen und es gibt bessere Alternativen wie WebP und Avif, die besser verlustfrei komprimieren.

    Vielleicht schreibe ich auch eine Avif DLL...

    Btw, Gimp unterstützt QOI (R/W).

  • WebP v0.5.0 build 2025-08-23 beta

    • UEZ
    • 4. August 2025 um 00:37

    Es wurden umfangreiche Aktualisierungen an der DLL und der UDF vorgenommen und Fehler behoben (möglicherweise wurden neue hinzugefügt). Alle Beispiele wurden auf die neue DLL/UDF umgestellt.

    Alte Skripte können fehlschlagen, wenn Sie DLL v0.4.3+ verwenden, da sich die Funktionsparameter geändert haben.

    Es wurde eine Funktion zum Konvertieren von APNG in AWEBP hinzugefügt.

  • WebP v0.5.0 build 2025-08-23 beta

    • UEZ
    • 2. Juli 2025 um 15:36

    Auf Version WebP v0.3.6 build 2025-07-02 beta aktualisiert.

    Ich habe jetzt eine Funktion hinzugefügt, um GIF animierte Dateien nach WebP umzuwandeln.

    Siehe Example10.au3 auf meinem 1Drv.

  • WebP v0.5.0 build 2025-08-23 beta

    • UEZ
    • 27. Juni 2025 um 14:22

    Auf Version WebP v0.3.5 build 2025-06-30 beta aktualisiert.

    Nun können WebP Animationen erstellt werden. Beispiel 8 und 9.

  • AutoIt-Hackathon #3 "alte Zeiten"

    • UEZ
    • 12. Mai 2025 um 00:31
    AutoIt
    Func _IntegerToRoman($sInteger)
    	Local $Return = "", $i, $j[] = [1, 4, 5, 9], $num = $sInteger, $value, $sRoman = "IIVIXXLXCCDCM" ;alle möglichen Zeichenpaare der römischen Zahlensymbole kompakt aneinandergereiht
    	For $i = 12 To 0 Step -1
    		$value = $j[Mod($i, 4)] * 10 ^ BitShift($i, 2) ;berechnet den konkreten Wert für die aktuelle Position, z.B. 1000, 900, 500, 400, ..., 1
    		While $num >= $value
    			$Return &= StringMid($sRoman, $i + 1, Mod($i, 2) + 1) ;die passenden römischen Zeichen (1 oder 2 Buchstaben) werden aus $sRoman extrahiert und angehängt
    			$num -= $value
    		WEnd
    	Next
    	Return $Return
    EndFunc   ;==>_IntegerToRoman
    
    Func _RomanToInteger($sRoman)
    	Local $i, $Return = 0, $map[13][2] = [["M", 1000], ["CM", 900], ["D", 500], ["CD", 400], ["C", 100], ["XC", 90], ["L", 50], ["XL", 40], ["X", 10], ["IX", 9], ["V", 5], ["IV", 4], ["I", 1]]
    	$sRoman = StringUpper($sRoman)
    	While StringLen($sRoman) > 0
    		For $i = 0 To UBound($map) - 1
    			If StringLeft($sRoman, StringLen($map[$i][0])) = $map[$i][0] Then
    				$Return += $map[$i][1]
    				$sRoman = StringTrimLeft($sRoman, StringLen($map[$i][0]))
    				ExitLoop
    			EndIf
    		Next
    	WEnd
    	Return $Return
    EndFunc   ;==>_RomanToInteger
    
    ; Bonus-Aufgabe für Ambitionierte ;-)
    Func _DateToRoman($sDate) ;Input date in the format "YYYY/MM/DD [HH:MM:SS]", Output in same date-format with roman sign
    	Local $aTokens = StringRegExp($sDate, "(\d{2})/(\d{2})/(\d{4})(?: (\d{2})(?::(\d{2}))?(?::(\d{2}))?)?", 1), $ub = UBound($aTokens)
    	Return StringFormat("%02s/%02s/%04s %02s:%02s:%02s", _IntegerToRoman($aTokens[0]), _IntegerToRoman($aTokens[1]), _IntegerToRoman($aTokens[2]), $ub > 3 ? _IntegerToRoman($aTokens[3]) : "",  $ub > 4 ? _IntegerToRoman($aTokens[4]) : "",  $ub > 5 ? _IntegerToRoman($aTokens[5]) : "")
    EndFunc   ;==>_DateToRoman
    Alles anzeigen

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™