Beiträge von UEZ
-
-
Ich war mal so frei und habe dein Skript ein wenig gekürzt:
[autoit]
[/autoit][autoit][/autoit][autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>$Form1_1 = GUICreate("Bit Anzeiger", 226, 83, 192, 114)
[/autoit][autoit][/autoit][autoit]
$Label1 = GUICtrlCreateLabel("•", 112, 32, 8, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Global $aButtons[8], $aBits[8], $iX = 16, $iVal, $i
For $i = 0 To 7
$aButtons[$i] = GUICtrlCreateButton("0", $iX + $i * 24, 16, 19, 25, $WS_GROUP)
If $i = 3 Then $iX += 10
Next
$out = GUICtrlCreateInput("", 16, 48, 65, 21)
GUISetState(@SW_SHOW)While 1
[/autoit]
$iMsg = GUIGetMsg()
Switch $iMsg
Case $GUI_EVENT_CLOSE
GUIDelete()
Exit
Case $aButtons[0] To $aButtons[7]
$iPos = $iMsg - $aButtons[0]
$iBit = BitXOR($aBits[$iPos], 1)
$aBits[$iPos] = $iBit
GUICtrlSetData($aButtons[$iPos], $iBit)
For $i = 7 To 0 Step - 1
$iVal += 2 ^ (7 - $i) * $aBits[$i]
Next
GUICtrlSetData($out, $iVal)
$iVal = 0
EndSwitch
WEndGruß,
UEZ -
Hallo
Nach dem Start einer Testumgebung (Server), muss ich händisch oftmals auf neuen VMs die IP, Hostname etc anpassen. Das möchte ich versuchen etwas zu vereinfachen. Außerdem das Installieren von Rollen auf Servern wäre recht nett. Brauche nur eben anfangs immer einen Startpunkt, falls das Fenster eben mal nicht mittig ist.
Ist vielleicht nicht die einfachste Methode aber ich möchte es dennoch mal so versuchen.LG
Normalerweise ist das nicht der Weg, um die VMs zu konfigurieren. Dafür gibt es PowerShell Scriptlets (vSphere PowerCLI).
Gruß,
UEZ -
2 Dinge sind mir noch aufgefallen:
1) die Funktion _DrawBgColor() ist so performanter
[autoit]
[/autoit]
Func _DrawBgColor($iLeft, $iTop, $iWidth, $iHeight)
Switch $iBgColor
Case 0
_GDIPlus_GraphicsFillRect($hGraphicBuff, $iPreviewLeft, $iPreviewTop, $iPreviewWidth, $iPreviewHeight, $hTexture)
Case 1
_GDIPlus_GraphicsFillRect($hGraphicBuff, $iPreviewLeft, $iPreviewTop, $iPreviewWidth, $iPreviewHeight, $ahBrush[3])
Case 2
_GDIPlus_GraphicsFillRect($hGraphicBuff, $iPreviewLeft, $iPreviewTop, $iPreviewWidth, $iPreviewHeight, $ahBrush[2])
EndSwitch
EndFunc2) Apropos Performance _ShowStatus() ist ziemlich langsam. Beim Blättern benötige die Funktion um die 400 ms. Da ist bestimmt noch Raum für Optimierungen.

Gruß,
UEZ -
Du könntest folgende Funktion nehmen, um das Pattern schneller zu erzeugen:
[autoit]
[/autoit]
Func _DrawPattern($iLeft, $iTop, $iWidth, $iHeight)
Local $iBrush = True, $iStep = 8
_GDIPlus_GraphicsFillRect($hGraphicBuff, $iPreviewLeft, $iPreviewTop, $iPreviewWidth, $iPreviewHeight, $ahBrush[2])
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", 2 * $iStep, "int", 2 * $iStep, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0)
Local $hBitmap = $aResult[6]
Local $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iStep, $iStep, $ahBrush[0])
_GDIPlus_GraphicsFillRect($hCtxt, $iStep, 0, $iStep, $iStep, $ahBrush[1])
_GDIPlus_GraphicsFillRect($hCtxt, 0, $iStep, $iStep, $iStep, $ahBrush[1])
_GDIPlus_GraphicsFillRect($hCtxt, $iStep, $iStep, $iStep, $iStep, $ahBrush[0])
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "handle", $hBitmap, "int", 0, "int*", 0)
Local $hTexture = $aResult[3]
_GDIPlus_GraphicsFillRect($hGraphicBuff, $iPreviewLeft, $iPreviewTop, $iPreviewWidth, $iPreviewHeight, $hTexture)
_GDIPlus_GraphicsDispose($hCtxt)
_GDIPlus_BrushDispose($hTexture)
_GDIPlus_BitmapDispose($hBitmap)
EndFuncFerner könntest du das Pattern einmal erstellen und nur die Bitmap kopieren, als immer das Pattern neu zu erstellen, denn es ändert sich nichts daran.
Gruß,
UEZ -
Zeigst du uns bitte auch noch den Source Code der DLL?

Gruß,
UEZ -
Ganz nettes Tools

Vielleicht könnte man den Hintergrund für transparente Bilder anders Darstellen als das schlichte schwarz, wie z.B. das klassische Schachbrettmuster.
Gruß,
UEZ -
Man sollte hier zwischen 256 Farben und einer 8 Bit Bitmap differenzieren. Ein 24-bit Bild kann theoretisch auch nur 256 Farben beinhalten, aber ein 8 Bit Bild niemals mehr als 256 Farben.
Hier 2 kleine Snippets.
1) Benötigt kein GDI+ v1.1:
Spoiler anzeigen
[autoit]
[/autoit]
#include <GDIPlus.au3>
$sFile = FileOpenDialog("Bitte ein Bild selektieren", "", "Bilder (*.jpg;*.bmp;*.png)", 3)
If @error Then Exit
_GDIPlus_Startup()
$hBitmap = _GDIPlus_BitmapCreateFromFile($sFile)
$iWidth = _GDIPlus_ImageGetWidth($hBitmap)
$iHeight = _GDIPlus_ImageGetHeight($hBitmap)
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", $GDIP_PXF08INDEXED, "ptr", 0, "int*", 0)
$hBmp8bit = $aResult[6]
$hCtxt = _GDIPlus_ImageGetGraphicsContext($hBmp8bit)
_GDIPlus_GraphicsDrawImageRect($hCtxt, $hBitmap, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsDispose($hCtxt)
_GDIPlus_BitmapDispose($hBitmap)
$sOutputFile = @ScriptDir & "\Test_8bit.png"
_GDIPlus_ImageSaveToFile($hBmp8bit, $sOutputFile)
_GDIPlus_BitmapDispose($hBmp8bit)
_GDIPlus_Shutdown()
ShellExecute($sOutputFile)2) Benötigt GDI+ v1.1 (Vista oder höhere):
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <ScreenCapture.au3>If @OSBuild < 6000 Then Exit MsgBox(16, "Error", "GDI+ v1.1 needed -> Vista+ OS!", 10)
[/autoit] [autoit][/autoit] [autoit]Global Const $GDIP_PXF32CMYK = 0x0000200F
[/autoit] [autoit][/autoit] [autoit]
Global Const $GDIP_PXFMAX = 0x00000010Global Enum $DitherTypeNone = 0, $DitherTypeSolid, $DitherTypeOrdered4x4, $DitherTypeOrdered8x8, $DitherTypeOrdered16x16, $DitherTypeOrdered91x91, $DitherTypeSpiral4x4, $DitherTypeSpiral8x8, $DitherTypeDualSpiral4x4, $DitherTypeDualSpiral8x8, $DitherTypeErrorDiffusion
[/autoit] [autoit][/autoit] [autoit]
Global Enum $PaletteTypeCustom = 0, $PaletteTypeOptimal, $PaletteTypeFixedBW, $PaletteTypeFixedHalftone8, $PaletteTypeFixedHalftone27, $PaletteTypeFixedHalftone64, $PaletteTypeFixedHalftone125, $PaletteTypeFixedHalftone216, $PaletteTypeFixedHalftone252, $PaletteTypeFixedHalftone256_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$iW = 300
$iH = 300
$hHBitmap = _ScreenCapture_Capture("", 0, 0, $iW, $iH) ;24 bit screen capture
$hBitmap_screen = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) ;convert bitmap format$iColorCount = 1024
[/autoit] [autoit][/autoit] [autoit]
$DitherType = $DitherTypeDualSpiral8x8
$PaletteType = $PaletteTypeFixedHalftone256
$PixelFormat = $GDIP_PXF08INDEXED$tPalette = DllStructCreate("uint Flags; uint Count; uint Entries[" & $iColorCount & "];")
[/autoit] [autoit][/autoit] [autoit]
DllStructSetData($tPalette, "Flags", $PaletteType)
DllStructSetData($tPalette, "Count", $iColorCount)ConsoleWrite("> Init Palette: " & _GDIPlus_InitializePalette($tPalette, $PaletteType, 0, True, 0) & @CRLF)
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite("! Error: " & @error & " Extended: " & @extended & @CRLF)ConsoleWrite("> Convert: " & _GDIPlus_BitmapConvertFormat($hBitmap_screen, $PixelFormat, $DitherType, $PaletteType, $tPalette, 0) & @CRLF)
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite("! Error: " & @error & " Extended: " & @extended & @CRLF)_GDIPlus_ImageSaveToFile($hBitmap_screen, @ScriptDir & "\Test.png")
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_DeleteObject($hHBitmap)
_GDIPlus_BitmapDispose($hBitmap_screen)
_GDIPlus_Shutdown()
ShellExecute(@ScriptDir & "\Test.png")
ExitFunc _GDIPlus_BitmapConvertFormat($hBitmap, $iPixelFormat, $iDitherType, $iPaletteType, $tPalette, $falphaThresholdPercent = 0) ;http://msdn.microsoft.com/en-us/library/…6(v=VS.85).aspx
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Local $aResult = DllCall($ghGDIPDll, "bool", "GdipBitmapConvertFormat", "handle", $hBitmap, "long", $iPixelFormat, "long", $iDitherType, "long", $iPaletteType, "struct*", $tPalette, "float", $falphaThresholdPercent)
If @error Then Return SetError(@error, @extended, -1)
Return $aResult[0]
EndFunc ;==>_GDIPlus_BitmapConvertFormatFunc _GDIPlus_InitializePalette($tPalette, $iPaletteType, $iOptimalColors = 0, $bUseTransparentColor = True, $hBitmap = 0) ;http://msdn.microsoft.com/en-us/library/…9(v=vs.85).aspx
[/autoit] [autoit][/autoit] [autoit]
Local $aResult = DllCall($ghGDIPDll, "bool", "GdipInitializePalette", "struct*", $tPalette, "long", $iPaletteType, "int", $iOptimalColors, "bool", $bUseTransparentColor, "handle", $hBitmap)
If @error Then Return SetError(@error, @extended, -1)
Return $aResult[0]
EndFunc ;==>_GDIPlus_InitializePalette#cs
[/autoit] [autoit][/autoit] [autoit]
http://msdn.microsoft.com/en-us/library/…6(v=vs.85).aspx
VOID Example_ConvertFormat(HDC hdc)
{
Graphics graphics(hdc);
Bitmap myBitmap(L"Photo.jpg");
INT width = myBitmap.GetWidth();
INT height = myBitmap.GetHeight();graphics.DrawImage(&myBitmap, 20, 20, width, height);
[/autoit] [autoit][/autoit] [autoit]// PaletteTypeFixedHalftone27 has 36 entries. A ColorPalette structure has
[/autoit] [autoit][/autoit] [autoit]
// room for one entry, so space is allocated for an additional 35 entries.
ColorPalette* pal = (ColorPalette*)malloc(sizeof(ColorPalette) + 35*sizeof(ARGB));
pal->Count = 36;
pal->Flags = 0;Bitmap::InitializePalette(pal, PaletteTypeFixedHalftone27, 0, TRUE, NULL);
[/autoit] [autoit][/autoit] [autoit]myBitmap.ConvertFormat(
[/autoit] [autoit][/autoit] [autoit]
PixelFormat8bppIndexed,
DitherTypeOrdered8x8,
PaletteTypeFixedHalftone27,
pal,
0);graphics.DrawImage(&myBitmap, width + 40, 20, width, height);
[/autoit] [autoit][/autoit] [autoit]free(pal);
[/autoit]
}
#ceEs gibt bestimmt noch andere Möglichkeiten 8 Bit Bilder zu erstellen (siehe Andy's kommentar).
Gruß,
UEZ -
-
GuiCtrlCreatePic() dient nur zum Anzeigen des GDI+ Bildes, um das Resultat zu vergleichen. Besser wäre es, das GDI+ Bild an den Control zu schicken, dann würde das Bild auch nicht gelöscht.
Suche dir das Beste aus.

Gruß,
UEZ -
Hier ein Beispiel:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
Opt("MustDeclareVars", 1)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
Global Const $STM_SETIMAGE = 0x0172Global $hGUI, $Msg, $Button, $Icon, $hIcon, $iPic, $hPic, $hGraphics, $Index = 0, $iBGColor = 0xF0F0F0
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Global $hIcon300x300 = _WinAPI_ShellExtractIcon("C:\Windows\system32\mobsync.exe", $Index, 300, 300)
Global $hHBitmap256x256 = _WinAPI_GetFileIcon("C:\Windows\system32\mobsync.exe", $Index, 256, 256, $iBGColor)
Global $hBitmapIcon256x256 = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap256x256)
Global $hBitmapIcon300x300 = _GDIPlus_BitmapCreateFromScan0(300, 300)
Global $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmapIcon300x300)
_GDIPlus_GraphicsSetInterpolationMode($hContext, 7)
_GDIPlus_GraphicsDrawImageRect($hContext, $hBitmapIcon256x256, 0, 0, 300, 300)
_GDIPlus_GraphicsDispose($hContext)$hGUI = GUICreate("MyGUI", 610, 300)
[/autoit] [autoit][/autoit] [autoit]
GUISetBkColor($iBGColor)
$Icon = GUICtrlCreateIcon("", 0, 0, 0, 300, 300)
$hIcon = GUICtrlGetHandle(-1)
$iPic = GUICtrlCreatePic("", 310,0, 300, 300)
$hPic = GUICtrlGetHandle(-1)
GUISetState()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hPic)
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmapIcon300x300, 0, 0, 300, 300)
_WinAPI_DestroyIcon(_SendMessage($hIcon, $STM_SETIMAGE, 1, $hIcon300x300))While 1
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$Msg = GUIGetMsg()
Switch $Msg
Case -3
_GDIPlus_BitmapDispose($hBitmapIcon256x256)
_GDIPlus_BitmapDispose($hBitmapIcon300x300)
_WinAPI_DestroyIcon($hIcon300x300)
_WinAPI_DeleteObject($hHBitmap256x256)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
ExitLoop
EndSwitch
WEndFunc _WinAPI_GetFileIcon($sFile, $iIndex = 0, $iW = 18, $iH = 18, $iColor = -1)
[/autoit] [autoit][/autoit] [autoit]
Local $aRet, $hIcon, $hHBitmap
Local $hDC, $hBackDC, $hBackSv$aRet = DllCall("shell32.dll", "int", "SHExtractIconsW", "wstr", $sFile, "int", $iIndex, "int", $iW, "int", $iH, "ptr*", 0, "ptr*", 0, "int", 1, "int", 0)
[/autoit] [autoit][/autoit] [autoit]
If @error Then Return SetError(6, @extended, 0)
$hIcon = $aRet[5]$hDC = _WinAPI_GetDC(0)
[/autoit] [autoit][/autoit] [autoit]
$hBackDC = _WinAPI_CreateCompatibleDC($hDC)
If $iColor = -1 Then $iColor = _WinAPI_GetSysColor($COLOR_MENU)
$hHBitmap = _WinAPI_CreateSolidBitmap(0, $iColor, $iW, $iH)
$hBackSv = _WinAPI_SelectObject($hBackDC, $hHBitmap)
_WinAPI_DrawIconEx($hBackDC, 0, 0, $hIcon, $iW, $iH)
_WinAPI_DestroyIcon($hIcon)_WinAPI_SelectObject($hBackDC, $hBackSv)
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_DeleteDC($hBackDC)
Return $hHBitmap
EndFunc ;==>_GUICtrlMenu_CreateBitmap; #FUNCTION# ====================================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name...........: _WinAPI_ShellExtractIcon
; Description....: Extracts the icon with the specified dimension from the specified file.
; Syntax.........: _WinAPI_ShellExtractIcon ( $sIcon, $iIndex, $iWidth, $iHeight )
; Parameters.....: $sIcon - Path and name of the file from which the icon are to be extracted.
; $iIndex - The zero-based index of the icon to extract. If this value is a negative number, the function extracts
; the icon whose resource identifier is equal to the absolute value of $iIndex.
; $iWidth - Horizontal icon size wanted.
; $iHeight - Vertical icon size wanted.
; Return values..: Success - Handle to the extracted icon.
; Failure - 0 and sets the @error flag to non-zero.
; Author.........: Yashied
; Modified.......:
; Remarks........: If the icon with the specified dimension is not found in the file, it will choose the nearest appropriate icon
; and change to the specified dimension.
;
; When you are finished using the icon, destroy it using the _WinAPI_DestroyIcon() function.
; Related........:
; Link...........: @@MsdnLink@@ SHExtractIcons
; Example........: Yes
; ===============================================================================================================================
Func _WinAPI_ShellExtractIcon($sIcon, $iIndex, $iWidth, $iHeight)
Local $Ret = DllCall("shell32.dll", "int", "SHExtractIconsW", "wstr", $sIcon, "int", $iIndex, "int", $iWidth, "int", $iHeight, "ptr*", 0, "ptr*", 0, "int", 1, "int", 0)
If (@error) Or (Not $Ret[0]) Or (Not $Ret[5]) Then
Return SetError(1, 0, 0)
EndIf
Return $Ret[5]
EndFunc ;==>_WinAPI_ShellExtractIcon; #FUNCTION# ====================================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name...........: _GDIPlus_BitmapCreateFromScan0
; Description ...: Creates a Bitmap object based on an array of bytes along with size and format information
; Syntax.........: _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight[, $iStride = 0[, $iPixelFormat = 0x0026200A[, $pScan0 = 0]]])
; Parameters ....: $iWidth - The bitmap width, in pixels
; $iHeight - The bitmap height, in pixels
; $iStride - Integer that specifies the byte offset between the beginning of one scan line and the next. This
; +is usually (but not necessarily) the number of bytes in the pixel format (for example, 2 for 16 bits per pixel)
; +multiplied by the width of the bitmap. The value passed to this parameter must be a multiple of four
; $iPixelFormat - Specifies the format of the pixel data. Can be one of the following:
; |$GDIP_PXF01INDEXED - 1 bpp, indexed
; |$GDIP_PXF04INDEXED - 4 bpp, indexed
; |$GDIP_PXF08INDEXED - 8 bpp, indexed
; |$GDIP_PXF16GRAYSCALE - 16 bpp, grayscale
; |$GDIP_PXF16RGB555 - 16 bpp; 5 bits for each RGB
; |$GDIP_PXF16RGB565 - 16 bpp; 5 bits red, 6 bits green, and 5 bits blue
; |$GDIP_PXF16ARGB1555 - 16 bpp; 1 bit for alpha and 5 bits for each RGB component
; |$GDIP_PXF24RGB - 24 bpp; 8 bits for each RGB
; |$GDIP_PXF32RGB - 32 bpp; 8 bits for each RGB. No alpha.
; |$GDIP_PXF32ARGB - 32 bpp; 8 bits for each RGB and alpha
; |$GDIP_PXF32PARGB - 32 bpp; 8 bits for each RGB and alpha, pre-mulitiplied
; $pScan0 - Pointer to an array of bytes that contains the pixel data. The caller is responsible for
; +allocating and freeing the block of memory pointed to by this parameter.
; Return values .: Success - Returns a handle to a new Bitmap object
; Failure - 0 and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: After you are done with the object, call _GDIPlus_ImageDispose to release the object resources
; Related .......: _GDIPlus_ImageDispose
; Link ..........; @@MsdnLink@@ GdipCreateBitmapFromScan0
; Example .......; Yes
; ===============================================================================================================================
Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = $GDIP_PXF32RGB, $pScan0 = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[6]
EndFunc ;==>_GDIPlus_BitmapCreateFromScan0; #FUNCTION# ====================================================================================================================
[/autoit]
; Name...........: _GDIPlus_GraphicsSetInterpolationMode
; Description ...: Sets the interpolation mode of a Graphics object
; Syntax.........: _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
; Parameters ....: $hGraphics - Pointer to a Graphics object
; $iInterpolationMode - Interpolation mode:
; |0 - Default interpolation mode
; |1 - Low-quality mode
; |2 - High-quality mode
; |3 - Bilinear interpolation. No prefiltering is done
; |4 - Bicubic interpolation. No prefiltering is done
; |5 - Nearest-neighbor interpolation
; |6 - High-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking
; |7 - High-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking
; Return values .: Success - True
; Failure - False and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: The interpolation mode determines the algorithm that is used when images are scaled or rotated
; Related .......: _GDIPlus_GraphicsGetInterpolationMode
; Link ..........; @@MsdnLink@@ GdipSetInterpolationMode
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hGraphics, "int", $iInterpolationMode)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetInterpolationModeKannst das Beispiel entsprechend ändern und die Bitmap in 24x24 erstellen und abspeichern. Die Quali sollte besser sein.
Gruß,
UEZ -
Die Icons sind in 4, 8 und 32 Bit und in einer Auflösung von 16x16, 32x32, 48x48 und 256x256 abgespeichert. D.h. du solltest je nach Bedarf das entsprechende Icon dir heraussuchen.
Einen Icon in 32x32 auf 256x256 zu skalieren, macht hier keinen Sinn.
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>GUICreate("Meine GUI Icons", 700, 300)
[/autoit] [autoit][/autoit] [autoit]$icon = "C:\Windows\system32\mobsync.exe"
[/autoit] [autoit][/autoit] [autoit]GUICtrlCreateIcon($icon, 1, 20, 20, 16, 16)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlCreateIcon($icon, 1, 100, 20, 32, 32)
GUICtrlCreateIcon($icon, 1, 200, 20, 48, 48)
GUICtrlCreateIcon($icon, 1, 300, 20, 256, 256)
GUISetState()While 1
[/autoit] [autoit][/autoit] [autoit]
Local $msg = GUIGetMsg()If $msg = $GUI_EVENT_CLOSE Then ExitLoop
[/autoit]
WEndNotfalls muss du das Icon mit GDI+ / WinAPI extrahieren und skalieren.
Gruß,
UEZ -
Probiere es mal damit: [ gelöst ] CSV-Datei in ein Array einlesen
Gruß,
UEZ -
Oder schaue hier mal rein: http://www.autoitscript.com/forum/topic/12…thm-collection/
In dem Archiv gibt es ein Compression Ordner mit einigen Pack Algorithmen in Assembler geschrieben!
Gruß,
UEZ -
Das Ganze nun auch in Englisch!

Gruß,
UEZ -
Neues und sehr wahrscheinlich letztes Update, es sein denn, es werden noch Bugs gefunden!
Jetzt können auch GIF Animationen in der Haupt GUI abgespielt werden.
Gruß,
UEZ -
Ein bissle Mathe und dein Problem ist gelöst:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>$fill = 15000
[/autoit] [autoit][/autoit] [autoit]GUICreate("My GUI")
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]
$ID_1 = GUICtrlCreateButton("Countdown", 10, 25, 100)
$ID_2 = GUICtrlCreateButton("Progress", 10, 55, 100)
$progress = GUICtrlCreateProgress(70, 0, 200, 20)While 1
[/autoit] [autoit][/autoit] [autoit]
$msg = GUIGetMsg()
Switch $msg
Case $ID_1
_sleep(30000)
Case $ID_2
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEndFunc _sleep($time)
[/autoit]
$tstart = TimerInit()
$stime = $time
Do
GUICtrlCreateLabel("Zeit : " & $stime / 1000 & " sec", 0, 2)
Sleep(1000)
$stime -= 1000
GUICtrlSetData($progress, Floor(100 * (($time - $stime) / $time)))
Until TimerDiff($tstart) >= $time
EndFunc ;==>_sleepGruß,
UEZ -
Probiere es mal damit:
[autoit]
[/autoit][autoit][/autoit][autoit]
$sLog = "2013-04-05 16:12:04 : Aufz. Start Mustermann AG" & @CRLF & _
"2013-04-05 17:42:04 : Aufz. Start Mustermann AG" & @CRLF & _
"2013-04-05 18:32:04 : Aufz. Start Mustermann AG" & @CRLF$sLog_New = StringRegExpReplace($sLog, "(?m)(\d+\-\d+\-\d+)(\h)(\d+\:\d+\:\d+.*)", "\1" & @TAB & "\3")
[/autoit]
MsgBox(0, "", $sLog_New)Gruß,
UEZ -
Da hatte jemand wohl eine lange Nacht gehabt!

Sehr schön geworden!

Cool wäre es, wenn man schwarze Linien zeichnen könnte anstatt "mühselig" die Punkte zu setzen! Und ich kann das Ziel löschen.
Gruß,
UEZ -
@David: ich weiß nicht, was du willst? Wenn dir AutoIt nicht zusagt, dann benutze AutoIt einfach nicht, denn es zwingt dich ja niemand dazu! Wenn andere AutoIt benutzen, dann ist das deren "Problem".
Ich schlage vor, dass du solche Diskussionen hier lieber nicht anfängst, ansonsten wird der Thread dicht gemacht und der Bann Hammer wird geschwungen!
Gruß,
UEZ