Search the Community

Showing results for tags 'gdi+'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Chat
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 69 results

  1. sometimes! Running the script below and entering a for All seems to work every time Running it and choosing 1 for One returns a gibberish string However with the same functions, I have seen it succeed when 1 is chosen, i.e. show the value for the test property ID 0x0103 as OLYMPUS DIGITAL CAMERA I have also seen GetOne() succeed when a diagnostic MsgBox() is added, and when I include my debugging functions, so the problem appears to be a memory location being overwritten, probably in a DLLStruct.. call. I know that value OLYMPUS DIGITAL CAMERA is correct from Irfanview and from running GetAll(). All but one of the _GDIPlus functions were written by ChrisL. I have modified those that returned a DLLStruct object such that they now return an array. Both getting one and getting all involve calling _GDIPlus_ImageGetPropertyItemValue() which I wrote, so perhaps the problem partly lies with ChrisL's functions as modified. Suggestions? #include <GDIPlus.au3> #include <Array.au3> Opt('MustDeclareVars',1) ; #VARIABLES# =================================================================================================================== Global $GDIP_STATUS = 0 Global $GDIP_ERROR = 0 ; =============================================================================================================================== ; Property Item structure Global Const $tagGDIPPROPERTYITEM = _ "uint id;" & _ ; ID of this property "uint length;" & _ ; Length of the property value, in bytes "ushort type;" & _ ; Type of the value, as one of TAG_TYPE_XXX constants "ptr value;" ; property value ; Image property types constants ; Ref: https://www.media.mit.edu/pia/Research/deepview/exif.html Global Const $GDIP_PROPERTYTAGTYPEUBYTE = 1 Global Const $GDIP_PROPERTYTAGTYPEASCII = 2 Global Const $GDIP_PROPERTYTAGTYPEUSHORT = 3 Global Const $GDIP_PROPERTYTAGTYPEULONG = 4 Global Const $GDIP_PROPERTYTAGTYPEURATIONAL = 5 Global Const $GDIP_PROPERTYTAGTYPESBYTE = 6 Global Const $GDIP_PROPERTYTAGTYPEUNDEFINED = 7 Global Const $GDIP_PROPERTYTAGTYPESSHORT = 8 Global Const $GDIP_PROPERTYTAGTYPESLONG = 9 Global Const $GDIP_PROPERTYTAGTYPESRATIONAL = 10 Global Const $GDIP_PROPERTYTAGTYPESFLOAT = 11 Global Const $GDIP_PROPERTYTAGTYPEDFLOAT = 12 main() Func main() _GDIPlus_Startup() Local $hImage = _GDIPlus_ImageLoadFromFile('H:\b\PA160005 - Copy.JPG') Local $sAns = InputBox('','Enter 1 or a') If $sAns=1 Then GetOne($hImage) ElseIf $sAns='a' Then GetAll($hImage) EndIf _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() EndFunc Func GetOne($hImage) Local $vecPrim = _GDIPlus_ImageGetPropertyItem($hImage,0x010e) Local $vecUser[3] $vecUser[0] = '0x'&StringRight(Hex($vecPrim[0]),4) $vecUser[1] = $vecPrim[2] Local $vecVals = _GDIPlus_ImageGetPropertyItemValue($vecPrim[1],$vecPrim[2],$vecPrim[3]) $vecUser[2] = $vecVals[0] _ArrayDisplay($vecUser) EndFunc Func GetAll($hImage) Local $ar1 = _GDIPlus_ImageGetAllPropertyItems($hImage) Local $ar[UBound($ar1,1)][3] For $i = 1 To $ar1[0][0] $ar[$i][0] = '0x'&StringRight(Hex($ar1[$i][0]),4) $ar[$i][1] =$ar1[$i][2] $ar[$i][2] = (_GDIPlus_ImageGetPropertyItemValue($ar1[$i][1],$ar1[$i][2],$ar1[$i][3]))[0] Next _ArrayDisplay($ar) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetAllPropertyItems ; Description ...: Gets all the property items (metadata) stored in an Image object ; Syntax.........: _GDIPlus_ImageGetAllPropertyItems($hImage) ; Parameters ....: $hImage - Pointer to an Image object ; Return values .: Success - Array containing the image property items: ; |[0][0] - Number of property items ; |[1][0] - Property item 1 identifier (see remarks) ; |[1][1] - Property item 1 value length, in bytes ; |[1][2] - Property item 1 value type ; |[1][1] - Property item 1 value pointer ; |. ; |. ; |[n][0] - Property item n identifier ; |[n][1] - Property item n value length, in bytes ; |[n][2] - Property item n value type ; |[n][1] - Property item n value pointer ; Possible property value types are: ; |1 - The value pointer points to an array of bytes ; |2 - The value pointer points to a null-terminated ASCII string ; |3 - The value pointer points to unsigned short ; |4 - The value pointer points to an unsigned long ; |5 - The value pointer points to an array of unsigned two longs (numerator, denominator) ; |7 - The value pointer points to an array of bytes of any type, or is unterminated string\ ; |8 - The value pointer points to signed short ; |9 - The value pointer points to a signed long ; |10 - The value pointer points to an array of signed two longs (numerator, denominator) ; |11 - The value pointer points to a float ; |12 - The value pointer points to a double ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; |$GDIP_ERROR: ; | 1 - The _GDIPlus_ImageGetPropertySize function failed, $GDIP_STATUS contains the error code ; | 2 - The image contains no property items metadata ; | 3 - The _GDIPlus_ImageGetAllPropertyItems function failed, $GDIP_STATUS contains the error code ; Author.........: Authenticity ; Modified.......: c.haslam ; Remarks .......: The property item tag identifiers are declared in GDIPConstants.au3, those that start with $GDIP_PROPERTYTAG ; +The value size is given in bytes, divide this by the size of the data (4 for integers, 2 for shorts, etc..) ; Related .......: _GDIPlus_ImageGetPropertySize, _GDIPlus_ImageGetPropertyItemValue, _GDIPlus_ImageGetAllPropertyItems ; Link ..........; @@MsdnLink@@ GdipGetAllPropertyItems ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetAllPropertyItems($hImage) Local $iI, $iCount, $tBuffer, $pBuffer, $iBuffer, $tPropertyItem, $aSize, $aPropertyItems[1][1], $aResult $aSize = _GDIPlus_ImageGetPropertySize($hImage) If @error Then Return SetError(@error, @extended, -1) If $GDIP_STATUS Then $GDIP_ERROR = 1 Return -1 ElseIf $aSize[1] = 0 Then $GDIP_ERROR = 2 Return -1 EndIf $iBuffer = $aSize[0] $tBuffer = DllStructCreate("byte[" & $iBuffer & "]") $pBuffer = DllStructGetPtr($tBuffer) $iCount = $aSize[1] $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetAllPropertyItems", "hwnd", $hImage, "uint", $iBuffer, "uint", $iCount, "ptr", $pBuffer) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then $GDIP_ERROR = 3 Return -1 EndIf ReDim $aPropertyItems[$iCount + 1][4] $aPropertyItems[0][0] = $iCount For $iI = 1 To $iCount $tPropertyItem = DllStructCreate($tagGDIPPROPERTYITEM, $pBuffer) $aPropertyItems[$iI][0] = DllStructGetData($tPropertyItem, "id") $aPropertyItems[$iI][1] = DllStructGetData($tPropertyItem, "length") $aPropertyItems[$iI][2] = DllStructGetData($tPropertyItem, "type") $aPropertyItems[$iI][3] = DllStructGetData($tPropertyItem, "value") $pBuffer += DllStructGetSize($tPropertyItem) Next Return $aPropertyItems EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_ImageGetPropertyItemValue ; Description ...: Get property item values from fields in $tagGDIPPROPERTYITEM data ; Syntax ........: _GDIPlus_ImageGetPropertyItemValue($iLength, $iType, $pValue) ; Parameters ....: $iLength Length of the property value, in bytes ; |$iType Type of the value (a $GDIP_PROPERTYTAGTYPE* value - see GDIPConstants.au3) ; |$pValue Pointer to value ; Return values .: Success - An array ; | [0] value 1 ; | [1] value 2 (only for properties that have numerator and denominator) ; Failure - -1 ; Author ........: c.haslam ; Modified ......: ; Remarks........: If type is 7 ($GDIP_PROPERTYTAGTYPEUNDEFINED) value returned is an unsigned long. ; Depending on ID and originator of the image, value may actually be an unterminated string ; Related .......: _GDIPlus_ImageGetPropertyItem,_GDIPlus_ImageGetAllPropertyItems ; Link ..........: http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf, ; https://www.media.mit.edu/pia/Research/deepview/exif.html ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyItemValue($iLength, $iType, $pValue) Switch $iType Case $GDIP_PROPERTYTAGTYPEURATIONAL,$GDIP_PROPERTYTAGTYPESRATIONAL Local $aRet[2] Case Else Local $aRet[1] EndSwitch Switch $iType Case $GDIP_PROPERTYTAGTYPEUBYTE,$GDIP_PROPERTYTAGTYPESBYTE Local $tvalue = DllStructCreate('byte val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEASCII Local $tvalue = DllStructCreate('char val['&$iLength&']',$pValue) If @error Then MsgBox(0,@ScriptLineNumber,'@error='&@error) $aRet[0] = DllStructGetData($tvalue,'val') If @error Then MsgBox(0,@ScriptLineNumber,'@error='&@error) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEUSHORT Local $tvalue = DllStructCreate('ushort val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEULONG Local $tvalue = DllStructCreate('ulong val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEURATIONAL Local $tvalue = DllStructCreate('ulong val1;ulong val2',$pValue) $aRet[0] = $tvalue.val1 $aRet[1] = $tvalue.val2 Case $GDIP_PROPERTYTAGTYPESBYTE Local $tvalue = DllStructCreate('byte val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEUNDEFINED ; undefined, per specification, but may be a long but is sometimes a string Local $tvalue = DllStructCreate('ulong val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPESSHORT Local $tvalue = DllStructCreate('short val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEULONG Local $tvalue = DllStructCreate('ulong val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPESRATIONAL Local $tvalue = DllStructCreate('long val1;long val2',$pValue) $aRet[0] = $tvalue.val1 $aRet[1] = $tvalue.val2 Case $GDIP_PROPERTYTAGTYPESFLOAT Local $tvalue = DllStructCreate('float val',$pValue) $aRet[0] = $tvalue.val Case $GDIP_PROPERTYTAGTYPEDFLOAT Local $tvalue = DllStructCreate('double val',$pValue) $aRet[0] = $tvalue.val EndSwitch $tvalue = 0 Return $aRet EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyItem ; Description ...: Gets a specified property item (piece of metadata) from an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyItem($hImage, $iPropID) ; Parameters ....: $hImage - Pointer to an Image object ; $iPropID - Identifier of the property item to be retrieved ; Return values .: Success - Array ; | [0] Property ID ; | [1] Property length ; | [2] Property type ; | [3] pointer to Property value ; Possible values of type are: ; |1 - The value pointer points to an array of bytes ; |2 - The value pointer points to a null-terminated ASCII string ; |3 - The value pointer points to unsigned short ; |4 - The value pointer points to an unsigned long ; |5 - The value pointer points to an array of unsigned two longs (numerator, denominator) ; |7 - The value pointer points to an array of bytes of any type, or is unterminated string\ ; |8 - The value pointer points to signed short ; |9 - The value pointer points to a signed long ; |10 - The value pointer points to an array of signed two longs (numerator, denominator) ; |11 - The value pointer points to a float ; |12 - The value pointer points to a double ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non-zero value specifying the error code ; |$GDIP_ERROR: ; | 1 - The _GDIPlus_ImageGetPropertyItemSize function failed, $GDIP_STATUS contains the error code ; | 2 - The specified property identifier does not exist in the image ; | 3 - The _GDIPlus_ImageGetPropertyItem function failed, $GDIP_STATUS contains the error code ; Author.........: Authenticity ; Modified.......: c.haslam ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetPropertyIdList, _GDIPlus_ImageGetPropertyItemSize, _GDIPlus_ImageGetPropertyItemValue, ; $tagGDIPPROPERTYITEM ; Link ..........; @@MsdnLink@@ GdipGetPropertyItem http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf, ; https://www.media.mit.edu/pia/Research/deepview/exif.html ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyItem($hImage, $iPropID) Local $iBuffer, $tBuffer, $pBuffer, $tPropertyItem, $aResult $iBuffer = _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) If @error Then Return SetError(@error, @extended, -1) If $GDIP_STATUS Then $GDIP_ERROR = 1 Return -1 ElseIf $iBuffer = 0 Then $GDIP_ERROR = 2 Return -1 EndIf $tBuffer = DllStructCreate("byte[" & $iBuffer & "]") $pBuffer = DllStructGetPtr($tBuffer) $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyItem", "hwnd", $hImage, "uint", $iPropID, "uint", $iBuffer, "ptr", $pBuffer) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then $GDIP_ERROR = 3 Return -1 EndIf Local $tPropertyItem = DllStructCreate($tagGDIPPROPERTYITEM, $pBuffer) Local $aRet = [$tPropertyItem.id, $tPropertyItem.length,$tPropertyItem.type, $tPropertyItem.value] Return $aRet EndFunc ;==>_GDIPlus_ImageGetPropertyItem ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertySize ; Description ...: Gets the total size, in bytes, and the number of all the property items stored in an Image object ; Syntax.........: _GDIPlus_ImageGetPropertySize($hImage) ; Parameters ....: $hImage - Pointer to an Image object ; Return values .: Success - Array containing the total size and the number of property items: ; |[0] - Total size, in bytes, of the property items ; |[1] - Number of the property items ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; Author.........: Authenticity ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetPropertyIdList, _GDIPlus_ImageGetPropertyItem ; Link ..........; @@MsdnLink@@ GdipGetPropertyItemSize ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertySize($hImage) Local $aSize[2], $aResult $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertySize", "hwnd", $hImage, "uint*", 0, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then Return -1 $aSize[0] = $aResult[2] $aSize[1] = $aResult[3] Return $aSize EndFunc ;==>_GDIPlus_ImageGetPropertySize ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyItemSize ; Description ...: Gets the size, in bytes, of a specified property item of an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) ; Parameters ....: $hImage - Pointer to an Image object ; $iPropID - Identifier of the property item to be retrieved ; Return values .: Success - $tagGDIPPROPERTYITEM structure containing the property size, type and value pointer ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; Author.........: Authenticity ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetPropertyIdList, _GDIPlus_ImageGetPropertyItem ; Link ..........; @@MsdnLink@@ GdipGetPropertyItemSize ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyItemSize", "hwnd", $hImage, "uint", $iPropID, _ "uint*", 0) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then Return -1 Return $aResult[3] EndFunc ;==>_GDIPlus_ImageGetPropertyItemSize
  2. I have found that: there are 276 functions in Authenticity's GDIP.au3 (written for 3.3.6.1) that are not in 3.3.14.2's GDIPlus.au3. there are many constants in his GDIPConstants.au3 that are not in 3.3.14.2's GDIPlus.au3, but there are some that are. So: GDIP extras.au3 contains functions that are not in GDIPlus.au3. They have been extracted from GDIP.au3 The revised GDIPConstants.au3 has constants that are duplicates of those in GDIPlus.au3 commented out. They are attached. I have done limited testing on 3.3.14.2 with GDIP extras.au3 and the revised GDIPConstants.au3 included. I have undertaken this effort in thanks for the help with GDI+ that I have received on this form, especially from UEZ. Authenticity's thread is here. For those who do not 7zip, I am attaching his GDIP as a zip file. It contains many examples. GDIP33142.zip GDIPAuthenticity.zip
  3. The following code is one of my many attempts to get the value of a string property from an image. It doesn't work. I know that IMAGEDESCRIPTION has a string value. In one of my many attempts, I did get the string OLYMPUS .., which I know is correct from IrfanView, but I can't get it again. How should I get this string? #include <GDIPlus.au3> Opt('MustDeclareVars',1) ; Property Item structure Global Const $tagGDIPPROPERTYITEM = _ "uint id;" & _ ; ID of this property "uint length;" & _ ; Length of the property value, in bytes "ushort type;" & _ ; Type of the value, as one of TAG_TYPE_XXX constants "ptr value;" ; property value Global Const $GDIP_PROPERTYTAGIMAGEDESCRIPTION = 0x010E ; #VARIABLES# =================================================================================================================== Global $ghGDIPMatrix = 0 Global $GDIP_STATUS = 0 Global $GDIP_ERROR = 0 Local $Dsk_ghImage _GDIPlus_Startup() $Dsk_ghImage = _GDIPlus_ImageLoadFromFile('H:\b\PA160005 - Copy.JPG') Local $propListVec = _GDIPlus_ImageGetPropertyIdList($Dsk_ghImage) Local $qProps = $propListVec[0] For $i = 1 To $qProps $propListVec[$i] = Hex($propListVec[$i]) While StringLeft($propListVec[$i],1)='0' $propListVec[$i] = StringMid($propListVec[$i],2) WEnd ConsoleWrite($propListVec[$i]&@CRLF) Next Local $tProp = _GDIPlus_ImageGetPropertyItem($Dsk_ghImage,$GDIP_PROPERTYTAGIMAGEDESCRIPTION) Local $len = $tProp.length Local $s = 'char str['&$len&']' Local $ptr = $tProp.value Local $tStr = DllStructCreate($s,$ptr) MsgBox(0,'@error',@error) Local $strval = DllStructGetData($tStr,'str') MsgBox(0,'','@error '&@error&' strval '&$strval) ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyIdList ; Description ...: Gets a list of the property identifiers used in the metadata of an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyIdList($hImage) ; Parameters ....: $hImage - Pointer to an Image object ; Return values .: Success - Array of property identifiers: ; |[0] - Number of property identifiers ; |[1] - Property identifier 1 ; |[2] - Property identifier 2 ; |[n] - Property identifier n ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; |$GDIP_ERROR: ; | 1 - The _GDIPlus_ImageGetPropertyCount function failed, $GDIP_STATUS contains the error code ; | 2 - The image does not contain any property items ; | 3 - The _GDIPlus_ImageGetPropertyIdList function failed, $GDIP_STATUS contains the error code ; Author.........: Authenticity ; Remarks .......: The property item identifiers are declared in GDIPConstants.au3, those that start with $GDIP_PROPERTYTAGN* ; Related .......: _GDIPlus_ImageGetAllPropertyItems, _GDIPlus_ImageGetPropertyCount, _GDIPlus_ImageGetPropertyItem ; Link ..........; @@MsdnLink@@ GdipGetPropertyIdList ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyIdList($hImage) Local $iI, $iCount, $tProperties, $pProperties, $aProperties[1], $aResult $iCount = _GDIPlus_ImageGetPropertyCount($hImage) If @error Then Return SetError(@error, @extended, -1) If $GDIP_STATUS Then $GDIP_ERROR = 1 Return -1 ElseIf $iCount = 0 Then $GDIP_ERROR = 2 Return -1 EndIf $tProperties = DllStructCreate("uint[" & $iCount & "]") $pProperties = DllStructGetPtr($tProperties) $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyIdList", "hwnd", $hImage, "int", $iCount, "ptr", $pProperties) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then $GDIP_ERROR = 3 Return -1 EndIf ReDim $aProperties[$iCount + 1] $aProperties[0] = $iCount For $iI = 1 To $iCount $aProperties[$iI] = DllStructGetData($tProperties, 1, $iI) Next Return $aProperties EndFunc ;==>_GDIPlus_ImageGetPropertyIdList ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyItem ; Description ...: Gets a specified property item (piece of metadata) from an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyItem($hImage, $iPropID) ; Parameters ....: $hImage - Pointer to an Image object ; $iPropID - Identifier of the property item to be retrieved ; Return values .: Success - $tagGDIPPROPERTYITEM structure containing the property size, type and value pointer ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; |$GDIP_ERROR: ; | 1 - The _GDIPlus_ImageGetPropertyItemSize function failed, $GDIP_STATUS contains the error code ; | 2 - The specified property identifier does not exist in the image ; | 3 - The _GDIPlus_ImageGetPropertyItem function failed, $GDIP_STATUS contains the error code ; Author.........: Authenticity ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetPropertyIdList, _GDIPlus_ImageGetPropertyItemSize, $tagGDIPPROPERTYITEM ; Link ..........; @@MsdnLink@@ GdipGetPropertyItem ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyItem($hImage, $iPropID) Local $iBuffer, $tBuffer, $pBuffer, $tPropertyItem, $aResult $iBuffer = _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) If @error Then Return SetError(@error, @extended, -1) If $GDIP_STATUS Then $GDIP_ERROR = 1 Return -1 ElseIf $iBuffer = 0 Then $GDIP_ERROR = 2 Return -1 EndIf $tBuffer = DllStructCreate("byte[" & $iBuffer & "]") $pBuffer = DllStructGetPtr($tBuffer) $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyItem", "hwnd", $hImage, "uint", $iPropID, "uint", $iBuffer, "ptr", $pBuffer) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then $GDIP_ERROR = 3 Return -1 EndIf $tPropertyItem = DllStructCreate($tagGDIPPROPERTYITEM, $pBuffer) Return $tPropertyItem EndFunc ;==>_GDIPlus_ImageGetPropertyItem ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyCount ; Description ...: Gets the number of properties (pieces of metadata) stored in an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyCount($hImage) ; Parameters ....: $hImage - Pointer to an Image object ; Return values .: Success - Number of property items store in the Image object ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; Author.........: Authenticity ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetAllPropertyItems, _GDIPlus_ImageGetPropertyIdList ; Link ..........; @@MsdnLink@@ GdipGetPropertyCount ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyCount($hImage) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyCount", "hwnd", $hImage, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then Return -1 Return $aResult[2] EndFunc ;==>_GDIPlus_ImageGetPropertyCount ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageGetPropertyItemSize ; Description ...: Gets the size, in bytes, of a specified property item of an Image object ; Syntax.........: _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) ; Parameters ....: $hImage - Pointer to an Image object ; $iPropID - Identifier of the property item to be retrieved ; Return values .: Success - $tagGDIPPROPERTYITEM structure containing the property size, type and value pointer ; Failure - -1 and either: ; |@error and @extended are set if DllCall failed ; |$GDIP_STATUS contains a non zero value specifying the error code ; Author.........: Authenticity ; Remarks .......: None ; Related .......: _GDIPlus_ImageGetPropertyIdList, _GDIPlus_ImageGetPropertyItem ; Link ..........; @@MsdnLink@@ GdipGetPropertyItemSize ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertyItemSize", "hwnd", $hImage, "uint", $iPropID, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) $GDIP_STATUS = $aResult[0] If $GDIP_STATUS Then Return -1 Return $aResult[3] EndFunc ;==>_GDIPlus_ImageGetPropertyItemSize
  4. UEZ has kindly provided me with code that rotates an image per a line: see here Because I want to trim a photograph after rotation, I need to crop the photo. I wrote code which calls _GDIPlus_GraphicsSetClipRect() to do this, but it places spurious stuff in the corners: see 2.jpg attached. I want only the trimmed photo to show. The original jpeg is also attached. The arguments to _GDIPlus_GraphicsSetClipRect() come from solving 2 simultaneous equations: if a and b are the width and height of the original photo, find x and y, the width and height of the rotated and cropped rectangle; a = x cos(ang) + y sin(ang) b = x sin(ang) + y cos(ang) My solution is: x = (b * sin(ang) - a*cos(ang)) / (sin(ang)^2 - (cos(ang)^2) y = (b * cos(ang) - a * sin(ang)) / (cos(ang)^2 - sin(ang)^2) To try to get a handle on the problem, I have temporarily added in several lines in Case $btn. In 2.jpg, you can see that the rectangle bounding the area to be retained is in the wrong place. The code is: #include <ButtonConstants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars',1) Global Const $MK_SHIFT = 0x4 Global Const $MK_CONTROL = 0x8 Global Const $fPi = ACos(-1), $fPi2 = $fPi / 2, $fRad = 180 / $fPi GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL") GUIRegisterMsg($WM_PAINT,'WM_PAINT') Global $gX0=10,$gX1=580,$gY0,$gY1,$gForm1,$glblPic,$iLW,$iLH,$iW,$iH Global $ghCanvas,$ghImage,$ghPen,$gGraphicPic,$ghBitmap,$ghMatrix,$ghImageClone,$ghGfxClone Global Const $kDegToRads = 3.14159/180 main() Func main() $gForm1 = GUICreate("Form1", 623, 601, 192, 114) $iLW = 589 $iLH = 500 $glblPic = GUICtrlCreateLabel("", 8, 8, $iLW, $iLH) Local $btn = GUICtrlCreateButton("Rotate", 472, 560, 65, 25) GUISetState(@SW_SHOW) Local $oldY0,$oldY1,$fAngle _GDIPlus_Startup() $ghPen = _GDIPlus_PenCreate(0xFF999999,2) $ghImage = _GDIPlus_ImageLoadFromFile('H:\b\pergola.jpg') Local $h = GUICtrlGetHandle($glblPic) $gGraphicPic = _GDIPlus_GraphicsCreateFromHWND($h) $gY0 = 400 $gY1 = 400 $iW = _GDIPlus_ImageGetWidth($ghImage) $iH = _GDIPlus_ImageGetHeight($ghImage) $ghBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $ghCanvas = _GDIPlus_ImageGetGraphicsContext($ghBitmap) $ghMatrix = _GDIPlus_MatrixCreate() ; Loop until the user exits. While True If $gY0<>$oldY0 Or $gY1<>$oldY1 Then Paint() $oldY0 = $gY0 $oldY1 = $gY1 Else Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btn $ghImageClone=_GDIPlus_BitmapCreateFromScan0($iW, $iH) $ghGfxClone=_GDIPlus_ImageGetGraphicsContext($ghImageClone) _GDIPlus_MatrixTranslate($ghMatrix, $iW/2, $iH/2) $gY1 = 300 ; temp Local $ang = -Angle($gY1-$gY0, $gX1-$gX0) _GDIPlus_MatrixRotate($ghMatrix, $ang) ;~ _GDIPlus_MatrixRotate($ghMatrix, -Angle($gY1-$gY0, $gX1-$gX0)) _GDIPlus_MatrixTranslate($ghMatrix, -$iW/2, -$iH/2) _GDIPlus_GraphicsSetTransform($ghGfxClone, $ghMatrix) _GDIPlus_GraphicsDrawImageRect($ghGfxClone,$ghImage,0,0,$iW,$iH) Local $angRads = $ang*$kDegToRads Local $sinAng = Sin($angRads) Local $cosAng = Cos($angRads) Local $wid = ($iLH*$sinAng-$iLW*$cosAng)/($sinAng^2-$cosAng^2) Local $left = ($iLW-$wid)/2 Local $ht = ($iLH*$cosAng-$iLW*$sinAng)/($cosAng^2-$sinAng^2) Local $top = ($iLH-$ht)/2 _GDIPlus_GraphicsDrawRect($ghGfxClone,$left,$top,$wid,$ht,$ghPen) ; temp _GDIPlus_GraphicsSetClipRect($ghGfxClone,$left,$top,$wid,$ht,0) _GDIPlus_GraphicsDispose($ghGfxClone) $ghGfxClone=_GDIPlus_ImageGetGraphicsContext($ghImage) _GDIPlus_GraphicsClear($ghImage) _GDIPlus_GraphicsDrawImageRect($ghGfxClone,$ghImageClone,0,0,$iW,$iH) _GDIPlus_GraphicsDispose($ghGfxClone) _GDIPlus_ImageDispose($ghImageClone) $gy0 = 400 $gy1 = 400 Paint() _GDIPlus_ImageSaveToFile($ghImage,'H:\b\2.jpg') ; added - is rotated, with same size as original file EndSwitch EndIf WEnd ; Clean up resources _GDIPlus_MatrixDispose($ghMatrix) _GDIPlus_ImageDispose($ghCanvas) _GDIPlus_ImageDispose($ghImage) _GDIPlus_ImageDispose($ghBitmap) _GDIPlus_PenDispose($ghPen) _GDIPlus_GraphicsDispose($gGraphicPic) _GDIPlus_Shutdown() EndFunc Func WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam Local Const $kYmax=$iLH-1,$kDelta=2 Local $vec = GUIGetCursorInfo($gForm1) If $vec[4] = $vec[4]=$glblPic Then Local $iDelta = BitShift($wParam, 16) ; positive = up Local $iKeys = _WinAPI_LoWord($wParam) If BitAND($iKeys,$MK_CONTROL)=$MK_CONTROL Then If BitAND($iKeys,$MK_SHIFT)=$MK_SHIFT Then ; do nothing Else If $iDelta > 0 And $gY0>3 Then $gY0 -= $kDelta If $iDelta < 0 And $gY0<$kYmax Then $gY0 += $kDelta EndIf Else If BitAND($iKeys,$MK_SHIFT)=$MK_SHIFT Then If $iDelta > 0 And $gY1>3 Then $gY1 -= $kDelta If $iDelta < 0 And $gY1<$kYmax Then $gY1 += $kDelta Else If $iDelta > 0 And $gY0>3 Then $gY0 -= $kDelta If $iDelta < 0 And $gY0<$kYmax Then $gY0 += $kDelta If $iDelta > 0 And $gY1>3 Then $gY1 -= $kDelta If $iDelta < 0 And $gY1<$kYmax Then $gY1 += $kDelta EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_MOUSEWHEEL Func Paint() _GDIPlus_GraphicsClear($ghCanvas,0) _GDIPlus_GraphicsDrawImageRect($ghCanvas, $ghImage, 0,0, $iLW, $iLH) _GDIPlus_GraphicsDrawLine($ghCanvas, $gX0, $gY0, $gX1, $gY1, $ghPen) _GDIPlus_GraphicsDrawImageRect($gGraphicPic, $ghBitmap, 0, 0, $iW, $iH) EndFunc Func WM_PAINT() _WinAPI_RedrawWindow($gForm1, 0, 0, $RDW_UPDATENOW) Paint() _WinAPI_RedrawWindow($gForm1, 0, 0, $RDW_VALIDATE) EndFunc Func Angle($y, $x) ;return value is in degree Local Const $fPi = ACos(-1), $fPi2 = ACos(-1) / 2, $fRad = 180 / $fPi Switch True Case ($x > 0) Return ATan($y / $x) * $fRad Case ($x < 0 And $y >= 0) Return ATan($y / $x + $fPi) * $fRad Case ($x < 0 And $y < 0) Return ATan($y / $x - $fPi) * $fRad Case ($x = 0 And $y > 0) Return $fPi2 * $fRad Case ($x = 0 And $y < 0) Return -$fPi2 * $fRad Case ($x = 0 And $y = 0) Return 0 EndSwitch EndFunc I also don't understand how the rotated picture gets displayed. There are graphics objects, graphics contexts and PDI+ bitmaps. How are they related? Help would be much appreciated.
  5. Here some useless graphical examples using GDI+, made for fun (my 1st GDI+ codes ): !Some examples may run slowly on WinXP machines (workaround in this thread)! Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!! #01 Flying Pearl Necklaces: Source code here (577 downloads previously)! Flying Pearl Necklaces.au3 #02 Flying Squares: Source code here (265 downloads previously)! Flying Squares.au3 #03 Rotating Squares: Source code here! Rotating_Squares.au3 #04 Plasma & Plasma Variant: Source codes here! Plasma: Plasma.au3 Plasma Variant: Plasma Variante.au3 #05 L-System Fractals: Source code here (382 downloads previously)! L-System Fractals.7z #06 Sinus Scroller: Source code here (218 downloads previously)! Sinus Scroller.au3 #07 Visualization: Analog Meter: download here (including source, needed files and compiled exe): Source code + needed files here (473 downloads previously)! Visualizer_Analog Meter.7z More GDI+ visualizations here by monoceres or by Eukalyptus Audio Visualization Collection (German site) #08 Particle Catapult: Source code here (70 downloads previously)! Particle_Catapult.au3 #09 Rotating Cube: Source code here (79 downloads previously)! Rotating_Cube.au3 #10 Simple Ball Collision Simulation: Source code here (35 downloads previously)! Simple_Ball_Collision_Simulation.au3 (it is not finished yet! look from time to time into this thread for an update! Nice tutorial here) #11 Particle Explosions: Source code here: Explosions__from_AutoIteroids_.au3 #12 Rotating Letters: Source codes here: Rotating Letters.au3 Transparent version (87 downloads previously): Rotating Letters Transparent.au3 #13 Rotating Cube 2: Source code here (53 downloads previously): Rotating Cube 2.au3 #14 Rotating Cube 2 with Textures: Source code here (68 downloads previously): Rotating Cube 2 + Textures.7z #15 Rotating Cube 2 with some examples from above on each surface: Source code here (55 downloads previously): Rotating Cube 2 + animated surfaces.7z #16 Rotating Cube 2 simple: Source code here: Rotating Cube 2 - Simple.au3 Or with background pic or Rotating Cube 2 simple + Background #17 Tramp of Particles: Source code here: Tramp of Particles.au3 #18 Twister: Source code here: Twister.au3 WinAPI version is 2.5x faster (look in AiO archive)! #19 Star Burst: Source code here: Star Burst.au3 #20 Warp Starfield: Source code here: Warp Starfield.au3 #21 Plasma 2: Source code here: Plasma 2.au3 #22 Isometric Level-3 Cube: Source code here: Isometric Level-3 Cube.au3 #23 Zoomer: Source code here (7 downloads previously): Zoomer.au3 GDIP.au3 needed for Zoomer! #24 Suspended Cloth Simulation: Source code here: Suspended Cloth Simulation.au3 #25 Visualizer: Oscilloscope Farbrausch: Source code here (30 downloads previously): Visualizer Oscilloscope Farbrausch.au3 To run Visualizer Oscilloscope Farbrausch.au3 properly you need following files: Bass.au3, BassExt.au3, Bass.dll and BassExt.dll. These files can be found in AiO package or on German AutoIt site! #26 Im- Exploding Particle Logo: Source code here: Im- Exploding Particle Logo.7z #27 Pixel Text Effect: Source code here (12 downloads previously): Pixel Text Effect.7z or with ♬chip sound♫ aka demo style (download from German AutoIt site or from AiO archive). #27 works best on Vista+ machines! #28 Star Wars Scroller: Source code here: Star Wars Scroller.au3 For a complete Star Wars Intro have a look to eukalyptus' Star-Wars Intro (see below!) #29 Rotated Letters Simple: Source code here: Rotated Letters Simple.au3 #30 Ballet of Letters: Source code here: Ballet of Letters.au3 #31 Perfect Illusion: Source code here: Perfect Illusion Variant 1.au3 Perfect Illusion Variant 2.au3 Perfect Illusion Variant 3.au3 Mesmerizing Squares Screensaver (previous downloads approx. 100): Mesmerizing_Squares_Screensaver.au3 (compiled version here): Don't stare too long on it or you will be mesmerized One more: Rotating triangle + vertical scroller + music (modification of monoceres' code): Magic Lines Screesaver (110 downloads previously): Magic Lines Screensaver.7z Another screensaver - 3D Star Scrolling Screensaver (83 downloads previously): GDI+ 3D Star Scrolling Screensaver.au3 !Some examples may run slowly on WinXP machines (workaround in this thread)! Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!! AiO download link ☞ AiO1 or AiO2 ☜ (all examples above compiled + source codes packed with 7-Zip) Have a look also to the game I made using GDI+: Link: AUTOITEROIDS v1.018 Build 2011-06-09 (Final) (a clone of the game Asteroids made by Atari 1979) I hope you like it! Any kind of comment is welcome!!! My examples are all done with AutoIt v3.3.0.0 on Vista x32! Kudos to: monoceres, smashly, malkey, Eukalyptus and Authenticity! Check out Some Graphical Examples using GDI+ Vol. II build 2016-01-25 More examples made by other members in this thread (thanks you very much!): Spinning Flying Pearl Necklaces by smashly: Spinning Flying Squares by smashly and ProgAndy LMP Visualization by youknowwho4eva: SineWorm by monoceres: Enterprise Warp by youknowwho4eva: Confused ASCII by monoceres: Lissajous Curve by monoceres: Butterfly Curve by monoceres: ParticleCollisionFun2 by crashdemons: Extreme nice physic engine by moritz1243 (German site): Lingering Line by MvGulik: Scroller Sine Blobs by Lakes: Cube surface and 3D axis and by Lakes: by eukalyptus: by eukalyptus: Two more examples by eukalyptus: and FEEL FREE TO POST YOUR GDI+ EXAMPLES HERE,TOO!!! Have fun and regards, UEZ ✌ PS: more modified examples also here in this topic History of my useless scripts above:
  6. In my code, the mouse wheel causes the line to move up and down. It does move down to where the picture is, but is not seen there. This can be observed by scrolling down to the picture, and then up again: the line reappears as expected. How can I get the line to show on the picture? This seems to be a matter of transparency, but I have not found a way of getting the background of $graphLine to be transparent. The code is now: #include <ButtonConstants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars',1) Global Const $MK_SHIFT = 0x4 Global Const $MK_CONTROL = 0x8 GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL") Global $gY0,$gY1,$gForm1,$glblLine,$glblPic main() Func main() $gForm1 = GUICreate("Form1", 623, 601, 192, 114) $glblLine = GUICtrlCreateLabel("", 8, 8, 604, 137) $glblPic = GUICtrlCreateLabel("", 8, 8, 589, 500) Local $btn = GUICtrlCreateButton("Rotate", 472, 560, 65, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $oldY0,$oldY1 _GDIPlus_Startup() Local $h = GUICtrlGetHandle($glblLine) ; limit graphics to area of $label Local $GraphicLine = _GDIPlus_GraphicsCreateFromHWND($h) Local $hPen = _GDIPlus_PenCreate(0xFF000000,2) Local $image = _GDIPlus_ImageLoadFromFile('H:\a\P5130021.jpg') Local $h = GUICtrlGetHandle($glblPic) Local $GraphicPic = _GDIPlus_GraphicsCreateFromHWND($h) _GDIPlus_GraphicsDrawImage($GraphicPic,$image,0,0) $gY0 = 67 $gY1 = 67 _GDIPlus_GraphicsClear($GraphicLine,0) _GDIPlus_GraphicsDrawLine($GraphicLine, 10, $gY0, 350, $gY1, $hPen) ; Loop until the user exits. While True If $gY0<>$oldY0 Or $gY1<>$oldY1 Then _GDIPlus_GraphicsClear($GraphicLine,0xFFD4D0C8) _GDIPlus_GraphicsDrawLine($GraphicLine, 10, $gY0, 590, $gY1, $hPen) $oldY0 = $gY0 $oldY1 = $gY1 Else Switch GUIGetMsg() Case $GUI_EVENT_CLOSE,$btn Exit EndSwitch EndIf WEnd ; Clean up resources _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($GraphicLine) _GDIPlus_Shutdown() EndFunc Func WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam Local Const $ymax=500 Local $vec = GUIGetCursorInfo($gForm1) If $vec[4] = $glblLine Or $vec[4]=$glblPic Then Local $iDelta = BitShift($wParam, 16) ; positive = up Local $iKeys = _WinAPI_LoWord($wParam) If BitAND($iKeys,$MK_CONTROL)=$MK_CONTROL Then If BitAND($iKeys,$MK_SHIFT)=$MK_SHIFT Then ; do nothing Else If $iDelta > 0 And $gY0>3 Then $gY0 -= 1 If $iDelta < 0 And $gY0<$ymax Then $gY0 += 1 EndIf Else If BitAND($iKeys,$MK_SHIFT)=$MK_SHIFT Then If $iDelta > 0 And $gY1>3 Then $gY1 -= 1 If $iDelta < 0 And $gY1<$ymax Then $gY1 += 1 Else If $iDelta > 0 And $gY0>3 Then $gY0 -= 1 If $iDelta < 0 And $gY0<$ymax Then $gY0 += 1 If $iDelta > 0 And $gY1>3 Then $gY1 -= 1 If $iDelta < 0 And $gY1<$ymax Then $gY1 += 1 EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_MOUSEWHEEL Some other questions: Do I really need GDI+, or is there a simpler way? My code creates Graphics (canvases?) from labels. Is this legitimate? I have found MSDN to be un-helpful in learning GDI+. Is there a better learning tool?
  7. Hey all. I'm trying to know when my user clicks on a Rect drawn via GDI+. Everything is almost working except I have a strange behaviour in the "order" clicks are fired. I created a simplified code to help : #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) ;0=disabled, 1=OnEvent mode enabled _GDIPlus_Startup() Global $hGUI, $hGraphics Global $iWidth = 1024, $iHeight = 762 createGUI() draw() While 1 Sleep(10) WEnd Func createGUI() $hGUI = GUICreate("Current CasparCG Output", $iWidth,$iHeight) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetBkColor(0x000000) GUISetState(@SW_SHOW) $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;sets the graphics object rendering quality (antialiasing) EndFunc ;==>Example Func draw() ;_WinAPI_draw($hGUI,"","",BitOR($RDW_ERASE,$RDW_INVALIDATE,$RDW_UPDATENOW)) _GDIPlus_GraphicsClear($hGraphics) $hFamily = _GDIPlus_FontFamilyCreate("Arial") $hFont = _GDIPlus_FontCreate($hFamily, 15, 1) $hPen = _GDIPlus_PenCreate(0xFFFEDCFF, 2) ;color format AARRGGBB (hex) $hFormat = _GDIPlus_StringFormatCreate() _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_StringFormatSetLineAlign($hFormat, 1) $hBrushString = _GDIPlus_BrushCreateSolid(0xFFFFFFFF) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFFF00FF) ;color format AARRGGBB (hex) For $i = 1 to 2 Local $x = 0.25 Local $y = 0.25 Local $w = 0.5 Local $h = 0.5 Local $title = "Layer "&$i If $x >= -1 And $x <= 1 Then $x *= $iWidth If $y >= -1 And $y <= 1 Then $y *= $iHeight If $w >= -1 And $w <= 1 Then $w *= $iWidth If $h >= -1 And $h <= 1 Then $h *= $iHeight $hItem = GUICtrlCreateLabel("", $x,$y,$w,$h) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetOnEvent($hItem,"_gui_layer_clicked") ConsoleWrite("Created label with handle="&$hItem&" $i= " & $i&@CRLF) _GDIPlus_GraphicsFillRect($hGraphics, $x, $y, $w, $h,$hBrush) _GDIPlus_GraphicsDrawRect($hGraphics, $x, $y, $w, $h,$hPen) $tLayout = _GDIPlus_RectFCreate($x, $y, $w, $h) $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $title, $hFont, $tLayout, $hFormat) _GDIPlus_GraphicsDrawStringEx($hGraphics, $title, $hFont, $aInfo[0], $hFormat, $hBrushString) Next _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_FontDispose($hFont) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_BrushDispose($hBrushString) Return 1 EndFunc Func _gui_layer_clicked() ConsoleWrite("Clicked on " & @GUI_CtrlId&@CRLF) EndFunc Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() Exit EndSelect EndFunc ;==>SpecialEvents What happens there : We have two rectangles, with the one labelled "2" is front and, the one labelled "1" in background. However when we click, the fired label is the one created first (in the background) and not the second one (in the front). Is it normal ? If yes, is there any way to change this order ? If I create another label after a first one on the same coords, I would the second one to be fired instead of the first one (This is a simplified code I can't just invert the label order creation easily) Thanks for your help
  8. Struggling a bit to get this GDI+ function converted to AutoIt. #include <GDIPlus.au3> _GDIPlus_Startup() Global $hImage = _GDIPlus_ImageLoadFromFile("F:\DCIM\Camera\20170515_111804.jpg") Global $tBufferSize = DllStructCreate("uint") Global $tProperties = DllStructCreate("uint") _GDIPlus_GetPropertySize($hImage, $tBufferSize, $tProperties) Global $tAllItems = DllStructCreate("struct;char[" & DllStructGetData($tBufferSize, 1) & "];endstruct") _GDIPlus_GetAllPropertyItems($hImage, $tBufferSize, $tProperties, $tPropertyItem) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Func _GDIPlus_GetAllPropertyItems(ByRef $hImage, Const $tTotalBufferSize, Const $tNumProperties, ByRef $tAllItems) If (Not IsDllStruct($tPropertyItem)) Then Return SetError(-1, 0, "") Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetAllPropertyItems", "hwnd", $hImage, "unit", DllStructGetData($tTotalBufferSize, 1), "uint", DllStructGetData($tNumProperties, 1), "ptr", DllStructGetPtr($tAllItems)) If (@error) Then Return SetError(@error, @extended, ConsoleWrite("@Error = " & @error & @LF)) If ($aResult[0]) Then Return SetError($aResult[0], @extended, "") Return $aResult[0] EndFunc ;==>_GDIPlus_GetAllPropertyItems Func _GDIPlus_GetPropertySize(Const ByRef $hImage, ByRef $tTotalBufferSize, ByRef $tNumProperties) If (Not IsDllStruct($tTotalBufferSize)) Then Return SetError(-1, 0, "") If (Not IsDllStruct($tNumProperties)) Then Return SetError(-2, 0, "") Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetPropertySize", "hwnd", $hImage, "uint_ptr", DllStructGetPtr($tTotalBufferSize), "uint_ptr", DllStructGetPtr($tNumProperties)) If (@error) Then Return SetError(@error, @extended, "") If ($aResult[0]) Then Return SetError($aResult[0], 0, "") Return $aResult[0] EndFunc ;==>_GDIPlus_GetPropertySize Got the GetPropertySize function to work, gives me the correct buffer size and the property count, but I cannot figure out how to get the struct for the all items. Function on MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/ms535372(v=vs.85).aspx Struct needed: PropertyItem class: https://msdn.microsoft.com/en-us/library/windows/desktop/ms534493(v=vs.85).aspx Found other topics about this function in other languages where they used a blank string as the buffer, so I tried using a char array, which doesn't work. Just cannot figure out how to create the struct buffer to hold the data.
  9. Since monoceres has released I'm searching for a way to map the 2D image of the earth to a 3D sphere with rotation. Here the result (after 9 years!) as a non realistic physical animation: ==> Due to the fact that AutoIt / GDI+ are not that fast I couldn't add a moon animation additionally. Thanks to one of Eukalyptus' code to pointing me to the right direction. U rock man. Source code extract only - not working because of missing binary data (images): ;coded by UEZ build 2017-02-25 #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 Global Const $iW = 800, $iH = 500, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ Rotating Earth coded by UEZ 2017" Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi AutoItSetOption("GUIOnEventMode", 1) GDIPlus_RotatingEarth() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_RotatingEarth() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) ;, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hGUI) ;~ GUISetCursor(16, 1) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) 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(0xFFF0F0F0), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16), _ $hImage_Earth = _GDIPlus_BitmapCreateFromMemory(_Earth()), _ $hImage_Galaxy = _GDIPlus_BitmapCreateFromMemory(_Galaxy()), _ $hMatrix = _GDIPlus_MatrixCreate(), $hPath = _GDIPlus_PathCreate() Local $aDim = _GDIPlus_ImageGetDimension($hImage_Earth) Local Const $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_Earth) _GDIPlus_GraphicsDrawStringEx($hGfx, "Coded by UEZ 2017 ;-)", $hFont_FPS, _GDIPlus_RectFCreate(0, $aDim[1] / 2 - 4, 120, 12), $hFormat_FPS, $hBrush_FPS) _GDIPlus_ImageDispose($hGfx) Local Const $hTexture_Earth = _GDIPlus_TextureCreate($hImage_Earth) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", -200, "float", 0, "long", 0) Local $iDiameter = $aDim[0] < $aDim[1] ? $aDim[0] : $aDim[1], _ $iDiameter2 = $iDiameter / 2, _ $fDX = ($iW - $iDiameter) / 2, $fDY = ($iH - $iDiameter) / 2 _GDIPlus_PathAddEllipse($hPath, $fDX - 1, $fDY - 1, $iDiameter + 2, $iDiameter + 2) Local Const $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterColor($hBrush, 0x04000008) _GDIPlus_PathBrushSetCenterPoint($hBrush, $fDX + $iDiameter2 + 1, $fDY + $iDiameter2 + 1) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xF0000000) _GDIPlus_PathBrushSetGammaCorrection($hBrush, 1) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.5, 0.5) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Local $fScale, $fTmp, $iStep = 2 ;the higher $iStep is the faster the animation & lower the quality. Do ;~ DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, _ ;~ "float", $iW, "float", $iH) ;erase canvas background ;~ _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $BLACKNESS) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hImage_Galaxy, 0, 0, $iW, $iH) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", 0.75, "float", 0, "long", 0) For $i = 1 To $iDiameter2 Step $iStep $fScale = 1 + $i / $iDiameter2 _GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0) _GDIPlus_MatrixTranslate($hMatrix, $fDX + $iDiameter2, $fDY + $iDiameter2) _GDIPlus_MatrixScale($hMatrix, $fScale, $fScale) _GDIPlus_MatrixTranslate($hMatrix, -$iDiameter2, -$iDiameter2) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Earth, _ "float", $i, "float", $i, "float", $iDiameter - $i * 2, "float", $iDiameter - $i * 2) Next _GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) _GDIPlus_GraphicsFillRect($hCanvas, $fDX, $fDY, $iDiameter, $iDiameter, $hBrush) _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_ImageDispose($hImage_Earth) _GDIPlus_ImageDispose($hImage_Galaxy) _GDIPlus_BrushDispose($hTexture_Earth) _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($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) EndFunc ;==>GDIPlus_RotatingEarth Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2016-12-01 ... Download: Rotating Earth v1.7.au3 In line 92 you can modify the $iStep variable -> the higher $iStep is the faster the animation & lower the quality. So long...
  10. mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples
  11. As requested by @Lakes here: GDI and GDI+ versions of 3D Sinus Wave. GDI ≠ GDI+! GDI: ;coded by UEZ build 2017-01-18 #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 <GuiConstantsEx.au3> #include <WinAPIGdi.au3> #include <WindowsConstants.au3> Global $__f1, $__f2, $__f3, $__fY0, $__fZ0, $__fX1, $__fY1 Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit, $fZoom = 5.0 Global Const $iW = @DesktopWidth * 0.75, $iH = @DesktopHeight * 0.75, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ 3D Sinus Wave v1.1 coded by UEZ / FPS: " Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi, $fPi2 = ACos(-1) * 2 AutoItSetOption("GUIOnEventMode", 1) GDIPlus_3DSinusWave() AutoItSetOption("GUIOnEventMode", 0) Func GDIPlus_3DSinusWave() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) ;, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hGUI) ;~ GUISetCursor(16, 1) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hBitmapGDI = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hGfxDC = _WinAPI_CreateCompatibleDC($hDC) Local Const $hObjOld = _WinAPI_SelectObject($hGfxDC, $hBitmapGDI) Local Const $hPen = _WinAPI_GetStockObject($DC_PEN) Local Const $hPen_Old = _WinAPI_SelectObject($hGfxDC, $hPen) _WinAPI_SetStretchBltMode($hDC, $HALFTONE) $iFPS = 0 Local Const $fEuler = 2.7182818284 Local $fSpace = 6, $iPoints = 16, $fSpace2 = $fSpace / 2, $iPoints2 = $iPoints / 2 Local $fRotX = Random(-360, 360), $fRotY = Random(-360, 360), $fRotZ = Random(-360, 360), $fPower = 20.0 Local $fRx = Random(-1.5, 1,5), $fRy = Random(-1.5, 1,5), $fRz = Random(-1.5, 1,5) Local $c = 0, $t = 0, $aCoords[$iPoints ^ 2][3] Local $i, $j, $x, $y, $z, $x1, $y1, $z1, $x2, $y2, $z2, $x3, $y3, $z3, $fDistance, $r, $g, $b Local $hDLL_gdi32 = DllOpen("gdi32.dll") Local $tLOGBRUSH = DllStructCreate($tagLOGBRUSH) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL") AdlibRegister("CalcFPS", 1000) Do _WinAPI_BitBlt($hGfxDC, 0, 0, $iW, $iH, $hGfxDC, 0, 0, $WHITENESS) ;erase canvas background $c = 0 For $i = 0 To $iPoints - 1 For $j = 0 To $iPoints - 1 $aCoords[$c][0] = $fSpace * $i + $fSpace2 - $fSpace * $iPoints2 $aCoords[$c][1] = $fSpace * $j + $fSpace2 - $fSpace * $iPoints2 $fDistance = Dist(0, 0, $aCoords[$c][0], $aCoords[$c][1]) $aCoords[$c][2] = $fEuler ^ (-$fDistance / 50) * Sin(($fDistance / 10) - $t) * $fPower $c += 1 $t += 0.00075 Next Next For $i = 0 To $iPoints - 2 For $j = 0 To $iPoints - 2 $r = Int(0x80 + $aCoords[$j + $iPoints * $i][0] * 2) $g = Int(0x80 + $aCoords[$j + $iPoints * $i][1] * 2) $b = Int(0x80 + $aCoords[$j + $iPoints * $i][2] * 2) DllCall($hDLL_gdi32, "dword", "SetDCPenColor", "handle", $hGfxDC, "dword", BitShift($b, -16) + BitShift($g, -8) + $r) _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[$j + $iPoints * ($i + 1)][0], $aCoords[$j + $iPoints * ($i + 1)][1], $aCoords[$j + $iPoints * ($i + 1)][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($hDLL_gdi32, "bool", "MoveToEx", "handle", $hGfxDC, "int", $iWh + $x1 * $fZoom, "int", $iHh + $y1 * $fZoom, "ptr", 0) DllCall($hDLL_gdi32, "bool", "LineTo", "handle", $hGfxDC, "int", $iWh + $x2 * $fZoom, "int", $iHh + $y2 * $fZoom) _3Dto2D($aCoords[($j + 1) + $iPoints * $i][0], $aCoords[($j + 1) + $iPoints * $i][1], $aCoords[($j + 1) + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($hDLL_gdi32, "bool", "MoveToEx", "handle", $hGfxDC, "int", $iWh + $x1 * $fZoom, "int", $iHh + $y1 * $fZoom, "ptr", 0) DllCall($hDLL_gdi32, "bool", "LineTo", "handle", $hGfxDC, "int", $iWh + $x2 * $fZoom, "int", $iHh + $y2 * $fZoom) Next Next For $i = 0 To $iPoints - 2 $r = Int(0x80 + $aCoords[$j + $iPoints * $i][0] * 2) $g = Int(0x80 + $aCoords[$j + $iPoints * $i][1] * 2) $b = Int(0x80 + $aCoords[$j + $iPoints * $i][2] * 2) DllCall($hDLL_gdi32, "dword", "SetDCPenColor", "handle", $hGfxDC, "dword", BitShift($b, -16) + BitShift($g, -8) + $r) _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[$j + $iPoints * ($i + 1)][0], $aCoords[$j + $iPoints * ($i + 1)][1], $aCoords[$j + $iPoints * ($i + 1)][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($hDLL_gdi32, "bool", "MoveToEx", "handle", $hGfxDC, "int", $iWh + $x1 * $fZoom, "int", $iHh + $y1 * $fZoom, "ptr", 0) DllCall($hDLL_gdi32, "bool", "LineTo", "handle", $hGfxDC, "int", $iWh + $x2 * $fZoom, "int", $iHh + $y2 * $fZoom) Next For $j = 0 To $iPoints - 2 $r = Int(0x80 + $aCoords[$j + $iPoints * $i][0] * 2) $g = Int(0x80 + $aCoords[$j + $iPoints * $i][1] * 2) $b = Int(0x80 + $aCoords[$j + $iPoints * $i][2] * 2) DllCall($hDLL_gdi32, "dword", "SetDCPenColor", "handle", $hGfxDC, "dword", BitShift($b, -16) + BitShift($g, -8) + $r) _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[($j + 1) + $iPoints * $i][0], $aCoords[($j + 1) + $iPoints * $i][1], $aCoords[($j + 1) + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($hDLL_gdi32, "bool", "MoveToEx", "handle", $hGfxDC, "int", $iWh + $x1 * $fZoom, "int", $iHh + $y1 * $fZoom, "ptr", 0) DllCall($hDLL_gdi32, "bool", "LineTo", "handle", $hGfxDC, "int", $iWh + $x2 * $fZoom, "int", $iHh + $y2 * $fZoom) Next $fRotX += $fRx $fRotY += $fRy $fRotZ += $fRz _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hGfxDC, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) GUIRegisterMsg($WM_MOUSEWHEEL, "") AdlibUnRegister("CalcFPS") ;release resources _WinAPI_SelectObject($hGfxDC, $hPen_Old) _WinAPI_DeleteObject($hPen) _WinAPI_SelectObject($hGfxDC, $hObjOld) _WinAPI_ReleaseDC($hGUI, $hDC) _WinAPI_DeleteDC($hGfxDC) _WinAPI_DeleteObject($hBitmapGDI) GUIDelete($hGUI) DllClose($hDLL_gdi32) EndFunc ;==>GDIPlus_3DSinusWave Func WM_MOUSEWHEEL($hGUI, $iMsg, $wParam, $lParam) Local $wheel_Dir = _WinAPI_HiWord($wParam) If $wheel_Dir > 0 Then $fZoom += 0.25 $fZoom = $fZoom > 20 ? 20 : $fZoom Else $fZoom -= 0.25 $fZoom = $fZoom < 0.25 ? 0.25 : $fZoom EndIf Return "GUI_RUNDEFMSG" EndFunc ;==>WM_MOUSEWHEEL Func Dist($x1, $y1, $x2, $y2) Return Sqrt(($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2)) EndFunc ;==>Dist Func _3Dto2D($fX, $fY, $fZ, $fRotX, $fRotY, $fRotZ, ByRef $__fXPos, ByRef $__fYPos, ByRef $__fZPos) ;apply the x-axis rotation to transform coordinates ($fX, $fY, $fZ) into coordinates ($fX0, $fY0, $fZ0) $__f1 = $fRotX * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fY0 = $fY * $__f2 + $fZ * $__f3 $__fZ0 = $fZ * $__f2 - $fY * $__f3 ;apply the y-axis rotation to ($fX0, $__fY0, $fZ0) to obtain ($__fX1, $__fY1, $fZ1) $__f1 = $fRotY * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fX1 = $fX * $__f2 - $__fZ0 * $__f3 $__fY1 = $__fY0 ;~ $__fZ1 = $__fZ0 * $__f2 + $fX * $__f2 ;finally, apply the z-axis rotation to obtain the point ($fXPos, $fYPos) $__f1 = $fRotZ * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fXPos = $__fX1 * $__f2 + $__fY1 * $__f3 $__fYPos = $__fY1 * $__f2 - $__fX1 * $__f3 $__fZPos = $__fZ0 EndFunc ;==>_3Dto2D Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 WinSetTitle($hGUI, "", $sTitle & $iShowFPS) EndFunc ;==>CalcFPS GDI+ ;coded by UEZ build 2017-01-17 #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 $__f1, $__f2, $__f3, $__fY0, $__fZ0, $__fX1, $__fY1 Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit Global Const $iW = @DesktopWidth * 0.75, $iH = @DesktopHeight * 0.75, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ 3D Sinus Wave v1.0 coded by UEZ" Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi, $fPi2 = ACos(-1) * 2 AutoItSetOption("GUIOnEventMode", 1) GDIPlus_3DSinusWave() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_3DSinusWave() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) ;, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hGUI) ;~ GUISetCursor(16, 1) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) 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(0xFFFFFFFF), _ $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xF0808080), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16), _ $hPath = _GDIPlus_PathCreate(), _ $hPen = _GDIPlus_PenCreate(0xCF101010, 1.25) _GDIPlus_PenSetLineJoin($hPen, 2) ;~ _GDIPlus_PenSetDashCap($hPen, $GDIP_DASHCAPROUND) ;~ _GDIPlus_PenSetLineCap($hPen, 0x12, 0x12, 2) $iFPS = 0 Local $fEuler = 2.7182818284 Local $fSpace = 6, $iPoints = 16, $fSpace2 = $fSpace / 2, $iPoints2 = $iPoints / 2 Local $fRotX = Random(-360, 360), $fRotY = Random(-360, 360), $fRotZ = Random(-360, 360), $fZoom = 5.0, $fPower = 20.0 Local $fRx = Random(-1.5, 1,5), $fRy = Random(-1.5, 1,5), $fRz = Random(-1.5, 1,5) Local $c = 0, $t = 0, $aCoords[$iPoints ^ 2][3] Local $i, $j, $x, $y, $z, $x1, $y1, $z1, $x2, $y2, $z2, $x3, $y3, $z3, $fDistance, $r, $g, $b GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Do ;~ DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, _ ;~ "float", $iW, "float", $iH) ;erase canvas background _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $WHITENESS) $c = 0 For $i = 0 To $iPoints - 1 For $j = 0 To $iPoints - 1 $aCoords[$c][0] = ($fSpace * $i + $fSpace2 - $fSpace * $iPoints2) $aCoords[$c][1] = ($fSpace * $j + $fSpace2 - $fSpace * $iPoints2) $fDistance = Dist(0, 0, $aCoords[$c][0], $aCoords[$c][1]) $aCoords[$c][2] = $fEuler ^ (-$fDistance / 50) * Sin(($fDistance / 10) - $t) * $fPower $c += 1 $t += 0.00075 Next Next For $i = 0 To $iPoints - 2 For $j = 0 To $iPoints - 2 _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[$j + $iPoints * ($i + 1)][0], $aCoords[$j + $iPoints * ($i + 1)][1], $aCoords[$j + $iPoints * ($i + 1)][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hCanvas, "handle", $hPen, _ "float", $iWh + $x1 * $fZoom, "float", $iHh + $y1 * $fZoom, "float", $iWh + $x2 * $fZoom, "float", $iHh + $y2 * $fZoom) _3Dto2D($aCoords[($j + 1) + $iPoints * $i][0], $aCoords[($j + 1) + $iPoints * $i][1], $aCoords[($j + 1) + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hCanvas, "handle", $hPen, _ "float", $iWh + $x1 * $fZoom, "float", $iHh + $y1 * $fZoom, "float", $iWh + $x2 * $fZoom, "float", $iHh + $y2 * $fZoom) Next Next For $i = 0 To $iPoints - 2 _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[$j + $iPoints * ($i + 1)][0], $aCoords[$j + $iPoints * ($i + 1)][1], $aCoords[$j + $iPoints * ($i + 1)][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hCanvas, "handle", $hPen, _ "float", $iWh + $x1 * $fZoom, "float", $iHh + $y1 * $fZoom, "float", $iWh + $x2 * $fZoom, "float", $iHh + $y2 * $fZoom) Next For $j = 0 To $iPoints - 2 _3Dto2D($aCoords[$j + $iPoints * $i][0], $aCoords[$j + $iPoints * $i][1], $aCoords[$j + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x1, $y1, $z1) _3Dto2D($aCoords[($j + 1) + $iPoints * $i][0], $aCoords[($j + 1) + $iPoints * $i][1], $aCoords[($j + 1) + $iPoints * $i][2], $fRotX, $fRotY, $fRotZ, $x2, $y2, $z2) DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hCanvas, "handle", $hPen, _ "float", $iWh + $x1 * $fZoom, "float", $iHh + $y1 * $fZoom, "float", $iWh + $x2 * $fZoom, "float", $iHh + $y2 * $fZoom) Next $fRotX += $fRx $fRotY += $fRy $fRotZ += $fRz _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_PenDispose($hPen) _GDIPlus_PathDispose($hPath) _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($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) EndFunc ;==>GDIPlus_3DSinusWave Func Dist($x1, $y1, $x2, $y2) Return Sqrt(($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2)) EndFunc ;==>Dist Func _3Dto2D($fX, $fY, $fZ, $fRotX, $fRotY, $fRotZ, ByRef $__fXPos, ByRef $__fYPos, ByRef $__fZPos) ;apply the x-axis rotation to transform coordinates ($fX, $fY, $fZ) into coordinates ($fX0, $fY0, $fZ0) $__f1 = $fRotX * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fY0 = $fY * $__f2 + $fZ * $__f3 $__fZ0 = $fZ * $__f2 - $fY * $__f3 ;apply the y-axis rotation to ($fX0, $__fY0, $fZ0) to obtain ($__fX1, $__fY1, $fZ1) $__f1 = $fRotY * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fX1 = $fX * $__f2 - $__fZ0 * $__f3 $__fY1 = $__fY0 ;~ $__fZ1 = $__fZ0 * $__f2 + $fX * $__f2 ;finally, apply the z-axis rotation to obtain the point ($fXPos, $fYPos) $__f1 = $fRotZ * $fRad $__f2 = Cos($__f1) $__f3 = Sin($__f1) $__fXPos = $__fX1 * $__f2 + $__fY1 * $__f3 $__fYPos = $__fY1 * $__f2 - $__fX1 * $__f3 $__fZPos = $__fZ0 EndFunc ;==>_3Dto2D Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS In the attached 7-Zip file you can find the compiled and also a FreeBasic version. -> DL: 3D Sinus Wave.7z Have fun.
  12. Here some of my GDI+ examples which I boosted by coding a DLL created with FreeBasic. Plasma Variante 5: ;coded by UEZ build 2016-06-06 #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" #AutoIt3Wrapper_UseX64=n #include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit, $pBitmap, $hHBitmap Global Const $iW = 600, $iH = 400, $sTitle = "GDI+ Plasma v5 boosted" Global Const $fPi = ACos(-1) AutoItSetOption("GUIOnEventMode", 1) GDIPlus_Plasmav5() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_Plasmav5() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) GUISetState(@SW_SHOW, $hGUI) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $hHBitmap = _WinAPI_BitmapCreateDIB($iW, $iH, $pBitmap) ; much faster than _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) ;~ _GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local Const $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, 60, 16) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") Local $iSizeW = 4, $iSizeH = 4, $fTime = 0.0 Local $sDLL = @ScriptDir & "\GDI+ Plasma v5 Booster.dll" If Not FileExists($sDLL) Then _BoosterDLL(True) Local $hDLL = DllOpen($sDLL) AdlibRegister("CalcFPS", 1000) Do DllCall($hDLL, "none", "Boost", "ptr", $hCanvas, "int", $iSizeW, "int", $iSizeH, "int", $iW, "int", $iH, "float", $fTime) $fTime += 0.0075 _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_FontDispose($hFont_FPS) _GDIPlus_FontFamilyDispose($hFamily_FPS) _GDIPlus_StringFormatDispose($hFormat_FPS) _GDIPlus_BrushDispose($hBrush_FPS) _GDIPlus_GraphicsDispose($hCanvas) _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) DllClose($hDLL) EndFunc ;==>GDIPlus_Plasmav5 Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS ;~ ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $iShowFPS = ' & $iShowFPS & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $iFPS = 0 EndFunc ;==>CalcFPS Func _WinAPI_BitmapCreateDIB($iWidth, $iHeight, ByRef $pHBitmap) Local $tBMI = DllStructCreate($tagBITMAPINFO) $tBMI.biSize = DllStructGetSize($tBMI) - 4 $tBMI.biWidth = $iWidth $tBMI.biHeight = -$iHeight $tBMI.biPlanes = 1 $tBMI.biBitCount = 32 Local $aResult = DllCall("gdi32.dll", "ptr", "CreateDIBSection", "hwnd", 0, "struct*", $tBMI, "uint", 0, "ptr*", 0, "ptr", 0, "uint", 0) $pHBitmap = $aResult[4] Return $aResult[0] EndFunc ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-09-19 Func _BoosterDLL($bSaveBinary = False, $sSavePath = @ScriptDir) Local $BoosterDLL $BoosterDLL &= 'J7kATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAgAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1M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Error(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($BoosterDLL) & ']') DllStructSetData($tSource, 1, $BoosterDLL) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 18944) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\GDI+ Plasma v5 Booster.dll", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_BoosterDLL Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress 3D Object Rotation v1.3.0: ;coded by UEZ build 2016-06-04 #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> #Region GDIPlusEx Constants Global Const $_sGDIPEX_IIDBMP = "{EB22CE37-EE56-458B-AD13-3FC836E8CE49}" Global Const $_sGDIPEX_IIDBUF = "{1CB99E61-15BA-4B1F-8C7E-25D00AE60F2D}" Global Const $_tagGDIPEX_BUFFER = "Draw int(int;int;uint); Gfx handle(); pBits ptr(); Width int(); Height int(); Stride int();" Global Const $_tagGDIPEX_BITMAP = "Bmp handle(); Gfx handle(); Scan0 ptr(); Width int(); Height int(); Stride int(); Draw int(struct*;int;int); DrawRect int(struct*;int;int;uint;uint);" Global $_aGDIPEX_ASMSTRUCT[1] Global $_oGDIPEX_D2DFACTORY OnAutoItExitRegister("__GDIPlusEx_OnExit") Global Const $_hGDIPEX_GDIPDLL = _GDIPlus_Startup(Default, True) Global Const $_hGDIPEX_D2DDLL = DllOpen("d2d1.dll") Global Const $_hGDIPEX_MOD_GDI32 = _WinAPI_GetModuleHandle("gdi32.dll") Global Const $_hGDIPEX_MOD_GDIPLUS = _WinAPI_GetModuleHandle("gdiplus.dll") Global Const $_hGDIPEX_MOD_KERNEL32 = _WinAPI_GetModuleHandle("kernel32.dll") Global Const $_hGDIPEX_MOD_USER32 = _WinAPI_GetModuleHandle("User32.dll") Global Const $_pGDIPEX_LIB_SELOBJ = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDI32, "SelectObject") Global Const $_pGDIPEX_LIB_DELOBJ = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDI32, "DeleteObject") Global Const $_pGDIPEX_LIB_DELDC = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDI32, "DeleteDC") Global Const $_pGDIPEX_LIB_RELDC = _WinAPI_GetProcAddress($_hGDIPEX_MOD_USER32, "ReleaseDC") Global Const $_pGDIPEX_LIB_BITBLT = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDI32, "BitBlt") Global Const $_pGDIPEX_LIB_GLOBALFREE = _WinAPI_GetProcAddress($_hGDIPEX_MOD_KERNEL32, "GlobalFree") Global Const $_pGDIPEX_LIB_GFXDEL = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDIPLUS, "GdipDeleteGraphics") Global Const $_pGDIPEX_LIB_BMPDEL = _WinAPI_GetProcAddress($_hGDIPEX_MOD_GDIPLUS, "GdipDisposeImage") Global Const $_pGDIPEX_ASM_OBJ_QUERYIF = __GDIPlusEx_ASMCreate("0x538B4424088B5C2410890383400401B8000000005BC20C00", "0x49890883410801B800000000C3") Global Const $_pGDIPEX_ASM_OBJ_ADDREF = __GDIPlusEx_ASMCreate("0x8B442404834004018B4004C20400", "0x834108018B4108C3") Global Const $_pGDIPEX_ASM_OBJ_RELBUF = __GDIPlusEx_ASMCreate("0x538B5C2408836B0401837B040075448B43388B531C52FFD08B433C8B53288B4B305152FFD08B43408B532052FFD08B43448B532852FFD08B433C8B532C8B4B245152FFD08B433453FFD0B8000000005BC204008B43045BC20400", "0x534889CB836B0801837B080075504883EC20488B4360488B4B28FFD0488B4368488B4B40488B5350FFD0488B4370488B4B30FFD0488B4378488B4B40FFD0488B8380000000488B4B48488B5338FFD0488B43584889D9FFD04883C4205BC38B43085BC3") Global Const $_pGDIPEX_ASM_OBJ_RELBMP = __GDIPlusEx_ASMCreate("0x538B5C2408836B0401837B0400752A8B432C8B532052FFD08B43308B532452FFD08B43288B531C52FFD08B432853FFD0B8000000005BC204008B43045BC20400", "0x534889CB836B0801837B080075314883EC20488B4348488B4B30FFD0488B4350488B4B38FFD0488B4340488B4B28FFD0488B43404889D9FFD04883C4205BC38B43085BC3") Global Const $_pGDIPEX_ASM_OBJ_BUFDRAW = __GDIPlusEx_ASMCreate("0x5356578B5C24108B7424148B7C2418B8FFFFFFFF817B0847504542752E8B4C241C5183EC08C7042400000000C7442404000000008B5328528B5310528B530C5257568B5324528B434CFFD05F5E5BC21000", "0x534889CB4989D24D89C348C7C0FFFFFFFF81790C47504542754B4883EC484C894C244048C74424380000000048C744243000000000488B43404889442428488B431448894424204D31C9448B4B104D89D84C89D2488B4B38488B8388000000FFD04883C4485BC3") Global Const $_pGDIPEX_ASM_OBJ_BUFGFX = __GDIPlusEx_ASMCreate("0x8B5424048B421CC20400", "0x488B4128C3") Global Const $_pGDIPEX_ASM_OBJ_BUFBITS = __GDIPlusEx_ASMCreate("0x8B5424048B4218C20400", "0x488B4120C3") Global Const $_pGDIPEX_ASM_OBJ_BUFWIDTH = __GDIPlusEx_ASMCreate("0x8B5424048B420CC20400", "0x8B4110C3") Global Const $_pGDIPEX_ASM_OBJ_BUFHEIGHT = __GDIPlusEx_ASMCreate("0x8B5424048B4210C20400", "0x8B4114C3") Global Const $_pGDIPEX_ASM_OBJ_BUFSTRIDE = __GDIPlusEx_ASMCreate("0x8B5424048B4214C20400", "0x8B4118C3") Global Const $_pGDIPEX_ASM_OBJ_BMPBMP = __GDIPlusEx_ASMCreate("0x8B5424048B4224C20400", "0x488B4138C3") Global Const $_pGDIPEX_ASM_OBJ_BMPGFX = __GDIPlusEx_ASMCreate("0x8B5424048B4220C20400", "0x488B4130C3") Global Const $_pGDIPEX_ASM_OBJ_BMPSCAN0 = __GDIPlusEx_ASMCreate("0x8B5424048B4218C20400", "0x488B4120C3") Global Const $_pGDIPEX_ASM_OBJ_BMPWIDTH = __GDIPlusEx_ASMCreate("0x8B5424048B420CC20400", "0x8B4110C3") Global Const $_pGDIPEX_ASM_OBJ_BMPHEIGHT = __GDIPlusEx_ASMCreate("0x8B5424048B4210C20400", "0x8B4114C3") Global Const $_pGDIPEX_ASM_OBJ_BMPSTRIDE = __GDIPlusEx_ASMCreate("0x8B5424048B4214C20400", "0x8B4118C3") Global Const $_pGDIPEX_ASM_BMPDRAW = __GDIPlusEx_ASMCreate("0x5756538B7424108B7C2414817F0847504542740E817F08475045417405E98E010000F30F7E4E0CF30F7E442418660FFEC8660FEFFF660F6FF0F30F7E6F0C660FEACD660FEEC7660FFAC8660F6FD0660FFAD6B801000000660F6EF8660F70FFE0660F66F9660FD7C783F8000F853801000083EC20660FD60C24660F7EC1660F73D804660F7EC38B47148944240C0FAFC38D04888B571801C289542408660F7ED1660F73DA04660F7ED38B4614894424140FAFC38D04888B561801C289542410B800000047660F6EF8660F70FF00B801000000F30F2AF0660FEFED8B5C24048B7C24088B44240C014424088B7424108B442414014424108B0C248A46033C000F8483000000660F6E063CFF7477660F6E0F660F60C5660F60CDF20F70C093F20F70C993660F60C5660F60CD660FFEC7660FFECF0F5CC70F5CCFF30F10D6F30F5CD0F30F59CAF30F10E0F30F58E1F30F53DC660F70D1000F59CA660F70D000660F70DB000F59C20F58C10F59C3F30F10C40F58C7660FFAC7660F6BC0F20F70C039660F67C0660F7E0783C60483C70483E9010F8F63FFFFFF83EB010F8F3FFFFFFF83C420B800000000EB0CB8FEFFFFFFEB05B8FFFFFFFF5B5E5FC21000", "0x575653415441554883EC20F30F7F3424F30F7F7C24104889CE4889D7817F0C47504542740E817F0C475045417405E99D010000F30F7E4E1066410F6EC166410F6ED0660F73F804F30F10C2660FFEC8660FEFFF660F6FF0F30F7E6F10660FEACD660FEEC7660FFAC8660F6FD0660FFAD6B801000000660F6EF8660F70FFE0660F66F9660FD7C783F8000F853801000066410F7EC8660F73D90466410F7EC94831C0660F7EC1660F73D804660F7EC38B47184989C30FAFC3678D0488488B7F204801C74989FA660F7ED1660F73DA04660F7ED38B46184989C50FAFC3678D0488488B76204801C64989F4B800000047660F6EF8660F70FF00B801000000F30F2AF0660FEFED4489CB4C89D74D01DA4C89E64D01EC4489C18A46033C000F8483000000660F6E063CFF7477660F6E0F660F60C5660F60CDF20F70C093F20F70C993660F60C5660F60CD660FFEC7660FFECF0F5CC70F5CCFF30F10D6F30F5CD0F30F59CAF30F10E0F30F58E1F30F53DC660F70D1000F59CA660F70D000660F70DB000F59C20F58C10F59C3F30F10C40F58C7660FFAC7660F6BC0F20F70C039660F67C0660F7E074883C6044883C70483E9010F8F61FFFFFF83EB010F8F49FFFFFF48C7C000000000EB1048C7C0FEFFFFFFEB0748C7C0FFFFFFFFF30F6F7C2410F30F6F34244883C420415D415C5B5E5FC3") Global Const $_pGDIPEX_ASM_BMPDRAWRECT = __GDIPlusEx_ASMCreate("0x575653558B7424148B7C2418817F0847504542740E817F08475045417405E9DA010000F30F6F44241CF30F7E560CF30F7E5F0C0F5BC00F5BD20F5BDB0F12C80F28F00F28EA0F5EE90F57FF0F58C80F5DCB0F5FC70F5CC80FC2F906660FD7C7A90F0000000F858C0100000F28D00F5CC60F58C8F30F5BC0660F5BC9F30F5BD283EC20660FD60424660FD64C2408660F7ED1660F73DA04660F7ED38B4714894424140FAFC38D04888B571889D501C2895424108B4424140FAF471001C58B46148944241C8B761889742418B800000047660F6EF8660F70FF00B801000000F30F2AF08B0C24F30F2AC1F30F10C8F30F59CDF30F2CD1C1E20289548D00F30F58C683C1013B4C24087CE0660F70EDE18B5C24048B7C24108B44241401442410F30F2AC3F30F59C5F30F2CC08B7424180FAF44241C01C68B0C248B548D008A4416033C000F8488000000660F6E04163CFF747B660F6E0F660FEFD2660F60C2660F60CAF20F70C093F20F70C993660F60C2660F60CA660FFEC7660FFECF0F5CC70F5CCFF30F10D6F30F5CD0F30F59CAF30F10D0F30F58D1F30F53E2660F70D9000F59CB660F70D8000F59C3660F70E4000F58C10F59C4F30F10C20F58C7660FFAC7660F6BC0F20F70C039660F67C0660F7E0783C70483C1013B4C24080F8C58FFFFFF83C3013B5C240C0F8C25FFFFFF83C420B800000000EB0CB8FEFFFFFFEB05B8FFFFFFFF5D5B5E5FC21800", "0x660F6E4C2428660F6E442430660F62C85756535541544155415641574883EC30F30F7F3424F30F7F7C2410F3440F7F4424204889D74889CE817F0C47504542740E817F0C475045417405E9FA01000066410F6EC066410F6ED1660F73FA04660FEBC2660F73F908660FEBC1F30F7E5610F30F7E5F100F5BC00F5BD20F5BDB0F12C80F28F00F28EA0F5EE90F57FF0F58C80F5DCB0F5FC70F5CC80FC2F906660FD7C7A90F0000000F85940100000F28D00F5CC60F58C8F30F5BC0660F5BC9F30F5BD266490F7EC04D89C149C1E92066490F7ECA4D89D349C1EB20660F7ED1660F73DA04660F7ED34831C08B47184989C50FAFC3678D04884C8B67204C89E54901C44C89E80FAF47144801C58B46184989C74C8B7620B800000047660F6EF8660F70FF00B801000000F30F2AF04831C94489C1F30F2AC1F30F10C8F30F59CDF30F2CD1C1E20289548D00F30F58C683C1014439D17CE14831D2660F70EDE14489CB4C89E74D01ECF30F2AC3F30F59C5F3480F2CC04C89F6410FAFC74801C64489C18B548D008A4416033C000F848C000000660F6E04163CFF747F660F6E0F660FEFD2660F60C2660F60CAF20F70C093F20F70C993660F60C2660F60CA660FFEC7660FFECF0F5CC70F5CCFF30F10D6F30F5CD0F30F59CAF3440F10C0F3440F58C1F3410F53E0660F70D900660F70D0000F59CB0F59C2660F70E4000F58C10F59C4F3410F10C00F58C7660FFAC7660F6BC0F20F70C039660F67C0660F7E074883C70483C1014439D10F8C54FFFFFF83C3014439DB0F8C28FFFFFF48C7C000000000EB1048C7C0FEFFFFFFEB0748C7C0FFFFFFFFF3440F6F442420F30F6F7C2410F30F6F34244883C430415F415E415D415C5D5B5E5FC3") Global Const $_pGDIPEX_ASM_BMPCLR = __GDIPlusEx_ASMCreate("0x8B542404660F6E442408660F70C0008B4A100FAF4A148B5218660F7F0283C21083E9107FF4C20800", "0x660F6EC2660F70C0008B51140FAF5118488B4920660F7F014883C11083EA107FF3C3") #EndRegion GDIPlusEx Constants Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit Global Const $iW = 800, $iH = 400, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ 3D Object Rotation v1.3.0 alpha / aka Rutt Etra Izer FX" Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi AutoItSetOption("GUIOnEventMode", 1) Global Const $sDLL = @ScriptDir & "\Rutt_Etra_Izer_FX_Booster.dll" If Not FileExists($sDLL) Then _Booster_DLL(True) Global $hDLL = DllOpen($sDLL) GDIPlus_Rutt_Etra_Izer_FX() DllClose($hDLL) AutoItSetOption("GUIOnEventMode", 0) Exit Func GDIPlus_Rutt_Etra_Izer_FX() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) GUISetState(@SW_SHOW, $hGUI) ;create canvas elements Local $oCanvas = _GDIPlusEx_BufferCreate($hGUI) _GDIPlus_GraphicsSetSmoothingMode($oCanvas.Gfx, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($oCanvas.Gfx, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xF0000000), _ $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xF0808080), _ $hPen = _GDIPlus_PenCreate(0xFF0000FF), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16) Local Const $hPath = _GDIPlus_PathCreate() Local Const $hImage = _GDIPlus_BitmapCreateFromMemory(_Ninja()) Local $aDim = _GDIPlus_ImageGetDimension($hImage) Local $i, $fX = 0, $fY = 67.5 * $fRad, $fZ = 0, $c, $iX, $iY, $bAutoIt = False, _ $iStep = 3, $fScale = 1.5, $fPerpCor = 1500, $fZPower = 0.25 Local Const $iCountX = Int($aDim[0] / $iStep), $iCountY = Int($aDim[1] / $iStep) Local $tData = Create_Rutt_Etra_Izer_Struct($hImage, $iStep, $fZPower, 1), $c $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Local $fTimer Do DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $oCanvas.Gfx, "handle", $hBrush_Clr, "float", 0, "float", 0, _ "float", $iW, "float", $iH) Switch $bAutoIt Case True For $c = 1 To $iCountX * $iCountY + $iCountX + $iCountY + 1 Translate3Dto2D($tData, $c, $fX, $fY, $fZ, $iW / 2, $iH / 2, $fScale, $fPerpCor) If $c > 1 Then DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $oCanvas.Gfx, "handle", $tData.Pen(($c)), _ "float", $tData.fX(($c - 1)), "float", $tData.fY(($c - 1)), _ "float", $tData.fX(($c)), "float", $tData.fY(($c))) EndIf Next Case Else DllCall($hDLL, "none", "Boost", "ptr", $oCanvas.Gfx, "struct*", $tData, "uint", $iCountX, "uint", $iCountY, _ "float", $fX, "float", $fY, "float", $fZ, "float", $iW / 2, "float", $iH / 2, "float", $fScale, "float", $fPerpCor) EndSwitch _GDIPlus_GraphicsDrawStringEx($oCanvas.Gfx, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _GDIPlusEx_BufferDraw($oCanvas) $iFPS += 1 ;~ $fZ += 0.015 If Mod(Int($fY * 100), Int($fPi * 100)) Then ;when rotation is at 180° (Pi) Then stop rotation for some seconds $fY += -0.005 $fTimer = TimerInit() Else If TimerDiff($fTimer) > 5000 Then $fY += -0.005 EndIf ;~ $fX += -0.0333 If $bExit Then ExitLoop Until Not Sleep(10) 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_PenDispose($hPen) _GDIPlus_PathDispose($hPath) _GDIPlus_ImageDispose($hImage) $oBuffer = Null For $c = 1 To $iCountX * $iCountY + $iCountX + $iCountY ;~ ConsoleWrite($tData.Pen(($c)) & @CRLF) _GDIPlus_PenDispose($tData.Pen(($c))) Next GUIDelete($hGUI) EndFunc ;==>GDIPlus_Rutt_Etra_Izer_FX Func Translate3Dto2D($tStruct, $iPos, $fRotX, $fRotY, $fRotZ, $fCenterX = 0, $fCenterY = 0, $fScale = 1, $fZDeepCorrection = 1000) Local Const $fCosRotX = Cos($fRotX), $fSinRotX = Sin($fRotX), _ $fCosRotY = Cos($fRotY), $fSinRotY = Sin($fRotY), _ $fCosRotZ = Cos($fRotZ), $fSinRotZ = Sin($fRotZ), _ $f1 = $fCosRotY * $tStruct.x(($iPos)), _ $f2 = $fSinRotX * $tStruct.y(($iPos)), _ $f3 = $fCosRotX * $tStruct.z(($iPos)), _ $f4 = $fCosRotX * $tStruct.y(($iPos)), _ $f5 = $fSinRotX * $tStruct.z(($iPos)), _ $f6 = $f1 - $fSinRotY * ($f2 + $f3), _ $fXPos = ($fCosRotZ * $f6 - $fSinRotZ * ($f4 - $f5)) * $fScale, _ $fYPos = ($fSinRotZ * $f6 + $fCosRotZ * ($f4 - $f5)) * $fScale, _ $fZPos = ($fSinRotY * $tStruct.x(($iPos)) + $fCosRotY * ($f2 + $f3)) * $fScale, _ $fZPerspCorrection = 1 / ($fZPos / $fZDeepCorrection + 1) $tStruct.fX(($iPos)) = $fXPos * $fZPerspCorrection + $fCenterX $tStruct.fY(($iPos)) = $fYPos * $fZPerspCorrection + $fCenterY $tStruct.fZ(($iPos)) = $fZPos EndFunc ;==>Translate3Dto2D Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS Func Create_Rutt_Etra_Izer_Struct($hImage, $iStep = 10, $fZPower = 0.15, $fPenSize = 1) $iStep = $iStep < 2 ? 2 : Int($iStep) Local $aDim = _GDIPlus_ImageGetDimension($hImage) Local Const $hIA = _GDIPlus_ImageAttributesCreate() Local $tColorMatrix = _GDIPlus_ColorMatrixCreateGrayScale() _GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $tColorMatrix) Local Const $hImage_Grey = _GDIPlus_BitmapCreateFromScan0($aDim[0], $aDim[1]) Local Const $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_Grey) _GDIPlus_GraphicsDrawImageRectRect($hGfx, $hImage, 0, 0, $aDim[0], $aDim[1], 0, 0, $aDim[0], $aDim[1], $hIA) Local Const $iCountX = Int($aDim[0] / $iStep), $iCountY = Int($aDim[1] / $iStep) Local $tBitmapData1 = _GDIPlus_BitmapLockBits($hImage, 0, 0, $aDim[0], $aDim[1], $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local $tBitmapData2 = _GDIPlus_BitmapLockBits($hImage_Grey, 0, 0, $aDim[0], $aDim[1], $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local Const $iScan01 = DllStructGetData($tBitmapData1, "Scan0") Local Const $iScan02 = DllStructGetData($tBitmapData2, "Scan0") Local $tPixel1 = DllStructCreate("int [" & $aDim[0] * $aDim[1] & "];", $iScan01) Local $tPixel2 = DllStructCreate("int [" & $aDim[0] * $aDim[1] & "];", $iScan02) Local $iX, $iY, $iRowOffset, $iPixel2, $iPixel11, $iPixel12, $c = 1, $hBrush Local $iDim = $iCountX * $iCountY + $iCountX + $iCountY + 1 Local Const $tagData = "struct;float x[" & $iDim & "];float y[" & $iDim & "];float z[" & $iDim & "];float fX[" & $iDim & "];float fY[" & $iDim _ & "];float fZ[" & $iDim & "];uint pen[" & $iDim & "];endstruct" Local $tData = DllStructCreate($tagData) For $iY = 0 To $aDim[1] Step $iStep $iRowOffset = $iY * $aDim[0] + 1 For $iX = 0 To $aDim[0] Step $iStep $iPixel2 = DllStructGetData($tPixel2, 1, $iRowOffset + $iX) $tData.x(($c)) = $iX - $aDim[0] / 2 $tData.y(($c)) = $iY - $aDim[1] / 2 $tData.z(($c)) = 0x80 * $fZPower - BitAND($iPixel2, 0xFF) * $fZPower If $iX Then $iPixel11 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX - 1) - 0x20000000 $iPixel12 = DllStructGetData($tPixel1, 1, $iRowOffset + $iX) $hBrush = _GDIPlus_LineBrushCreate(0, 0, $iStep, 1, $iPixel11, $iPixel12) $tData.Pen(($c - 1)) = _GDIPlus_PenCreate2($hBrush, $fPenSize) ;~ ConsoleWrite($c - 1 & ": " & $tData.Pen(($c - 1)) & @CRLF) ;~ _GDIPlus_PenSetLineJoin($aData[$d].Pen(($c - 1)), 2) ;~ _GDIPlus_PenSetMiterLimit($aData[$d].Pen(($c - 1)), 10) _GDIPlus_PenSetLineCap($tData.Pen(($c - 1)), 0x02, 0x02, 0) _GDIPlus_BrushDispose($hBrush) EndIf $c += 1 Next Next _GDIPlus_BitmapUnlockBits($hImage, $tBitmapData1) _GDIPlus_BitmapUnlockBits($hImage_Grey, $tBitmapData2) _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_ImageDispose($hImage_Grey) Return $tData EndFunc ;==>Create_Rutt_Etra_Izer_Struct ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-09-19 Func _Ninja($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Ninja $Ninja &= '/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABIMDhAOCxIQDxAUExIVGy0dGxkZGzcoKiEtQjpFREA6Pz5IUWhYSE1iTj4/WntcYmtvdHZ0RleAiX9xiGhydHD/2wBDARMUFBsYGzUdHTVwSz9LcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHD/wgARCACTAZgDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAQCAwUBBv/EABcBAQEBAQAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhADEAAAAcIAAADpzvXhVp1i1e5uyVGnTjLhK+hUjLlsN15ar2Clz5rumslE640xGss7X3koTZhM1ml8/P0k5fOx9CtLjX6V9IXOdsqqbrszs70K8uFxihngAAAAAAAAHSy1YH28gs2LcZiteOTXLvU5LeOjbqL2paAxV2uyainpLVmK+goXM1RqKu2VMz6dqFFiud2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5giywckCb/AI4/xTtTyEFQR6vySkrfefc2bD0PiKT3iD8wz18T+4UVl1hbMhG8cS4z7VKSAdgbYWeSAlZOpUyJzlwRrEw7xMKx2KPfuLf+ZBcK2KdQEDG4AKx6jIwW5pRD55ZxfP8AD/qJld0Qlc1qA5F6IIAC3+pwwhQcf6icQuijpExvPhtSgCujmUYsNXDmIvl/g0/4f//Z' Local $bString = _WinAPI_Base64Decode($Ninja) If @error Then Return SetError(1, 0, 0) $bString = Binary($bString) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Ninja.jpg", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Ninja Func _Booster_DLL($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Booster_DLL $Booster_DLL &= 'JrkATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAgAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1MgbW+AZGUuDQ0KJASGAFBFAABMAQkAEK3MUVcFV+AADsAjCwECGQABJAGIoEYAABAUAAcQBpjqEAILAgO3AQS/AwAADfkADL2pAh4ENAQDAQYEDSAAsAAAUwEHwAAIAOQFGHLwAADcgwMkEgAE4AAAGJALIBzBAADMGCsudMhleHSAA1wjBEiBdQMHYgIAYABQYC5kaGF0YYAFLAXKgUUogYsTQABAwC5yAxSsbAgBqoABCoABKo0TQDBALmJzc4EFlIeAuwAwlOtwwC5lwxPXwkjASsIdNNATacMJwlApwFIABsAANs4JwC5YQ1JUwQLCMdDEEzxp0Al0bMInIAOCwwk+wdAJcmVsb2PEZsBo98JODK3ACUKgsT8APwA/AAE0AFOD7BjHBCQBQXnoIBUAAInDIIkEJOhmQFqF24CjiKUAEKOEgAAIdA3HgYQAg8QYUDHAW8PAALiBblsQw5BXViAIEItUgCQkhdJ1cqFASkAQhcAPjhXAA4MA6AEx24s1dMGDgAjhAusPjXY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Uo1UjUAWjViNXU1mzUArDXnNf81GTYAWDZ2Nos2nDYApDasNrs23jYA4zYINxg3KTcALjczNzs3QDcASDdRN1s3YTcAajd7N+Y38zcAEjgYOC04lTgAsDjNOPg4BjkARzl1OYI5pzkAxDnROeY57TkA+zkNOiE6MToASzpsOn46gzoAiDqfOqw6ujoAvzrMOuE67joA9DohOzk7PzsATztVO2Y7bDsAczuFO487uTsA0DvqO/Q7FTwAJzwzPE88WDwAfDycPLQ8yjwC3oCuAD0GPQ89gBU9SD1OPWHAWACkPak9sj25PQDCPeU9Az4JPgAPPjQ+Oj5hPgBnPnc+mT6xPoC+Psg+4z7twF8A/j4RPxs/Mz8QOT/9PwCPMAAAAlyAAREwHzAlMAAsMIkwoTC1MAC6MNUw4TDvMAD2MAYxITEvMQA1MTwxhjGTMSCfMbUxxMCS3TEAGzIxMj8yRTIAVDJjMpIy7jIA9jL+MgYzDjMAFjMeMyYzRDMASDNUMwBAAADKDMAWEMAYAFDAAYABOijAGDDBAwCuwQMMMCgYMBzBA+DDAwQw8AgwDDBCDD8APwA/AAM/ABYA' $Booster_DLL = _WinAPI_Base64Decode($Booster_DLL) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($Booster_DLL) & ']') DllStructSetData($tSource, 1, $Booster_DLL) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 17408) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Rutt_Etra_Izer_FX_Booster.dll", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Booster_DLL Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress #Region GDIPlusEx functions Func _GDIPlusEx_BitmapCreate($iWidth, $iHeight, $iColor = 0) $iWidth = Int($iWidth) $iHeight = Int($iHeight) If $iWidth < 1 Or $iHeight < 1 Then Return SetError(2, 1, False) Local $tBmp = __GDIPlusEx_BitmapCreate($iWidth, $iHeight, $iColor) If @error Or Not IsDllStruct($tBmp) Then Return SetError(9, 2, False) Local $oBitmap = __GDIPlusEx_BitmapCreateObject($tBmp) If Not IsObj($oBitmap) Then __GDIPlusEx_BitmapDispose($tBmp) Return SetError(9, 3, False) EndIf Return $oBitmap EndFunc ;==>_GDIPlusEx_BitmapCreate Func _GDIPlusEx_BufferCreate($hWnd, $iWidth = 0, $iHeight = 0) $iWidth = Int($iWidth) $iHeight = Int($iHeight) If $iWidth < 1 Or $iHeight < 1 Then Local $aSize = WinGetClientSize($hWnd) If $iWidth < 1 Then $iWidth = $aSize[0] If $iHeight < 1 Then $iHeight = $aSize[1] EndIf Local $hDC = _WinAPI_GetDC($hWnd) If @error Then Return SetError(10, 9, False) Local $hCDC = _WinAPI_CreateCompatibleDC($hDC) Local $tBmpInfo = DllStructCreate("struct; uint Size; uint Width; int Height; short Planes; short BitCount; uint Compression; uint SizeImage; int XPelsPerMeter; int YPelsPerMeter; uint ClrUsed; uint ClrImportant; endstruct;") DllStructSetData($tBmpInfo, "Size", DllStructGetSize($tBmpInfo)) DllStructSetData($tBmpInfo, "Width", $iWidth) DllStructSetData($tBmpInfo, "Height", -($iHeight + 4)) DllStructSetData($tBmpInfo, "Planes", 1) DllStructSetData($tBmpInfo, "BitCount", 32) Local $aResult = DllCall("gdi32.dll", "handle", "CreateDIBSection", "handle", 0, "struct*", $tBmpInfo, "uint", 0, "ptr*", 0, "handle", 0, "uint", 0) If @error Or Not $aResult[0] Or Not $aResult[4] Then _WinAPI_DeleteDC($hCDC) _WinAPI_ReleaseDC($hWnd, $hDC) Return SetError(10, 9, False) EndIf Local $hDib = $aResult[0] Local $pBits = $aResult[4] $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", 0, "ulong_ptr", 256) If @error Or Not $aResult[0] Then Return SetError(10, 9, False) Local $pBuffer = $aResult[0] Local $tBuffer = DllStructCreate("struct; ptr Vtbl; int RefCnt; uint IsGDIPEX; uint Width; uint Height; uint Stride; ptr pBits; handle Gfx; handle Dib; handle DC; handle CDC; handle Wnd; handle Obj; ptr pGlobalFree; ptr pGfxDel; ptr pSelObj; ptr pDelObj; ptr pDelDC; ptr pRelDC; ptr pBitBlt; ptr pQueryInterface; ptr pAddRef; ptr pRelease; ptr pDraw; ptr pGetGfx; ptr pGetBits; ptr pGetW; ptr pGetH; ptr pGetStride; endstruct;", $pBuffer) DllStructSetData($tBuffer, "pBits", $pBits) DllStructSetData($tBuffer, "Dib", $hDib) DllStructSetData($tBuffer, "OBJ", _WinAPI_SelectObject($hCDC, $hDib)) DllStructSetData($tBuffer, "Gfx", _GDIPlus_GraphicsCreateFromHDC($hCDC)) DllStructSetData($tBuffer, "Width", $iWidth) DllStructSetData($tBuffer, "Height", $iHeight) DllStructSetData($tBuffer, "Stride", $iWidth * 4) DllStructSetData($tBuffer, "DC", $hDC) DllStructSetData($tBuffer, "CDC", $hCDC) DllStructSetData($tBuffer, "Wnd", $hWnd) DllStructSetData($tBuffer, "IsGDIPEX", 0x42455047) DllStructSetData($tBuffer, "pGlobalFree", $_pGDIPEX_LIB_GLOBALFREE) DllStructSetData($tBuffer, "pGfxDel", $_pGDIPEX_LIB_GFXDEL) DllStructSetData($tBuffer, "pSelObj", $_pGDIPEX_LIB_SELOBJ) DllStructSetData($tBuffer, "pDelObj", $_pGDIPEX_LIB_DELOBJ) DllStructSetData($tBuffer, "pDelDC", $_pGDIPEX_LIB_DELDC) DllStructSetData($tBuffer, "pRelDC", $_pGDIPEX_LIB_RELDC) DllStructSetData($tBuffer, "pBitBlt", $_pGDIPEX_LIB_BITBLT) DllStructSetData($tBuffer, "pQueryInterface", $_pGDIPEX_ASM_OBJ_QUERYIF) DllStructSetData($tBuffer, "pAddRef", $_pGDIPEX_ASM_OBJ_ADDREF) DllStructSetData($tBuffer, "pRelease", $_pGDIPEX_ASM_OBJ_RELBUF) DllStructSetData($tBuffer, "pDraw", $_pGDIPEX_ASM_OBJ_BUFDRAW) DllStructSetData($tBuffer, "pGetGfx", $_pGDIPEX_ASM_OBJ_BUFGFX) DllStructSetData($tBuffer, "pGetBits", $_pGDIPEX_ASM_OBJ_BUFBITS) DllStructSetData($tBuffer, "pGetW", $_pGDIPEX_ASM_OBJ_BUFWIDTH) DllStructSetData($tBuffer, "pGetH", $_pGDIPEX_ASM_OBJ_BUFHEIGHT) DllStructSetData($tBuffer, "pGetStride", $_pGDIPEX_ASM_OBJ_BUFSTRIDE) DllStructSetData($tBuffer, "Vtbl", DllStructGetPtr($tBuffer, "pQueryInterface")) DllStructSetData($tBuffer, "RefCnt", 1) Local $oBuffer = ObjCreateInterface($pBuffer, $_sGDIPEX_IIDBUF, $_tagGDIPEX_BUFFER) If Not IsObj($oBuffer) Then _GDIPlus_GraphicsDispose(DllStructGetData($tBuffer, "Gfx")) _WinAPI_SelectObject(DllStructGetData($tBuffer, "CDC"), DllStructGetData($tBuffer, "OBJ")) _WinAPI_DeleteObject(DllStructGetData($tBuffer, "Dib")) _WinAPI_DeleteDC(DllStructGetData($tBuffer, "CDC")) _WinAPI_ReleaseDC(DllStructGetData($tBuffer, "Wnd"), DllStructGetData($tBuffer, "DC")) DllCall("kernel32.dll", "ptr", "GlobalFree", "struct*", $pBuffer) Return SetError(10, 9, False) EndIf Return $oBuffer EndFunc ;==>_GDIPlusEx_BufferCreate Func _GDIPlusEx_BufferDraw($oBuffer, $iX = 0, $iY = 0, $iROP = 0x00CC0020) If Not IsObj($oBuffer) Then Return SetError(2, 1, False) Local $iStatus = $oBuffer.Draw($iX, $iY, $iROP) If Not $iStatus Then Return SetError(9, 2, False) Return True EndFunc ;==>_GDIPlusEx_BufferDraw Func __GDIPlusEx_ASMCreate(ByRef Const $bBC32, ByRef Const $bBC64) Local $iSize Switch @AutoItX64 Case True $iSize = BinaryLen($bBC64) Case Else $iSize = BinaryLen($bBC32) EndSwitch Local $aResult = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", 0, "ulong_ptr", $iSize + 16, "dword", 0x00001000, "dword", 0x00000040) If @error Or Not $aResult[0] Then Return SetError(1, 0, False) Local $pStruct = Number($aResult[0]) If Mod($pStruct, 16) Then $pStruct = $pStruct + 16 - Mod($pStruct, 16) Local $tStruct = DllStructCreate("byte[" & $iSize & "];", $pStruct) Switch @AutoItX64 Case True DllStructSetData($tStruct, 1, $bBC64) Case Else DllStructSetData($tStruct, 1, $bBC32) EndSwitch DllCall("kernel32.dll", "bool", "VirtualProtect", "struct*", $pStruct, "ulong_ptr", $iSize, "dword", 16, "dword*", 0) Local $iIdx = $_aGDIPEX_ASMSTRUCT[0] + 1 If $iIdx >= UBound($_aGDIPEX_ASMSTRUCT) Then ReDim $_aGDIPEX_ASMSTRUCT[$iIdx + 1] $_aGDIPEX_ASMSTRUCT[0] = $iIdx $_aGDIPEX_ASMSTRUCT[$iIdx] = $pStruct Return $pStruct EndFunc ;==>__GDIPlusEx_ASMCreate Func __GDIPlusEx_BitmapCreate($iW, $iH, $iColor = 0) $iW = Int($iW) $iH = Int($iH) Local $iStride = $iW * 4 If Mod($iStride, 16) Then $iStride += 16 - Mod($iStride, 16) Local $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", 0x40, "ulong_ptr", $iStride * ($iH + 4) * 4 + 32) If @error Or Not $aResult[0] Then Return SetError(9, 1, False) Local $pScan0 = Number($aResult[0]) $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", 0x40, "ulong_ptr", 256) If @error Or Not $aResult[0] Then DllCall("kernel32.dll", "ptr", "GlobalFree", "struct*", $pScan0) Return SetError(9, 2, False) EndIf Local $tBitmap = DllStructCreate("struct; ptr Vtbl; int RefCnt; uint IsGDIPEX; uint Width; uint Height; uint Stride; ptr pScan0; ptr pScan0ORIG; endstruct;", $aResult[0]) DllStructSetData($tBitmap, "Width", $iW) DllStructSetData($tBitmap, "Height", $iH) DllStructSetData($tBitmap, "Stride", $iStride) DllStructSetData($tBitmap, "pScan0ORIG", $pScan0) If Mod($pScan0, 16) Then $pScan0 += 16 - Mod($pScan0, 16) DllStructSetData($tBitmap, "pScan0", $pScan0) DllStructSetData($tBitmap, "IsGDIPEX", 0x41455047) If $iColor Then DllCallAddress("none", $_pGDIPEX_ASM_BMPCLR, "struct*", $tBitmap, "uint", $iColor) Return $tBitmap EndFunc ;==>__GDIPlusEx_BitmapCreate Func __GDIPlusEx_BitmapCreateObject($tBmp) If @error Or Not IsDllStruct($tBmp) Then Return SetError(2, 1, False) Local $tBitmap = DllStructCreate("struct; ptr Vtbl; int RefCnt; uint IsGDIPEX; uint Width; uint Height; uint Stride; ptr pScan0; ptr pScan0ORIG; handle Gfx; handle Bmp; ptr pGlobalFree; ptr pGfxDel; ptr pBmpDel; ptr pQueryInterface; ptr pAddRef; ptr pRelease; ptr pGetBmp; ptr pGetGfx; ptr pGetScan0; ptr pGetW; ptr pGetH; ptr pGetStride; ptr pDraw; ptr pDrawRect; endstruct;", DllStructGetPtr($tBmp)) Local $hBmp = _GDIPlus_BitmapCreateFromScan0(DllStructGetData($tBmp, "Width"), DllStructGetData($tBmp, "Height"), $GDIP_PXF32ARGB, DllStructGetData($tBmp, "Stride"), DllStructGetData($tBmp, "pScan0")) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBmp) DllStructSetData($tBitmap, "Bmp", $hBmp) DllStructSetData($tBitmap, "Gfx", $hGfx) DllStructSetData($tBitmap, "pGlobalFree", $_pGDIPEX_LIB_GLOBALFREE) DllStructSetData($tBitmap, "pGfxDel", $_pGDIPEX_LIB_GFXDEL) DllStructSetData($tBitmap, "pBmpDel", $_pGDIPEX_LIB_BMPDEL) DllStructSetData($tBitmap, "pQueryInterface", $_pGDIPEX_ASM_OBJ_QUERYIF) DllStructSetData($tBitmap, "pAddRef", $_pGDIPEX_ASM_OBJ_ADDREF) DllStructSetData($tBitmap, "pRelease", $_pGDIPEX_ASM_OBJ_RELBMP) DllStructSetData($tBitmap, "pGetBmp", $_pGDIPEX_ASM_OBJ_BMPBMP) DllStructSetData($tBitmap, "pGetGfx", $_pGDIPEX_ASM_OBJ_BMPGFX) DllStructSetData($tBitmap, "pGetScan0", $_pGDIPEX_ASM_OBJ_BMPSCAN0) DllStructSetData($tBitmap, "pGetW", $_pGDIPEX_ASM_OBJ_BMPWIDTH) DllStructSetData($tBitmap, "pGetH", $_pGDIPEX_ASM_OBJ_BMPHEIGHT) DllStructSetData($tBitmap, "pGetStride", $_pGDIPEX_ASM_OBJ_BMPSTRIDE) DllStructSetData($tBitmap, "pDraw", $_pGDIPEX_ASM_BMPDRAW) DllStructSetData($tBitmap, "pDrawRect", $_pGDIPEX_ASM_BMPDRAWRECT) DllStructSetData($tBitmap, "Vtbl", DllStructGetPtr($tBitmap, "pQueryInterface")) DllStructSetData($tBitmap, "RefCnt", 1) Local $oBitmap = ObjCreateInterface(DllStructGetPtr($tBmp), $_sGDIPEX_IIDBMP, $_tagGDIPEX_BITMAP) If Not IsObj($oBitmap) Then _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBmp) Return SetError(9, 3, False) EndIf Return $oBitmap EndFunc ;==>__GDIPlusEx_BitmapCreateObject Func __GDIPlusEx_BitmapDispose(ByRef $tBitmap) If Not IsDllStruct($tBitmap) Then Return SetError(2, 1, False) DllCall("kernel32.dll", "ptr", "GlobalFree", "struct*", DllStructGetData($tBitmap, "pScan0ORIG")) DllCall("kernel32.dll", "ptr", "GlobalFree", "struct*", DllStructGetPtr($tBitmap)) $tBitmap = 0 Return True EndFunc ;==>__GDIPlusEx_BitmapDispose Func __GDIPlusEx_OnExit() If Not IsArray($_aGDIPEX_ASMSTRUCT) Or UBound($_aGDIPEX_ASMSTRUCT) < 1 Or UBound($_aGDIPEX_ASMSTRUCT, 0) <> 1 Then Return If $_aGDIPEX_ASMSTRUCT[0] >= UBound($_aGDIPEX_ASMSTRUCT) Then $_aGDIPEX_ASMSTRUCT[0] = UBound($_aGDIPEX_ASMSTRUCT) - 1 For $i = 1 To $_aGDIPEX_ASMSTRUCT[0] DllCall("kernel32.dll", "bool", "VirtualFree", "ptr", $_aGDIPEX_ASMSTRUCT[$i], "ulong_ptr", 0, "dword", 0x00008000) Next $_oGDIPEX_D2DFACTORY = 0 _GDIPlus_Shutdown() EndFunc ;==>__GDIPlusEx_OnExit #EndRegion GDIPlusEx functions 3D Starfield Scrolling v1: ;coded by UEZ Build 2016-06-06 #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <Timers.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) _GDIPlus_Startup() Global Const $iW = @DesktopWidth Global Const $iW2 = $iW / 2 Global Const $iH = @DesktopHeight Global Const $iH2 = $iH / 2 Global Const $hFullScreen = WinGetHandle("Program Manager") Global Const $aFullScreen = WinGetPos($hFullScreen) Global Const $main_screen_x = Abs($aFullScreen[0]) Global Const $hGUI = GUICreate("GDI+ Simple 3D Starfield Scrolling by UEZ boosted by FreeBasic", $aFullScreen[2], $aFullScreen[3], $aFullScreen[0], $aFullScreen[1], $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $hGUI) GUISetState() Global $pBitmap Global Const $hBitmap = _WinAPI_BitmapCreateDIB($iW, $iH, $pBitmap) Global Const $hDC = _WinAPI_GetWindowDC($hGUI) Global Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Global Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hBitmap) Global Const $hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) ;~ _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hGraphic, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Global Const $hPen = _GDIPlus_PenCreate(0, 1) Global Const $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000) Global Const $hBrush_Text = _GDIPlus_BrushCreateSolid(0xA0FFFFFF) Global Const $hFormat = _GDIPlus_StringFormatCreate() Global Const $hFamily = _GDIPlus_FontFamilyCreate("Arial") Global Const $hFont = _GDIPlus_FontCreate($hFamily, 9) Global Const $tLayout = _GDIPlus_RectFCreate($iW - 128, 0, 0, 0) Global Const $maxStars = 10000 Global Const $speed = 110.0 ;the higher the value the slow the speed Global Const $c = Int(Sqrt($iW^2 + $iH^2) / $iH) Global $sDLL = @ScriptDir & "\3D Starfield Scrolling v1 Booster.dll" If Not FileExists($sDLL) Then _BoosterDLL(True) Global $hDLL = DllOpen($sDLL) Global $j = 1, $tStars = DllStructCreate("float x[" & $maxStars & "]; float y[" & $maxStars & "];int c[" & $maxStars & "]") For $j = 1 To $maxStars NewStars($j) Next Global Const $om = MouseGetCursor() Global $idle_o, $idle_n, $fps = 0, $newx, $newy, $i Global $fps2 = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetCursor(16, 1, $hGUI) OnAutoItExitRegister("_Exit") AdlibRegister("FPS", 1000) While Sleep(10) Draw_Stars() WEnd Func FPS() $fps = $fps2 $fps2 = 0 EndFunc ;==>FPS Func Draw_Stars() $idle_n = _Timer_GetIdleTime() If $idle_n < $idle_o Then _Exit() $idle_o = $idle_n _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iW, $iH, $hBrush) DllCall($hDLL, "none", "Boost", "ptr", $hGraphic, "struct*", $tStars, "float", $speed, "float", $iW2, "float", $iH2, _ "int", $iW, "int", $iH, "int", $maxStars, "int", $c) _GDIPlus_GraphicsDrawStringEx($hGraphic, $maxStars & " stars @ " & $fps & " fps", $hFont, $tLayout, $hFormat, $hBrush_Text) DllCall("gdi32.dll", "bool", "BitBlt", "ptr", $hDC, "int", $main_screen_x, "int", 0, "int", $iW, "int", $iH, "ptr", $hDC_backbuffer, "int", 0, "int", 0, "dword", $SRCCOPY) $fps2 += 1 EndFunc ;==>Draw_Stars Func NewStars($j, $sx = 0, $sy = 0, $ex = $iW, $ey = $iH) $tStars.x(($j)) = Random($sx, $ex, 1) - $iW2 $tStars.y(($j)) = Random($sy, $ey, 1) - $iH2 $tStars.c(($j)) = 0 EndFunc ;==>NewStars Func _Exit() AdlibUnRegister("FPS") GUISetCursor($om, 1, $hGUI) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_PenDispose($hPen) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BrushDispose($hBrush_Text) _GDIPlus_GraphicsDispose($hGraphic) _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) _GDIPlus_Shutdown() GUIDelete($hGUI) DllClose($hDLL) Exit EndFunc ;==>_Exit Func _WinAPI_BitmapCreateDIB($iWidth, $iHeight, ByRef $pHBitmap) Local $tBMI = DllStructCreate($tagBITMAPINFO) $tBMI.biSize = DllStructGetSize($tBMI) - 4 $tBMI.biWidth = $iWidth $tBMI.biHeight = -$iHeight $tBMI.biPlanes = 1 $tBMI.biBitCount = 32 Local $aResult = DllCall("gdi32.dll", "ptr", "CreateDIBSection", "hwnd", 0, "struct*", $tBMI, "uint", 0, "ptr*", 0, "ptr", 0, "uint", 0) $pHBitmap = $aResult[4] Return $aResult[0] EndFunc ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-09-19 Func _BoosterDLL($bSaveBinary = False, $sSavePath = @ScriptDir) Local $BoosterDLL $BoosterDLL &= 'WrkATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAgAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1MgbW+AZGUuDQ0KJASGAFBFAABMAQkAELXLVVcFV+AADoAjCwECGQAsAAxCSgEkAAAQFAAHENUGmBACCwIDtwEEvwMA4wANAAzJIwEBHgQ0BAODAQYEDQCwAABeAQcgwAAAIAcYcvAADACgAZAUAATgAACCGJALWMEAAPQYKyAudGV4dIAD/CoPBEiBdQdiAgBgAFBgoC5kYXRhgAVEBcoFAWowixNAAEDALpJyAxQMCYOXAAqAAYIyjhNALmJzc4EFDNRPAjCU63DALmUvwxPCSMBKwh08zRMwQJwuacMJwlDAUgAIwACCPs4JwC5DUlTBAimBOQDQxBNG0Al0bC3CJyADgsMJSNAJcmX4bG9jxGbAaMJOwYrLCT5CoLE/AD8APwA0AFODIOwYxwQkQXnowAAcAACJw4kEJAToBsAvhdujyK8QABCjxIAAdA3HAWJgg8QYMcBbwwXAALiBblvDkFdWASAIEItUJCSF0gh1cqFAShCFwA8EjhXAA4PoATHbMIs10MGACOEC6w8ojXYAYA3oQAn/1hCD7AS6YQiJ2PAQD7EVzIAMhcB1COGh0AABg/gC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ziPOoAPPI8+jwCPRUAPTs9TD2HPZ8APbk9+D0WPisQPjw+RLIUfj6DAD6oPrg+yT7OAD7TPts+4D7oAD7xPvs+AT8KQD8bP4Y/k/AUuGA/zT8AMGAlsBQ1ADBQMG0wmDCmADDnMBUxIjFHADFkMXExhjGNADGbMa0xwTHRADHrMQwyHjIjQDIoMj8yTPAkXwQybDAljjKUMsEAMtky3zLvMvUAMgYzDDMTMyUAMy8zWTNwM4oAM5QztTPHM9MAM+8z+DMcNDwANFQ0ajR+NJoANKA0pjSvNLUANOg07jQBNTUANUQ1STVSNVkANWI1hTWjNakANa811DXaNQEANgc2FzY5NlEANl42aDaDNo0ANpg2njaxNrsANtM22TadN7EQN783xZAXKThBADhVOFo4dTiBADiPOJY4pjjBAfAX1TjcOCY5MwA5PzlVOWQ5eAA5fTm7OdE53wA55Tn0OQM6MgA6' $BoosterDLL &= 'jjqWOp46pkA6rjq2Or5wLOQAOug69DoAQAAEAAwgJiQwKDAAwlAiNwBIMEzQEYAAgtDzAAwwGDAc8QAC4PMABDAIMAww/hARAQ8ADwAPAA8ADwAAAA==' $BoosterDLL = _WinAPI_Base64Decode($BoosterDLL) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($BoosterDLL) & ']') DllStructSetData($tSource, 1, $BoosterDLL) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 19968) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\3D Starfield Scrolling v1 Booster.dll", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_BoosterDLL Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress 3D Starfield Scrolling v3 boosted.au3: ;coded by UEZ build 2016-06-10 #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> Global Const $hFullScreen = WinGetHandle("Program Manager") Global Const $aFullScreen = WinGetPos($hFullScreen) Global Const $iMainScreenX = Abs($aFullScreen[0]) Global $hGUI_3DStars, $iFPS = 0, $iCFPS, $iW, $iWh, $iH, $iHh, $hPen_Stars, $bExit_3DStars Global Const $fWarpZ = 5.5, $iStars = 21000, $fZDeep = 0.05 Global $fCycle = 0 ;for color Global $tStars = DllStructCreate("float x[" & $iStars & "];float y[" & $iStars & "];float z[" & $iStars & "];float px[" & $iStars & "];float py[" & $iStars & "]") Global $fCenterX = $iWh, $fCenterY = $iHh Global Const $sTitle = "3D Star Scrolling (" & $iStars & " stars) / FPS: " AutoItSetOption("GUIOnEventMode", 1) Global $sDLL = @ScriptDir & "\3D Starfield Scrolling v3 Booster.dll" If Not FileExists($sDLL) Then _StarsBoosterDLL(True) Global $hDLL = DllOpen($sDLL) StarScroller3D() DllClose($hDLL) AutoItSetOption("GUIOnEventMode", 0) ConsoleWrite("The end." & @CRLF) Func StarScroller3D() _GDIPlus_Startup() $bExit_3DStars = False $iW = @DesktopWidth $iH = @DesktopHeight $iWh = $iW / 2 $iHh = $iH / 2 Local $pBitmap Local $i, $xx, $yy, $fWidth, $iColor, $c, $iCount, $fPosX, $fPosY, $z = 0, $ii = -99 For $i = 0 To $iStars - 1 Reset_Star($i, 1.5) Next $hGUI_3DStars = GUICreate($sTitle & 0, $aFullScreen[2], $aFullScreen[3], $aFullScreen[0], $aFullScreen[1], $WS_POPUP, $WS_EX_TOPMOST) GUISetCursor(16, 1, $hGUI_3DStars) GUISetBkColor(0) GUISetState(@SW_SHOW, $hGUI_3DStars) Local Const $hHBitmap = _WinAPI_BitmapCreateDIB($iW, $iH, $pBitmap) Local Const $hDC = _WinAPI_GetDC($hGUI_3DStars) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) Local Const $hGfxCtxt = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) Local Const $hBrush_Text = _GDIPlus_BrushCreateSolid(0xA0FFFFFF) Local Const $hFormat = _GDIPlus_StringFormatCreate() Local Const $hFamily = _GDIPlus_FontFamilyCreate("Arial") Local Const $hFont = _GDIPlus_FontCreate($hFamily, 9) Local Const $tLayout = _GDIPlus_RectFCreate($iW - 128, 0, 0, 0) _GDIPlus_GraphicsSetSmoothingMode($hGfxCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hGfxCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) $hPen_Stars = _GDIPlus_PenCreate(0) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_3DStars") AdlibRegister("CalcFPS", 1000) Do _GDIPlus_GraphicsClear($hGfxCtxt, 0xFF000000) ;~ _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $BLACKNESS) $ii += 0.0075 $fCenterX = $iWh + (220 * Cos($ii * 2)) $fCenterY = $iHh + (200 * Sin($ii * 3)) $iCount = DllCall($hDLL, "uint", "Boost", "ptr", $hGfxCtxt, "struct*", $tStars, "int", $iStars, _ "float", $fCenterX, "float", $fCenterY, "float", $fCycle, "float", $fZDeep, "float", $fWarpZ, "int", $iW, "int", $iH)[0] $fCycle += 0.05 ;star color cycle _GDIPlus_GraphicsDrawStringEx($hGfxCtxt, $iCount & " stars @ " & $iCFPS & " fps", $hFont, $tLayout, $hFormat, $hBrush_Text) _WinAPI_BitBlt($hDC, $iMainScreenX, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) If $bExit_3DStars Then ExitLoop $iFPS += 1 Until Not Sleep(10) AdlibUnRegister("CalcFPS") _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI_3DStars, $hDC) _GDIPlus_GraphicsDispose($hGfxCtxt) _GDIPlus_PenDispose($hPen_Stars) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush_Text) GUIDelete($hGUI_3DStars) _GDIPlus_Shutdown() EndFunc ;==>StarScroller3D Func _Exit_3DStars() $bExit_3DStars = True EndFunc ;==>_Exit_3DStars Func CalcFPS() $iCFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS Func Reset_Star($a, $fFactor = 5) $tStars.x(($a)) = (Random(0.01, $fFactor) * $iW - $iWh) * $fWarpZ $tStars.y(($a)) = (Random(0.01, $fFactor) * $iH - $iHh) * $fWarpZ $tStars.z(($a)) = $fWarpZ $tStars.px(($a)) = 0 $tStars.py(($a)) = 0 EndFunc ;==>Reset_Star Func _WinAPI_BitmapCreateDIB($iWidth, $iHeight, ByRef $pHBitmap) Local $tBMI = DllStructCreate($tagBITMAPINFO) $tBMI.biSize = DllStructGetSize($tBMI) - 4 $tBMI.biWidth = $iWidth $tBMI.biHeight = -$iHeight $tBMI.biPlanes = 1 $tBMI.biBitCount = 32 Local $aResult = DllCall("gdi32.dll", "ptr", "CreateDIBSection", "hwnd", 0, "struct*", $tBMI, "uint", 0, "ptr*", 0, "ptr", 0, "uint", 0) $pHBitmap = $aResult[4] Return $aResult[0] EndFunc ;==>_WinAPI_BitmapCreateDIB ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2015-09-19 Func _StarsBoosterDLL($bSaveBinary = False, $sSavePath = @ScriptDir) Local $StarsBoosterDLL $StarsBoosterDLL &= 'W7kATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAgAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1MgbW+AZGUuDQ0KJASGAFBFAABMAQkAEIw4W1cFV+AADoAjCwECGQAuAAxCTAEkAAAQFAAHENUGmBACCwIDtwEEvwMA8wANAAxyrgIeBDQEAwEGQQQNALAAAF4BB8CFgAEHGHLwAACcAZBBFAAE4AAAGJALVAbBAh0WAC50ZXh0eYADHCwESIF1B2ICAGAAAFBgLmRhdGEXBIOCfQFqMosTQABASMAucgMUDAmDlwAKCoABNI4TQC5iczJzgQXUTwIwlOtwwLwuZcMTwkjASsIdPs0TcDBALmkEKMFQwVIIgw+PwAnALkNSVMECKYE7ANDEE0jQCXRsLcInIAOCwwlK0AlyZfhsb2PEZgFawU4CScoJPkKgsT8APwA/ADQAU4Mg7BjHBCRBeejgAB0AAInDiQQkAOgmIQAAhdujQMivABCjxIAAdAQNx2Jgg8QYMcAU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zNDOFM5sAM6gztjPDM80AM+Mz9jMANAYANDM0PDRRNI0ANNE04jT2NAAANQo1GTUdNTEANTs1RDViNXsANaU1qjXXNQEANjU2PDZFNkwANsQ2/DZ+N48AN5o3qDezN9wAN+I38jf8NxIAOBw4MTg3OFEAOHE4kjikOMkAOOw49jj+OAgAORw5NTmOOdgAOe859jkCOgkAOqU6uDq/OswAOtM6ZTt4O38AO4w7kzs2PEcAPE48YTxyPHgAPI08nDykPLkAPMU8yzzVPN4APAA9CT0iPTEQPUQ9SxAUdj2CAD2cPbE9wj3SAD3aPeI96j3yAD36PQI+Cj4SAD4aPiI+NT5bAD5sPqc+vz7ZAD4YPzY/Sz9cBD9kshSeP6M/yAA/2D/pP+4/82A/+z8AMHB7sBQAADAIMBEwGzAhADAqMDswpjCzAdAU2DDtMFUxcAAxjTG4McYxBwAyNTJCMmcyhAAykTKmMq0yuwAyzTLhMvEyCwAzLDM+M0MzSAAzXzNsM3ozfwAzjDOhM64ztAAz4TP5M/8zD0A0FTQmNCwQFkUANE80eTSQNKoANLQ01TTnNPMANA81GDU8NVwANXQ1ijWeNboANcA1xjXPNdUANQg2DjYhNlUANmQ2aTZyNnkA' $StarsBoosterDLL &= 'NoI2pTbDNskANs829Db6NiEANyc3NzdZN3EAN343iDejN60AN7g3vjfRN9sAN/M3+Te9ONEQON845ZAXSTlhADl1OXo5lTmhADmvObY5xjnhAfAX9Tn8OUY6UwA6Xzp1OoQ6mAA6nTrbOvE6/wA6BTsUOyM7UgA7rju2O747xkA7zjvWO95wLAQAPAg8FDwAQAAEAAxgEiwwMDAAglDiNgBIMEwwsHWDQODzAAwwGDAc8QCK4PMABDAVDDAQEQE/DwAPAA8ADwAPAAQA' $StarsBoosterDLL = _WinAPI_Base64Decode($StarsBoosterDLL) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($StarsBoosterDLL) & ']') DllStructSetData($tSource, 1, $StarsBoosterDLL) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 20480) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\3D Starfield Scrolling v3 Booster.dll", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_StarsBoosterDLL Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress FreeBasic source codes: 3D Object Rotation v1.3.0: 'coded by UEZ build 2016-06-10 beta #Include Once "win\gdiplus.bi" Using GDIPLUS Extern "Windows-MS" Sub Boost(ByVal hCanvas as GpGraphics Ptr, ByVal tData As Any Ptr, _ iCountX As ULong, iCountY As ULong, _ fX As Single, fY As Single, fZ As Single, fW As Single, fH As Single, fScale As Single = 1.0, fZDeepCorrection As Single = 1000.0) Export Dim As ULong c, iUBound, iSingle Dim As Single Ptr pX, pY, pZ, pfX, pfY, pFZ Dim As UInteger Ptr pPen Dim As Single fCosRotX, fSinRotX, fCosRotY, fSinRotY, fCosRotZ, fSinRotZ, f1, f2, f3, f4, f5, f6, fXPos, fYPos, fZPos, fZPerspCorrection iUBound = iCountX * iCountY + iCountX + iCountY + 1 iSingle = SizeOf(Single) For c = 0 To iUbound - 1 'get pointers to each struct element pX = tData '+ 0 * iUBound + 0 * iSingle pY = tData + 1 * iUBound * iSingle pZ = tData + 2 * iUBound * iSingle pfX = tData + 3 * iUBound * iSingle pfY = tData + 4 * iUBound * iSingle pfZ = tData + 5 * iUBound * iSingle pPen = tData + 6 * iUBound * iSingle 'calculate 3D rotation fCosRotX = Cos(fX) fSinRotX = Sin(fX) fCosRotY = Cos(fY) fSinRotY = Sin(fY) fCosRotZ = Cos(fZ) fSinRotZ = Sin(fZ) f1 = fCosRotY * pX[c] f2 = fSinRotX * pY[c] f3 = fCosRotX * pZ[c] f4 = fCosRotX * pY[c] f5 = fSinRotX * pZ[c] f6 = f1 - fSinRotY * (f2 + f3) fXPos = (fCosRotZ * f6 - fSinRotZ * (f4 - f5)) * fScale fYPos = (fSinRotZ * f6 + fCosRotZ * (f4 - f5)) * fScale fZPos = (fSinRotY * pX[c] + fCosRotY * (f2 + f3)) * fScale fZPerspCorrection = 1 / (fZPos / fZDeepCorrection + 1) pfX[c] = fXPos * fZPerspCorrection + fW pfY[c] = fYPos * fZPerspCorrection + fH pfZ[c] = fZPos 'draw lines If c > 0 Then GdipDrawLine(hCanvas, pPen[c], pfX[c - 1], pfY[c - 1], pfX[c], pfY[c]) EndIf Next End Sub End Extern Plasma Variante 5: 'coded by UEZ build 2016-06-10 beta #Include Once "win\gdiplus.bi" #Include Once "crt\math.bi" Using GDIPLUS Extern "Windows-MS" Function Dist(a As Single, b As Single, c As Single, d As Single) As Single Return Sqrt((a - c) * (a - c) + (b - d) * (b - d)) End Function Sub Boost(ByVal hCanvas as GpGraphics Ptr, iSizeW As Long, iSizeH As Long, iW As Long, iH As Long, fTime As Single) Export Dim As Long iX, iY, iARGB Dim As Single cx, cy, v, f1, fDist Const Pi As Double = 3.1415926535897932 Dim As GpBrush Ptr hBrush For iY = 0 To iH - iSizeH Step iSizeH For iX = 0 To iW - iSizeW Step iSizeW fDist = Dist(fTime * 1.5, iX, iY, 32) cx = iX + 128 * Sin(fDist / 48) fDist = Dist(iY, 128, fTime * 2.5, 8) cy = iY + 92 * Cos(fDist / 32) v = Cos(Sqrt(cx * cx + cy * cy) / 512 + fTime) f1 = v * Pi iARGB = &hFF000000 + &h10000 * Int(Abs(Cos(f1 / 2)) * &hFF) + &h100 * Int(Abs(Sin(f1 * 2)) * &hFF) + Int(Abs(Cos(f1 / 1.5)) * &hFF) GdipCreateSolidFill(iARGB, @hBrush) GdipFillRectangle(hCanvas, hBrush, iX, iY, iSizeW, iSizeH) GdipDeleteBrush(hBrush) Next Next End Sub End Extern 3D Starfield Scrolling v3: 'coded by UEZ build 2016-06-10 beta #Include Once "win\gdiplus.bi" Using GDIPLUS Extern "Windows-MS" Declare Function rnd_range (first As Single, last As Single) As Single Declare Function Boost(ByVal hCanvas as GpGraphics Ptr, ByVal tStars As Any Ptr, iStars As Long, _ fCenterX As Single, fCenterY As Single, fCycle As Single, fZDeep As Single, fWarpZ As Single, _ iW As Long, iH As Long) As ULong Function rnd_range (first As Single, last As Single) As Single Function = Rnd * (last - first) + first End Function Function Boost(ByVal hCanvas as GpGraphics Ptr, ByVal tStars As Any Ptr, iStars As Long, _ fCenterX As Single, fCenterY As Single, fCycle As Single, fZDeep As Single, fWarpZ As Single, _ iW As Long, iH As Long) As ULong Export Dim As Single Ptr pX, pY, pZ, pPX, pPY Dim As ULong iSingle, i, c, iColor, iCount Dim As Single xx, yy, fWidth, fPosX, fPosY Dim As GpPen Ptr hPen iSingle = SizeOf(Single) pX = tStars pY = tStars + iStars * iSingle pZ = tStars + 2 * iStars * iSingle pPX = tStars + 3 * iStars * iSingle pPY = tStars + 4 * iStars * iSingle iCount = 0 For i = 0 To iStars - 1 xx = pX[i] / pZ[i] yy = pY[i] / pZ[i] fWidth = 1.5 / pZ[i] If pPX[i] <> 0 Then fPosX = xx + fCenterX fPosY = yy + fCenterY If fPosX > 0 And fPosX < iW And fPosY > 0 And fPosY < iH Then c = Int(&h80 + Sin(i + fCycle) * 50) If c > 255 Then c = 255 If c < 0 Then c = 0 iColor = &hF0000000 + c * &h10000 + c * &h100 + c GdipCreatePen1(iColor, fWidth, 2, @hPen) GdipDrawEllipse(hCanvas, hPen, fPosX, fPosY, fWidth, fWidth) GdipDeletePen(hPen) iCount += 1 EndIf EndIf pZ[i] -= fZDeep pPX[i] = xx pPY[i] = yy If pZ[i] < fZDeep Or pPX[i] > iW Or pPY[i] > iH Then pX[i] = (Rnd * iW - iW / 2) * fWarpZ pY[i] = (Rnd * iH - iH / 2) * fWarpZ pZ[i] = fWarpZ pPX[i] = 0 pPY[i] = 0 EndIf Next Return iCount End Function End Extern 3D Starfield Scrolling v1: 'coded by UEZ build 2016-06-10 beta #Include Once "win\gdiplus.bi" Using GDIPLUS Extern "Windows-MS" Declare Function rnd_range (first As Single, last As Single) As Single Function rnd_range (first As Single, last As Single) As Single Function = Rnd * (last - first) + first End Function Sub Boost(ByVal hCanvas as GpGraphics Ptr, ByVal tStars As Any Ptr, fSpeed As Single, iW2 As Single, iH2 As Single, iW As Long, iH As Long, _ maxStars As Long, r As Long) Export Dim As Double newx, newy Dim As Single Ptr pX, pY Dim As Integer Ptr pC Dim As Long iSingle, iColor, j Dim As GpPen Ptr hPen GdipCreatePen1(&hFFFFFFFF, 1, 2, @hPen) iSingle = SizeOf(Single) pX = tStars pY = tStars + maxStars * iSingle pC = tStars + 2 * maxStars * iSingle j = 0 Do Until j > maxStars - 1 pX[j] += pX[j] / fSpeed pY[j] += pY[j] / fSpeed pC[j] += r If pC[j] > &hFF Then pC[j] = &hFF EndIf iColor = &hFF000000 + pC[j] * &h10000 + pC[j] * &h100 + pC[j] newx = pX[j] + iW2 newy = pY[j] + iH2 GdipSetPenColor(hPen, iColor) GdipDrawRectangle(hCanvas, hPen, iW2 - pX[j], iH2 - pY[j], 1, 1) If newx < 0 Or newx > iW Or newy < 0 Or newy > iH Then pX[j] = iW2 * rnd_range(0.5, 1.5) - iW2 pY[j] = iH2 * rnd_range(0.5, 1.5) - iH2 pC[j] = 0 EndIf j += 1 Loop GdipDeletePen(hPen) End Sub End Extern Download: I'm absolutely new to FreeBasic, so there might be much better approches! Have fun.
  13. So a little project I am working on. I sort of have this working via Irfanview using cmd scripting, but curious if it can be done in AutoIT maybe with GDI+ or any other native tool. I have an ancient microfilm scanner, and currently the only way it will scan is to take a full screen scan of 11x14 and make it a 2 page 8.5x11 Tiff Image. So this is cutting the image in half down the middle. What I need to do is have the 2nd page append to the first page on the right side, and then save the image as a single flat new image (Do not care about format very much) Any of the GDI wizards think this can be done? Here is my starting point, I can open the image, convert the format to .jpg and flatten it (lose the 2nd page of the TIF) I have not quite figured out how to grab that 2nd page or do the append (panorama #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Edit: got a lead on the multipage stuff: And my code has grown into something where I am trying to draw an image ontop of the first image but it looks like it wont expand the canvas, but ultimately I was thinking just draw the 2nd page next to the 1st page once I figure out how to capture the 2nd page. #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") $iWidth = _GDIPlus_ImageGetWidth($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) ; Draw one image in another $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImage($hGraphics, $hImage, $iWidth, $iHeight) _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown()
  14. Hello everyone! As always, I'm proud to present you vPaint. It's an image editor. It uses GDI+ as its drawing library. I want to thank to all members of this forum. Without you, this app wouldn't be ever written. Thank you for everything. Download: vPaint 4 image editor
  15. Hello! I've been working on this UDF for some time, but when I read Seeking "kinetic typography" capability in au3 topic, I decided to share it. This UDF brings some functions for creating animations in GDI+ without worrying about rendering or calculating. Features: Adding basic shapes (rectangle, ellipse) and text Animating object properties (like position or size) Animatable transformations (translate, rotate, scale) Double-buffering Rendering to a window or GUI control Enjoy! Motion Graphics UDF
  16. Since I disovered FreeBasic I decided to create a DLL to implement much faster image processing functionality to AutoIt. Following functions are implemented yet: _GDIPlus_BitmapApplyFilter_BWJJNDithering _GDIPlus_BitmapApplyFilter_Cartoon1 _GDIPlus_BitmapApplyFilter_ColorAccent _GDIPlus_BitmapApplyFilter_Convolution_AnotherBlur _GDIPlus_BitmapApplyFilter_Convolution_BoxBlur _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection1 _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection2 _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection3 _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection4 _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection5 _GDIPlus_BitmapApplyFilter_Convolution_EdgeDetection6 _GDIPlus_BitmapApplyFilter_Convolution_Emboss1 _GDIPlus_BitmapApplyFilter_Convolution_Emboss45Degree _GDIPlus_BitmapApplyFilter_Convolution_EmbossTopLeftBottomRight _GDIPlus_BitmapApplyFilter_Convolution_Gaussian3x3 _GDIPlus_BitmapApplyFilter_Convolution_Gaussian5x5_1 _GDIPlus_BitmapApplyFilter_Convolution_Gaussian5x5_2 _GDIPlus_BitmapApplyFilter_Convolution_GaussianBlur _GDIPlus_BitmapApplyFilter_Convolution_IntenseEmboss _GDIPlus_BitmapApplyFilter_Convolution_Kirsch _GDIPlus_BitmapApplyFilter_Convolution_Laplace1 _GDIPlus_BitmapApplyFilter_Convolution_Laplace2 _GDIPlus_BitmapApplyFilter_Convolution_Laplace3 _GDIPlus_BitmapApplyFilter_Convolution_LaplacianOfGaussian _GDIPlus_BitmapApplyFilter_Convolution_ManualMatrix _GDIPlus_BitmapApplyFilter_Convolution_MotionBlur _GDIPlus_BitmapApplyFilter_Convolution_Outline3x3 _GDIPlus_BitmapApplyFilter_Convolution_Prewitt _GDIPlus_BitmapApplyFilter_Convolution_Sharpen1 _GDIPlus_BitmapApplyFilter_Convolution_Sharpen2 _GDIPlus_BitmapApplyFilter_Convolution_Sobel _GDIPlus_BitmapApplyFilter_Convolution_SovelVsPrewitt _GDIPlus_BitmapApplyFilter_Convolution_TriangleBlur _GDIPlus_BitmapApplyFilter_Convolution_Unsharp _GDIPlus_BitmapApplyFilter_Convolution_Unsharp5x5 _GDIPlus_BitmapApplyFilter_Dilatation _GDIPlus_BitmapApplyFilter_DistortionBlur _GDIPlus_BitmapApplyFilter_Edges _GDIPlus_BitmapApplyFilter_Erosion _GDIPlus_BitmapApplyFilter_FishEye _GDIPlus_BitmapApplyFilter_Indexed _GDIPlus_BitmapApplyFilter_Jitter _GDIPlus_BitmapApplyFilter_Kuwahara _GDIPlus_BitmapApplyFilter_Linellism _GDIPlus_BitmapApplyFilter_Median _GDIPlus_BitmapApplyFilter_Median2 _GDIPlus_BitmapApplyFilter_OilPainting _GDIPlus_BitmapApplyFilter_PenSketch _GDIPlus_BitmapApplyFilter_PenSketch2 _GDIPlus_BitmapApplyFilter_Pixelate _GDIPlus_BitmapApplyFilter_Pointillism _GDIPlus_BitmapApplyFilter_RadialBlur _GDIPlus_BitmapApplyFilter_Raster _GDIPlus_BitmapApplyFilter_Swirl _GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour _GDIPlus_BitmapApplyFilter_TiltShift _GDIPlus_BitmapApplyFilter_TimeWarp _GDIPlus_BitmapApplyFilter_Wave _GDIPlus_BitmapApplyFilter_XRay Since I am absolutely a newbie in FreeBasic, the DLL may contain errors. Please report any bug. FreeBasic source code can be found here: https://pastebin.com/Lugp6rCR To do: add function headers with descriptions speed-up FB code -> partly done add more filters -> ongoing Credits to: Jakub Szymanowski rdc Dewald Esterhuizen Santhosh G_ Christian Graus www.gutgames.com Have fun. Download link: You can compare the speed with AutoIt version: #AutoIt3Wrapper_Version=b #include <Array.au3> #include <GDIPlus.au3> Global $sFile = FileOpenDialog("Select an image", "", "Images (*.jpg;*.png;*.gif;*.bmp)") If @error Then Exit _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172 Global Const $hImage = _GDIPlus_ImageLoadFromFile($sFile) Global Const $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage) Global Const $hGUI = GUICreate("GDI+ Image Filters", $iW * 2, $iH) Global $fProg = 0, $iEnd = $iW * $iH - 1 AdlibRegister("Progress", 490) Global $t = TimerInit() Global Const $hGDIBitmap = _GDIPlus_BitmapApplyFilter_Median($hImage, 4) ConsoleWrite(Round(TimerDiff($t) / 1000, 2) & " s / " & Round(TimerDiff($t) / 60000, 2) & " min" & @CRLF) Global Const $iPic = GUICtrlCreatePic("", 0, 0, $iW - 1, $iH - 1) Global Const $iPic_o = GUICtrlCreatePic("", $iW, 0, $iW - 1, $iH - 1) _WinAPI_DeleteObject(GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hGDIBitmap)) Global Const $hGDIBitmap2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($iPic_o, $STM_SETIMAGE, $IMAGE_BITMAP, $hGDIBitmap2)) GUISetState() AdlibUnRegister("Progress") ToolTip("") Do Until GUIGetMsg() = -3 _GDIPlus_ImageDispose($hImage) _WinAPI_DeleteObject($hGDIBitmap) _WinAPI_DeleteObject($hGDIBitmap2) _GDIPlus_Shutdown() Exit Func Progress() ToolTip(Int($fProg / $iEnd * 100) & " % / " & Round(TimerDiff($t) / 60000, 2) & " min", MouseGetPos(0) + 30, MouseGetPos(1) + 30) EndFunc #Region Symmetric Nearest Neighbour Func _GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour($hImage, $fRadius = 2, $bGDI = True) ;no alpha channel implemented yet Local Const $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage) Local Const $hBitmap_Dest = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $tBitmapData_Dest = _GDIPlus_BitmapLockBits($hBitmap_Dest, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMWRITE, $GDIP_PXF32ARGB) Local Const $iScan0_Dest = DllStructGetData($tBitmapData_Dest, "Scan0") Local Const $tPixel_Dest = DllStructCreate("int[" & $iW * $iH & "];", $iScan0_Dest) Local Const $tBitmapData = _GDIPlus_BitmapLockBits($hImage, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local Const $iScan0 = DllStructGetData($tBitmapData, "Scan0") Local Const $tPixel = DllStructCreate("int[" & $iW * $iH & "];", $iScan0) Local $iRowOffset, $iX, $iY, $c, $k, $sumR, $sumG, $sumB, $iCount, $xx, $yy, $iR, $iG, $iB, $iR1, $iG1, $iB1, $iR2, $iG2, $iB2, $x, $y For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW For $iX = 0 To $iW - 1 $sumR = 0 $sumG = 0 $sumB = 0 $iCount = 0 $c = DllStructGetData($tPixel, 1, $iRowOffset + $iX) $iR = BitShift(BitAND(0x00FF0000, $c), 16) $iG = BitShift(BitAND(0x0000FF00, $c), 8) $iB = BitAND(0x000000FF, $c) For $yy = -$fRadius To $fRadius For $xx = -$fRadius To $fRadius $k = $iX + $xx $x = $k < 0 ? 0 : $k > $iW - 1 ? $iW - 1 : $k $k = $iY + $yy $y = $k < 0 ? 0 : $k > $iH - 1 ? $iH - 1 : $k $c = DllStructGetData($tPixel, 1, $y * $iW + $x) $iR1 = BitShift(BitAND(0x00FF0000, $c), 16) $iG1 = BitShift(BitAND(0x0000FF00, $c), 8) $iB1 = BitAND(0x000000FF, $c) $k = $iX - $xx $x = $k < 0 ? 0 : $k > $iW - 1 ? $iW - 1 : $k $k = ($iY - $yy) $y = $k < 0 ? 0 : $k > $iH - 1 ? $iH - 1 : $k $c = DllStructGetData($tPixel, 1, $y * $iW + $x) $iR2 = BitShift(BitAND(0x00FF0000, $c), 16) $iG2 = BitShift(BitAND(0x0000FF00, $c), 8) $iB2 = BitAND(0x000000FF, $c) If __DeltaE($iR, $iG, $iB, $iR1, $iG1, $iB1) < __DeltaE($iR, $iG, $iB, $iR2, $iG2, $iB2) Then $sumR += $iR1 $sumG += $iG1 $sumB += $iB1 Else $sumR += $iR2 $sumG += $iG2 $sumB += $iB2 EndIf $iCount += 1 Next Next DllStructSetData($tPixel_Dest, 1, 0xFF000000 + Int($sumR / $iCount) * 0x10000 + Int($sumG / $iCount) * 0x100 + Int($sumB / $iCount), $iRowOffset + $iX) $fProg += 1 Next Next _GDIPlus_BitmapUnlockBits($hImage, $tBitmapData) _GDIPlus_BitmapUnlockBits($hBitmap_Dest, $tBitmapData_Dest) _GDIPlus_ImageSaveToFile($hBitmap_Dest, @ScriptDir & "\Filter_SNN" & $fRadius & "_" & @YEAR & @MON & @MDAY & @MIN & @SEC & ".png") If $bGDI Then Local $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_Dest) _GDIPlus_BitmapDispose($hBitmap_Dest) Return $hGDIBitmap EndIf Return $hBitmap_Dest EndFunc Func __DeltaE($iR1, $iG1, $iB1, $iR2, $iG2, $iB2) Return Sqrt(($iR1 - $iR2) * ($iR1 - $iR2) + ($iG1 - $iG2) * ($iG1 - $iG2) + ($iB1 - $iB2) * ($iB1 - $iB2)) EndFunc #EndRegion #Region Jitter Func _GDIPlus_BitmapApplyFilter_Jitter($hImage, $iAmount = 20, $bGDI = True) Local Const $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage) Local Const $hBitmap_Dest = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $tBitmapData_Dest = _GDIPlus_BitmapLockBits($hBitmap_Dest, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMWRITE, $GDIP_PXF32ARGB) Local Const $iScan0_Dest = DllStructGetData($tBitmapData_Dest, "Scan0") Local Const $tPixel_Dest = DllStructCreate("int[" & $iW * $iH & "];", $iScan0_Dest) Local Const $tBitmapData = _GDIPlus_BitmapLockBits($hImage, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local Const $iScan0 = DllStructGetData($tBitmapData, "Scan0") Local Const $tPixel = DllStructCreate("int[" & $iW * $iH & "];", $iScan0) Local $iX, $iY, $iRowOffset, $fNX, $fNY For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $fNX = $iX + Int((Random() - 0.5) * $iAmount) $fNX = $fNX < 1 ? 1 : $fNX > $iW - 1 ? $iW - 1 : $fNX $fNY = ($iY + Int((Random() - 0.5) * $iAmount)) $fNY = $fNY < 1 ? 1 : $fNY > $iH - 1 ? $iH - 1 : $fNY $fNY *= $iW DllStructSetData($tPixel_Dest, 1, DllStructGetData($tPixel, 1, $fNY + $fNX), $iRowOffset + $iX) $fProg += 1 Next Next _GDIPlus_BitmapUnlockBits($hImage, $tBitmapData) _GDIPlus_BitmapUnlockBits($hBitmap_Dest, $tBitmapData_Dest) _GDIPlus_ImageSaveToFile($hBitmap_Dest, @ScriptDir & "\Filter_Jitter" & $iAmount & "_" & @YEAR & @MON & @MDAY & @MIN & @SEC & ".png") If $bGDI Then Local $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_Dest) _GDIPlus_BitmapDispose($hBitmap_Dest) Return $hGDIBitmap EndIf Return $hBitmap_Dest EndFunc #EndRegion #Region Median Func _GDIPlus_BitmapApplyFilter_Median($hImage, $fRadius = 3, $bGDI = True) Local Const $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage) Local Const $hBitmap_Dest = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $tBitmapData_Dest = _GDIPlus_BitmapLockBits($hBitmap_Dest, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMWRITE, $GDIP_PXF32ARGB) Local Const $iScan0_Dest = DllStructGetData($tBitmapData_Dest, "Scan0") Local Const $tPixel_Dest = DllStructCreate("int[" & $iW * $iH & "];", $iScan0_Dest) Local Const $tBitmapData = _GDIPlus_BitmapLockBits($hImage, 0, 0, $iW - 1, $iH - 1, $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local Const $iScan0 = DllStructGetData($tBitmapData, "Scan0") Local Const $tPixel = DllStructCreate("int[" & $iW * $iH & "];", $iScan0) Local $iX, $iY, $iRowOffset For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 DllStructSetData($tPixel_Dest, 1, __Median_Value($iX, $iY, $fRadius, $tPixel, $iW, $iH), $iRowOffset + $iX) $fProg += 1 Next Next _GDIPlus_BitmapUnlockBits($hImage, $tBitmapData) _GDIPlus_BitmapUnlockBits($hBitmap_Dest, $tBitmapData_Dest) _GDIPlus_ImageSaveToFile($hBitmap_Dest, @ScriptDir & "\Filter_Median" & $fRadius & "_" & @YEAR & @MON & @MDAY & @MIN & @SEC & ".png") If $bGDI Then Local $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_Dest) _GDIPlus_BitmapDispose($hBitmap_Dest) Return $hGDIBitmap EndIf Return $hBitmap_Dest EndFunc Func __Median_Value($iPosX, $iPosY, $fRadius, $tPixel, $iW, $iH) Local $iX, $iY, $aColors[1000], $iColors = 0, $iSize = $iW * $iH - 1, $iOff, $e For $iX = $iPosX - $fRadius To $iPosX + $fRadius For $iY = $iPosY - $fRadius To $iPosY + $fRadius $iOff = 1 + $iY * $iW + $iX $aColors[$iColors] = DllStructGetData($tPixel, 1, $iOff < 1 ? 1 : $iOff > $iSize ? $iSize : $iOff) $iColors += 1 Next Next ReDim $aColors[$iColors] ;~ _ArraySort($aColors, 0) $e = $iColors - 1 __ArrayQuickSort1D($aColors, 0, $e) Local $iMid = Floor($iColors / 2), $iMedian If BitAND($iColors, 1) Then $iMedian = Int($aColors[$iMid + 1]) Else $iMedian = Int(($aColors[$iMid] + $aColors[$iMid + 1]) / 2) EndIf Return $iMedian EndFunc #EndRegion
  17. Motion Graphics UDF

    Version 0.0.8

    217 downloads

    Simple UDF for creating animations in GDI+ If you want to see more "experimental" features, go to GitHub.
  18. Version v0.9.6 build 2017-05-14 beta

    211 downloads

    A collection of image filter effects usable with AutoIt! IMPORTANT: You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name! Distributing copies of this UDF incl. _GDIPlus_BitmapApplyFilter.dll in compiled format (exe) must be free of any fee! More information can be found in the forum thread!
  19. Hello. I am trying to create preloader animation on gui. I take one png transparent image, add another etc- supposed to be animation. The problem I am facing: What is the best way of deleting previous image created with gdi plus? ;;;;; In the main code I create a picture: Global $preloader = GUICtrlCreatePic("", 50, 180,0,0) ;;;;; Later on using the function of changing images func preloader() if ($load == 1) then $png ="\1.png" if ($load == 2) then $png ="2.png" if ($load == 3) then $png ="3.png" if ($load == 4) then $png ="4.png" $hImage = _GDIPlus_ImageLoadFromFile($png) $Bmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($preloader, $STM_SETIMAGE, $IMAGE_BITMAP, $Bmp)) $load = $load+1 if $load>4 then $load=1 endfunc
  20. Some Graphical Examples using GDI+ Vol. II build 2016-05-07 (33 examples) This is the continuation of "Some Graphical Examples using GDI+ Vol. I" with currently 33 examples in "snippet style". For downloads and screenshots just visit the download section. All examples should properly run on Win7+ operating systems / tested on AutoIt v3.3.14.2! More examples will follow from time to time. Thanks to Eukalyptus! Please report any issues / feel free to post any comment. Have fun.
  21. Take a screenshot of your desktop (works even if the desktop is hidden), then redraws it row by row. Makes a neat little effect. An effect I remember seeing at the photo booth at Chuck E' Cheese. I mostly just wanted to mess with LockBits and PrintWindow and thought this was a decent way to figure it out, but I liked the outcome and thought I'd share lol #include <GDIPlus.au3> #include <WinApi.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global $tDesktopMetrics = GetDesktopMetrics() Global $hHBitmapDesktop = CaptureWindow("", -1, -1, -1, -1, "Program Manager") Global $hBitmapDesktop = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmapDesktop) _WinAPI_DeleteObject($hHBitmapDesktop) Global $iW = _GDIPlus_ImageGetWidth($hBitmapDesktop) Global $iH = _GDIPlus_ImageGetHeight($hBitmapDesktop) Global $tBitmapData = _GDIPlus_BitmapLockBits($hBitmapDesktop, 0, 0, $iW, $iH, $GDIP_ILMREAD, $GDIP_PXF32PARGB) Global $tPixelMap = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData, "Scan0")) Global $hGui = GUICreate("Redraw", $iW, $iH, $tDesktopMetrics.x, $tDesktopMetrics.y, $WS_POPUP) Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui) Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics) Global $tBitmapData2 = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $iW, $iH, $GDIP_ILMWRITE, $GDIP_PXF32PARGB) Global $tPixelMap2 = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData2, "Scan0")) GUISetState(@SW_SHOW, $hGui) _GDIPlus_GraphicsClear($hGraphics) For $iY = 0 To $iH - 1 Local $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 ;get each pixel in each line and row DllStructSetData($tPixelMap2, 1, DllStructGetData($tPixelMap, 1, $iRowOffset + $iX), $iRowOffset + $iX) Next If (Not Mod($iY, 5)) Then ; Every 5 rows draw the bitmap _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData2) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) $tBitmapData2 = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $iW, $iH, $GDIP_ILMWRITE, $GDIP_PXF32PARGB) $tPixelMap2 = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData2, "Scan0")) EndIf Next If (Mod($iY, 5)) Then ; Didn't end on an even row, clean up _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData2) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) $tPixelMap2 = 0 $tBitmapData2 = 0 EndIf _GDIPlus_BitmapUnlockBits($hBitmapDesktop, $tBitmapData) _GDIPlus_BitmapDispose($hBitmapDesktop) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() GUIDelete($hGui) Exit 0 Func CaptureWindow($sFileName = "", $iLeft = -1, $iTop = -1, $iWidth = -1, $iHeight = -1, $hWnd = WinGetHandle("[Active]"), $bClientArea = True) If (Not IsHWnd($hWnd)) Then $hWnd = WinGetHandle($hWnd) If (@error) Then Return SetError(1, 0, False) If (BitAND(WinGetState($hWnd), 16) = 16) Then Return SetError(2, 0, False) Local $iSrcWidth = 0 Local $iSrcHeight = 0 ConsoleWrite($iLeft & ', ' & $iTop & ", " & $iWidth & ', ' & $iHeight & @LF) If ($hWnd = _WinAPI_GetDesktopWindow() Or $hWnd = WinGetHandle("Program Manager")) Then Local $tDesktop = GetDesktopMetrics() If ($iWidth = -1 Or $iWidth = 0 Or $iWidth = Default Or $iWidth > DllStructGetData($tDesktop, 3)) Then $iWidth = DllStructGetData($tDesktop, 3) If ($iHeight = -1 Or $iHeight = 0 Or $iHeight = Default Or $iWidth > DllStructGetData($tDesktop, 4)) Then $iHeight = DllStructGetData($tDesktop, 4) $iSrcWidth = DllStructGetData($tDesktop, 3) $iSrcHeight = DllStructGetData($tDesktop, 4) Else Local $tRectWindow = _WinAPI_GetWindowRect($hWnd) ; Get the absolute width, using Abs on all of the memembers because the [1] index of the struct may be negative, supports multiple monitors Local $iAbsWidth = Abs(Abs(DllStructGetData($tRectWindow, 3)) - Abs(DllStructGetData($tRectWindow, 1))) ; Get the absolute height, using Abs on all of the memembers because the [1] index of the struct may be negative, supports multiple monitors ; Subtracts the caption bar if $bClientArea only Local $iAbsHeight = Abs(Abs(DllStructGetData($tRectWindow, 4)) - Abs(DllStructGetData($tRectWindow, 2))) - ($bClientArea ? _WinAPI_GetSystemMetrics($SM_CYCAPTION) : 0) If ($iWidth = -1 Or $iWidth = 0 Or $iWidth = Default Or $iWidth > $iAbsWidth) Then $iWidth = $iAbsWidth If ($iHeight = -1 Or $iHeight = 0 Or $iHeight = Default Or $iHeight > $iAbsHeight) Then $iHeight = $iAbsHeight $iSrcWidth = $iAbsWidth $iSrcHeight = $iAbsHeight EndIf If ($iLeft = -1 Or $iLeft = Default) Then $iLeft = 0 If ($iTop = -1 Or $iTop = Default) Then $iTop = 0 Local $hDC = _WinAPI_GetWindowDC($hWnd) Local $hDestDC = _WinAPI_CreateCompatibleDC($hDC) Local $hDestBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight) Local $hDestSv = _WinAPI_SelectObject($hDestDC, $hDestBitmap) Local $hSrcDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateCompatibleBitmap($hDC, $iSrcWidth, $iSrcHeight) Local $hSrcSv = _WinAPI_SelectObject($hSrcDC, $hBmp) _WinAPI_PrintWindow($hWnd, $hSrcDC, True) _WinAPI_BitBlt($hDestDC, 0, 0, $iWidth, $iHeight, $hSrcDC, $iLeft, $iTop, $MERGECOPY) _WinAPI_SelectObject($hDestDC, $hDestSv) _WinAPI_SelectObject($hSrcDC, $hSrcSv) _WinAPI_ReleaseDC($hWnd, $hDC) _WinAPI_DeleteDC($hDestDC) _WinAPI_DeleteDC($hSrcDC) _WinAPI_DeleteObject($hBmp) $tPoint = 0 $tRectWindow = 0 $tDesktop = 0 If ($sFileName) Then _GDIPlus_Startup() Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hDestBitmap) _GDIPlus_ImageSaveToFile($hBitmap, $sFileName) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() EndIf Return $hDestBitmap EndFunc ;==>CaptureWindow Func GetDesktopMetrics() Return _GDIPlus_RectFCreate(_WinAPI_GetSystemMetrics($SM_XVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_YVIRTUALSCREEN), _ _WinAPI_GetSystemMetrics($SM_CXVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_CYVIRTUALSCREEN)) EndFunc ;==>GetDesktopMetrics
  22. When I was thinking about selections in Photoshop, I saw the resemblance to selection modes in GDI+ Regions. Then, I started to think how to apply these combine modes to Paths. So, here is a small script for this: Download
  23. Combining GDI+ Paths

    Version 1.0.0

    66 downloads

    A small function for combining GDI+ Paths with different combine modes (like combining Regions).
  24. Was getting some errors in my GDI+ project and wanted to know what they actually were, since I don't know what Error code 4 is.... So I looked it up on MSDN and put together a function that would give return a description of the error based on the code. UDF: ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_GetErrorByCode ; Description....: Get the error message for the @Extended error when a _GDIPlus_* function fails. ; Syntax.........: _GDIPlus_GetErrorByCode ( [$iGDIError = @Extended [, Const $iReturnType = 0] ]) ; Parameters.....: $iGDIError - The error to retrieve. Default is the last @Extended code. ; $iReturnType - What type the return should be. 0 will return a string, any other value returns an array. ; - [0] Holds what type of error. ; - [1] Holds the description. ; Return values..: Success - The error based on the code given in the formate requested. ; Failure - The Error code given was out of range, not a valid code. ; Author.........: InunoTaishou ; Remarks........: Regardless of the error code a return in the format requested will be returned. If the code is out of range ; it will return an OutOfRange error. ; Related........: GDIPlus ; Link...........: https://msdn.microsoft.com/en-us/library/windows/desktop/ms534175%28v=vs.85%29.aspx ; Example........: Yes ; =============================================================================================================================== Func _GDIPlus_GetErrorByCode($iGDIError = @extended, Const $iReturnType = 0) Local Static $aErrors[22][2] = [["OK", "Indicates that the method call was successful."], _ ["GenericError", "Indicates that there was an error on the method call, which is identified as something other than those defined by the other elements of this enumeration."], _ ["InvalidParameter", "Indicates that one of the arguments passed to the method was not valid."], _ ["OutOfMemory", "Indicates that the operating system is out of memory and could not allocate memory to process the method call. For an explanation of how constructors use the OutOfMemory status, see the Remarks section at the end of this topic."], _ ["ObjectBusy", "Indicates that one of the arguments specified in the API call is already in use in another thread."], _ ["InsufficientBuffer", "Indicates that a buffer specified as an argument in the API call is not large enough to hold the data to be received."], _ ["NotImplemented", "Indicates that the method is not implemented."], _ ["Win32Error", "Indicates that the method generated a Win32 error."], _ ["WrongState", "Indicates that the object is in an invalid state to satisfy the API call. For example, calling Pen::GetColor from a pen that is not a single, solid color results in a WrongState status."], _ ["Aborted", "Indicates that the method was aborted."], _ ["FileNotFound", "Indicates that the specified image file or metafile cannot be found."], _ ["ValueOverflow", "Indicates that the method performed an arithmetic operation that produced a numeric overflow."], _ ["AccessDenied", "Indicates that a write operation is not allowed on the specified file."], _ ["UnknownImageFormat", "Indicates that the specified image file format is not known."], _ ["FontFamilyNotFound", "Indicates that the specified font family cannot be found. Either the font family name is incorrect or the font family is not installed."], _ ["FontStyleNotFound", "Indicates that the specified style is not available for the specified font family."], _ ["NotTrueTypeFont", "Indicates that the font retrieved from an HDC or LOGFONT is not a TrueType font and cannot be used with GDI+."], _ ["UnsupportedGdiplusVersion", "Indicates that the version of GDI+ that is installed on the system is incompatible with the version with which the application was compiled."], _ ["GdiplusNotInitialized", "Indicates that the GDI+API is not in an initialized state. To function, all GDI+ objects require that GDI+ be in an initialized state. Initialize GDI+ by calling GdiplusStartup."], _ ["PropertyNotFound", "Indicates that the specified property does not exist in the image."], _ ["PropertyNotSupported", "Indicates that the specified property is not supported by the format of the image and, therefore, cannot be set."], _ ["ProfileNotFound", "Indicates that the color profile required to save an image in CMYK format was not found."]] Return (($iGDIError <= 21 And $iGDIError >= 0) ? _ ($iReturnType = 0 ? $aErrors[$iGDIError][0] & ": " & $aErrors[$iGDIError][1] : StringSplit($aErrors[$iGDIError][0] & "|" & $aErrors[$iGDIError][1], "|", 2)) : _ ($iReturnType = 0 ? SetError(10, 0, "OutOfRange: Error code " & $iGDIError & " is out of range") : SetError(10, $iGDIError, StringSplit("OutOfRange" & "|" & "Error code " & $iGDIError & " is out of range", "|", 2)))) EndFunc ;==>_GDIPlus_GetErrorByCode Example: #include <Array.au3> #include <GDIPlus.au3> #include <GUIEdit.au3> _GDIPlus_Startup() Global Const $GUI_EVENT_CLOSE = -3 Global $hGui = GUICreate("GDI+ Error by code", 800, 500) Global $hEdit = _GUICtrlEdit_Create($hGui, "", 10, 300, 780, 190) Global $hPic = GUICtrlGetHandle(GUICtrlCreatePic("", 0, 0, 800, 290)) Global $hDc = _WinAPI_GetWindowDC($hPic) Global $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDc) Global $hPen = _GDIPlus_PenCreate(0xFF00FFFF, 6) Global $hFormat = _GDIPlus_StringFormatCreate() Global $hFontFamily = _GDIPlus_FontFamilyCreate("Segoe UI") Global $hFont = _GDIPlus_FontCreate($hFontFamily, 24) Global $tLaytout = _GDIPlus_RectFCreate(0, 0, 800, 290) Global $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000) Global $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Image1.jpg") Global $hFile = FileOpen(@ScriptDir & "\Image2.jpg", 16 + 1) _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_StringFormatSetLineAlign($hFormat, 1) GUISetState(@SW_SHOW, $hGui) Debug("Error generating calls" & @CRLF) Debug("Fake Font Family for _GDIPlus_FontFamilyCreate:" & _GDIPlus_FontFamilyCreate("AutoIt Rulez") & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug("Wrong Parameter for _GDIPlus_GraphicsClear: " & _GDIPlus_GraphicsClear(0, 0xFFF0F0F0) & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug("Load image for a file that's already open _GDIPlus_ImageLoadFromFile: " & _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Image2.jpg") & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug("Save image over a file that's already open _GDIPlus_ImageSaveToFile: " & _GDIPlus_ImageSaveToFile($hImage, @ScriptDir & "\Image2.jpg") & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) _GDIPlus_ImageDispose($hImage) Debug("Dispose image that's already been disposed _GDIPlus_ImageDispose: " & _GDIPlus_ImageDispose($hImage) & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug(@CRLF & "Non error generating calls" & @CRLF) Debug("_GDIPlus_GraphicsClear: " & _GDIPlus_GraphicsClear($hGraphics, 0xFFF0F0F0) & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug("_GDIPlus_GraphicsDrawStringEx: " & _ _GDIPlus_GraphicsDrawStringEx($hGraphics, "This is a GDI+ UDF for getting the error message by @Extended code." & @CRLF & "Author: InunoTaishou", $hFont, $tLaytout, $hFormat, $hBrush) & _ @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF) Debug("_GDIPlus_GraphicsDrawRect: " & _GDIPlus_GraphicsDrawRect($hGraphics, 2, 2, 796, 286, $hPen) & @CRLF & @TAB & _GDIPlus_GetErrorByCode() & @CRLF & @CRLF) Debug("All available errors:" & @CRLF & @TAB) For $i = 0 to 21 Debug($i & ": " & _GDIPlus_GetErrorByCode($i) & @CRLF & @TAB) Next _ArrayDisplay(_GDIPlus_GetErrorByCode(22, 1), "Error 22") Do Until (GUIGetMsg() = $GUI_EVENT_CLOSE) _WinAPI_ReleaseDC($hPic, $hDc) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_PenDispose($hPen) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_FontFamilyDispose($hFontFamily) _GDIPlus_BrushDispose($hBrush) FileClose($hFile) GUIDelete($hGui) Exit 0 Func Debug(Const $sMsg = "") _GUICtrlEdit_AppendText($hEdit, $sMsg) EndFunc ;==>Debug ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_GetErrorByCode ; Description....: Get the error message for the @Extended error when a _GDIPlus_* function fails. ; Syntax.........: _GDIPlus_GetErrorByCode ( [$iGDIError = @Extended [, Const $iReturnType = 0] ]) ; Parameters.....: $iGDIError - The error to retrieve. Default is the last @Extended code. ; $iReturnType - What type the return should be. 0 will return a string, any other value returns an array. ; - [0] Holds what type of error. ; - [1] Holds the description. ; Return values..: Success - The error based on the code given in the formate requested. ; Failure - The Error code given was out of range, not a valid code. ; Author.........: InunoTaishou ; Remarks........: Regardless of the error code a return in the format requested will be returned. If the code is out of range ; it will return an OutOfRange error. ; Related........: GDIPlus ; Link...........: https://msdn.microsoft.com/en-us/library/windows/desktop/ms534175%28v=vs.85%29.aspx ; Example........: Yes ; =============================================================================================================================== Func _GDIPlus_GetErrorByCode($iGDIError = @extended, Const $iReturnType = 0) Local Static $aErrors[22][2] = [["OK", "Indicates that the method call was successful."], _ ["GenericError", "Indicates that there was an error on the method call, which is identified as something other than those defined by the other elements of this enumeration."], _ ["InvalidParameter", "Indicates that one of the arguments passed to the method was not valid."], _ ["OutOfMemory", "Indicates that the operating system is out of memory and could not allocate memory to process the method call. For an explanation of how constructors use the OutOfMemory status, see the Remarks section at the end of this topic."], _ ["ObjectBusy", "Indicates that one of the arguments specified in the API call is already in use in another thread."], _ ["InsufficientBuffer", "Indicates that a buffer specified as an argument in the API call is not large enough to hold the data to be received."], _ ["NotImplemented", "Indicates that the method is not implemented."], _ ["Win32Error", "Indicates that the method generated a Win32 error."], _ ["WrongState", "Indicates that the object is in an invalid state to satisfy the API call. For example, calling Pen::GetColor from a pen that is not a single, solid color results in a WrongState status."], _ ["Aborted", "Indicates that the method was aborted."], _ ["FileNotFound", "Indicates that the specified image file or metafile cannot be found."], _ ["ValueOverflow", "Indicates that the method performed an arithmetic operation that produced a numeric overflow."], _ ["AccessDenied", "Indicates that a write operation is not allowed on the specified file."], _ ["UnknownImageFormat", "Indicates that the specified image file format is not known."], _ ["FontFamilyNotFound", "Indicates that the specified font family cannot be found. Either the font family name is incorrect or the font family is not installed."], _ ["FontStyleNotFound", "Indicates that the specified style is not available for the specified font family."], _ ["NotTrueTypeFont", "Indicates that the font retrieved from an HDC or LOGFONT is not a TrueType font and cannot be used with GDI+."], _ ["UnsupportedGdiplusVersion", "Indicates that the version of GDI+ that is installed on the system is incompatible with the version with which the application was compiled."], _ ["GdiplusNotInitialized", "Indicates that the GDI+API is not in an initialized state. To function, all GDI+ objects require that GDI+ be in an initialized state. Initialize GDI+ by calling GdiplusStartup."], _ ["PropertyNotFound", "Indicates that the specified property does not exist in the image."], _ ["PropertyNotSupported", "Indicates that the specified property is not supported by the format of the image and, therefore, cannot be set."], _ ["ProfileNotFound", "Indicates that the color profile required to save an image in CMYK format was not found."]] Return (($iGDIError <= 21 And $iGDIError >= 0) ? _ ($iReturnType = 0 ? $aErrors[$iGDIError][0] & ": " & $aErrors[$iGDIError][1] : StringSplit($aErrors[$iGDIError][0] & "|" & $aErrors[$iGDIError][1], "|", 2)) : _ ($iReturnType = 0 ? SetError(10, 0, "OutOfRange: Error code " & $iGDIError & " is out of range") : SetError(10, $iGDIError, StringSplit("OutOfRange" & "|" & "Error code " & $iGDIError & " is out of range", "|", 2)))) EndFunc ;==>_GDIPlus_GetErrorByCode
  25. Here's a fun tool I put together. It's a Plasma sandbox. More features to come. This page was a useful resource for learning about this kind of Plasma implementation. Warning! Not Epileptic Friendly (probably)! Use at own Risk! I tried to curve the "default/initial" Plasma patterns so they aren't too erratic. That doesn't mean you can't alter the Plasmas to be more erratic. If you are sensitive to flashing colors and lights, use due caution. #Region - Includes and Globals #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <Misc.au3> ;#include <Array.au3> Opt("GUIOnEventMode", 1) Local $hDLL = DllOpen("user32.dll") Global Const $iWinMinWidth = @DesktopWidth * .25 Global Const $iWinMinHeight = @DesktopHeight * .25 Global $bIsPlaying = True, $bIsDrawing = False Global $hTimerFPS Global $iRows = 16, $iCols = 16 Global $iDisplayPlasma = 0, $iSelectPlasma = 0 Global $aPlasmaShapes[4] = ["($iX)", "($iY)", "($iX + $iY)", "Sqrt(($iX * $iX) + ($iY * $iY))"] ;~ Global $aPlasmas[4][7] = [[0, Random(6, 14, 1), 0, 0, 1, 0, 0], [1, Random(6, 14, 1), 0, 0, 0, 0, 0], [2, Random(8, 16,1 ), 0, 0, 1, 0, 0], [3, Random(8, 16, 1), 0, 0, Random(0,1,1), 0, 0]] ;Sine Wave | Spread | Position | Rotation | Spread Motion | Position Motion | Rotation Motion Global $aPlasmas[4][7] = [[0, Random(6, 14, 1), 0, 0, 0, 0, 0], [1, Random(6, 14, 1), 0, 0, 0, 0, 0], [2, Random(8, 16,1 ), 0, 0, 0, 0, 0], [3, Random(8, 16, 1), 0, 0, 0, 0, 0]] ;Sine Wave | Spread | Position | Rotation | Spread Motion | Position Motion | Rotation Motion Global $aPallete[256] Global $aPalleteSettings[3][3] = [[0, 128, 128], [-1.75, 128, 128], [1.75, 128, 128]] ;Position | Spread | Value Global $aPalleteDefaults = $aPalleteSettings Global $iPalleteShift = 0, $bPalleteShift = True, $iPalletShiftDirection = -5 #EndRegion - Includes and Globals #Region - Main GUI Global $aGUI[1] = ["id|hWnd"] Global Enum $hGUI = 1, $idMnuFile, $idMnuFileExit, $idMnuFilePlay, $idMnuOptions, $idMnuOptionsPallete, $idMnuOptionsPalleteShift, $idMnuOptionsEditor, $idMnuOptionsZoom, $idMnuOptionsZoomIn, $idMnuOptionsZoomOut, $iGUILast ReDim $aGUI[$iGUILast] Global Const $sVersion = "0.1" Global Const $sTitle = "Plasma_kIt - Version " & $sVersion $aGUI[$hGUI] = GUICreate($sTitle, $iWinMinWidth, $iWinMinHeight, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX)) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $aGUI[$idMnuFile] = GUICtrlCreateMenu("&File") $aGUI[$idMnuFilePlay] = GUICtrlCreateMenuItem("&Pause", $aGUI[$idMnuFile]) GUICtrlSetOnEvent(-1, "_PlayToggle") $aGUI[$idMnuFileExit] = GUICtrlCreateMenuItem("E&xit", $aGUI[$idMnuFile]) GUICtrlSetOnEvent(-1, "_Exit") $aGUI[$idMnuOptions] = GUICtrlCreateMenu("&Options") $aGUI[$idMnuOptionsPallete] = GUICtrlCreateMenuItem("Pallete Mixer", $aGUI[$idMnuOptions]) GUICtrlSetOnEvent(-1, "_GUIPallete_Show") $aGUI[$idMnuOptionsPalleteShift] = GUICtrlCreateMenuItem("Pallete Shift", $aGUI[$idMnuOptions]) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetOnEvent(-1, "_GUIPallete_ShiftToggle") $aGUI[$idMnuOptionsEditor] = GUICtrlCreateMenuItem("Plasma Editor", $aGUI[$idMnuOptions]) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_Show") $aGUI[$idMnuOptionsZoom] = GUICtrlCreateMenu("Zoom", $aGUI[$idMnuOptions]) $aGUI[$idMnuOptionsZoomIn] = GUICtrlCreateMenuItem("Zoom In" & @TAB & "+", $aGUI[$idMnuOptionsZoom]) GUICtrlSetOnEvent(-1, "_Zoom") $aGUI[$idMnuOptionsZoomOut] = GUICtrlCreateMenuItem("Zoom Out" & @TAB & "-", $aGUI[$idMnuOptionsZoom]) GUICtrlSetOnEvent(-1, "_Zoom") _GDIPlus_Startup() ;Start GDI+ UDF Global Const $hDC = _WinAPI_GetDC($aGUI[$hGUI]) Global Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, @DesktopWidth, @DesktopHeight) Global Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Global Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) $hBackbuffer = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) ;_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) $hBrush = _GDIPlus_BrushCreateSolid(0x00000000) ;Brush for Coloring/Painting LED Pixels Local $aAccelKeys[5][2] = [["{+}", $aGUI[$idMnuOptionsZoomIn]], ["{NUMPADADD}", $aGUI[$idMnuOptionsZoomIn]], ["{-}", $aGUI[$idMnuOptionsZoomOut]], ["{NUMPADSUB}", $aGUI[$idMnuOptionsZoomOut]], ["{pause}", $aGUI[$idMnuFilePlay]]] GUISetAccelerators($aAccelKeys) #EndRegion - Main GUI #Region - Pallete Mixer GUI Global $aGUIPallete[1] = ["id|hWnd"] Global Enum $hGUIPallete = 1, $idSliderRPosition, $idSliderRValue, $idSliderRSpread, $idSliderGPosition, $idSliderGValue, _ $idSliderGSpread, $idSliderBPosition, $idSliderBValue, $idSliderBSpread, $idBtnResetPallete, $iGUIPalleteLast ReDim $aGUIPallete[$iGUIPalleteLast] $aGUIPallete[$hGUIPallete] = GUICreate("Pallete Mixer", 338, 260, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIPallete_Hide") $aGUIPallete[$idSliderRPosition] = GUICtrlCreateSlider(8, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderRValue] = GUICtrlCreateSlider(48, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderRSpread] = GUICtrlCreateSlider(8, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGPosition] = GUICtrlCreateSlider(120, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGValue] = GUICtrlCreateSlider(160, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGSpread] = GUICtrlCreateSlider(120, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderBPosition] = GUICtrlCreateSlider(232, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") GUICtrlSetData(-1, 9) $aGUIPallete[$idSliderBValue] = GUICtrlCreateSlider(272, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderBSpread] = GUICtrlCreateSlider(232, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) GUICtrlSetData(-1, 11) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") GUICtrlCreateLabel("RED", 46, 200, 30, 20) GUICtrlCreateLabel("GREEN", 150, 200, 38, 20) GUICtrlCreateLabel("BLUE", 268, 200, 30, 20) $aGUIPallete[$idBtnResetPallete] = GUICtrlCreateButton("Reset", 136, 236, 67, 17) GUICtrlSetOnEvent(-1, "_GUIPallete_Reset") GUISetAccelerators($aAccelKeys) Global Const $hDCPallete = _WinAPI_GetDC($aGUIPallete[$hGUIPallete]) Global Const $hHBitmapPallete = _WinAPI_CreateCompatibleBitmap($hDCPallete, 320, 40) Global Const $hDC_backbufferPallete = _WinAPI_CreateCompatibleDC($hDCPallete) Global Const $DC_objPallete = _WinAPI_SelectObject($hDC_backbufferPallete, $hHBitmapPallete) Global Const $hBackbufferPallete = _GDIPlus_GraphicsCreateFromHDC($hDC_backbufferPallete) Global $hBrushPallete = _GDIPlus_BrushCreateSolid(0xFF000000) ;~ _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) _GUIPallete_Update() _GUIPallete_Reset() #EndRegion - Pallete Mixer GUI #Region - Plasma Editor GUI Global $aGUIPlasmaEditor[1] = ["id|hWnd"] Global Enum $hGUIPlasmaEditor = 1, $idCmbPlasmaSelector, $idCmbPlasmaDisplay, $idBtnPlasmaAdd, $idBtnPlasmaDel, $idCmbPlasmaShape, $idSliderPlasmaSpread, $idCmbPlasmaSpread, $idSliderPlasmaRotation, $idCmbPlasmaRotation, $idSliderPlasmaPosition, $idCmbPlasmaPosition, $iGUIPlasmaEditorLast ReDim $aGUIPlasmaEditor[$iGUIPlasmaEditorLast] $aGUIPlasmaEditor[$hGUIPlasmaEditor] = GUICreate("Plasma Editor", 419, 323, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIPlasmaEditor_Hide") GUICtrlCreateLabel("Display", 16, 8, 95, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idCmbPlasmaDisplay] = GUICtrlCreateCombo("", 16, 24, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "All Combined|Selected Plasma", "All Combined") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaDisplay") GUICtrlCreateLabel("Selected Plasma", 24, 96, 120, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idBtnPlasmaAdd] = GUICtrlCreateButton("Add Plasma", 160, 16, 113, 33) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaAddRem") GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idBtnPlasmaDel] = GUICtrlCreateButton("Remove Plasma", 296, 16, 113, 33) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaAddRem") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateGroup("Plasma Controls", 8, 64, 401, 249) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idCmbPlasmaSelector] = GUICtrlCreateCombo("", 24, 112, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Plasma #1|Plasma #2|Plasma #3|Plasma #4", "Plasma #1") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSelect") GUICtrlCreateLabel("Shape", 174, 96, 35, 17) $aGUIPlasmaEditor[$idCmbPlasmaShape] = GUICtrlCreateCombo("", 174, 112, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Horizontal|Vertical|Diagonal|Circular", "Horizontal") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetShape") GUICtrlCreateLabel("Spread", 24, 145, 38, 17) $aGUIPlasmaEditor[$idSliderPlasmaSpread] = GUICtrlCreateSlider(16, 160, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetLimit(-1, 255, 5) $aGUIPlasmaEditor[$idCmbPlasmaSpread] = GUICtrlCreateCombo("", 280, 160, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetSpread") GUICtrlCreateLabel("Rotation", 24, 201, 44, 17) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idSliderPlasmaRotation] = GUICtrlCreateSlider(16, 216, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idCmbPlasmaRotation] = GUICtrlCreateCombo("", 280, 216, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetRotation") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateLabel("Position", 24, 257, 41, 17) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idSliderPlasmaPosition] = GUICtrlCreateSlider(16, 272, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetLimit(-1, 127, -127) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idCmbPlasmaPosition] = GUICtrlCreateCombo("", 280, 272, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetPosition") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateGroup("", -99, -99, 1, 1) _GUIPlasmaEditor_PlasmaSettingsLoad($iSelectPlasma) ;_GUIPlasmaEditor_PlasmaControlsLock() GUISetAccelerators($aAccelKeys) #EndRegion - Plasma Editor GUI #Region - Initialization and Main Loop GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY") GUISetState(@SW_SHOW, $aGUI[$hGUI]) While 1 If $bIsPlaying And Not $bIsDrawing Then _DrawScreen(_RenderPlasma()) Sleep(10) WEnd #EndRegion - Initialization and Main Loop #Region - Main GUI Functions Func _DrawScreen($aPixels) ;If Function called while Drawing Return 0 If $bIsDrawing Then Return 0 ;Set Drawing Status Indictaor $bIsDrawing = True ;Create Timer for Drawing Performance/Duration Local $hTimer = TimerInit() ;Erase Bitmap Graphic _GDIPlus_GraphicsClear($hBackbuffer, 0xFFFFFFFF) ;Capture Client Window Size $aWinClientSize = WinGetClientSize($aGUI[$hGUI]) ;Setup Variables Local $iPixelIndex = 0 Local $iCol = $iCols Local $iRow = $iRows Local $iWidth = $aWinClientSize[0] / $iCol Local $iHeight = $aWinClientSize[1] / $iRow ;Draw Pixel Grid (Top-Left to Bottom Right) For $iY = 0 To $iRow - 1 For $iX = 0 To $iCol - 1 Local $dARGB = $aPixels[$iPixelIndex] ;Set Brush Color _GDIPlus_BrushSetSolidColor($hBrush, $dARGB) ;Draw "Pixel" _GDIPlus_GraphicsFillRect($hBackbuffer, $iX * $iWidth, $iY * $iHeight, $iWidth, $iHeight, $hBrush) ;Increment Pixel Counter $iPixelIndex += 1 If $iPixelIndex = UBound($aPixels) Then $iPixelIndex = 0 Next Next ;Draw Bitmap to Screen _WinAPI_BitBlt($hDC, 0, 0, $aWinClientSize[0], $aWinClientSize[1], $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI ;FPS Counter $hTimer = TimerDiff($hTimer) ;~ ConsoleWrite("Whole Process time: " & Round($hTimer / 1000, 3) & @CRLF) If $bIsPlaying Then If TimerDiff($hTimerFPS) >= 998 Then Local $iFPS = Round(1000 / $hTimer, 2) WinSetTitle($aGUI[$hGUI], "", $sTitle & " (" & $iFPS & " FPS) " & $iCols & " x " & $iRows) $hTimerFPS = TimerInit() EndIf Else ;Show FPS in Window Title WinSetTitle($aGUI[$hGUI], "", $sTitle) EndIf $bIsDrawing = False EndFunc ;==>_DrawScreen Func _Exit() ; Clean up resources _GUIPallete_Exit() GUIDelete($aGUIPallete[$hGUIPallete]) GUIDelete($aGUIPlasmaEditor[$hGUIPlasmaEditor]) GUIDelete($aGUI[$hGUI]) _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hBackbuffer) _WinAPI_SelectObject($hDC, $DC_obj) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) _GDIPlus_Shutdown() DllClose($hDLL) Exit EndFunc ;==>_Exit Func _PlayToggle() ;Toggle Play State If Not $bIsPlaying Then ;Start Playing $bIsPlaying = True $hTimerFPS = TimerInit() GUICtrlSetData($aGUI[$idMnuFilePlay], "&Pause") Else ;Stop Playing $bIsPlaying = False GUICtrlSetData($aGUI[$idMnuFilePlay], "&Play") EndIf EndFunc ;==>_PlayToggle Func _RenderPlasma() ;Setup Variables Local $aWorkPallete = $aPallete Local $iRow = $iRows Local $iCol = $iCols Local $iGridSize = $iRow * $iCol Local $aPixels[$iGridSize] Local $iIndex = 0 Local $iPlasma = 0 Local $iPlasmas Local $iDisplayPlasmaNumber = $iDisplayPlasma Local $iSine, $iSpread, $iPosition ;Loop Through Pixel Grid and Calculate Plasma(s) For $iY = 0 To $iRow - 1 For $iX = 0 To $iCol - 1 $iPlasmas = 0 If Not $iDisplayPlasmaNumber Then For $iZ = 0 To UBound($aPlasmas) - 1 $iSine = $aPlasmas[$iZ][0] ;Spread Motions If $aPlasmas[$iZ][4] Then $aPlasmas[$iZ][4] += ($aPlasmas[$iZ][1] * 0.00001125) $iSpread = -7*Sin($aPlasmas[$iZ][4])+9 Else $iSpread = $aPlasmas[$iZ][1] EndIf $iPosition = $aPlasmas[$iZ][2] $iPlasma = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$iSine] & " / " & $iSpread & "))") $iPlasmas += $iPlasma Next Else $iSine = $aPlasmas[$iDisplayPlasmaNumber - 1][0] ;Spread Motions If $aPlasmas[$iDisplayPlasmaNumber - 1][4] Then $aPlasmas[$iDisplayPlasmaNumber - 1][4] += ($aPlasmas[$iDisplayPlasmaNumber - 1][1] * 0.005) $iSpread = Sin($aPlasmas[$iDisplayPlasmaNumber - 1][4])/2 Else $iSpread = $aPlasmas[$iDisplayPlasmaNumber - 1][1] EndIf $iPosition = $aPlasmas[$iDisplayPlasmaNumber - 1][2] ;$iPlasmas = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$aPlasmas[$iDisplayPlasmaNumber - 1][0]] & " / " & $aPlasmas[$iDisplayPlasmaNumber - 1][1] & ") - " & $aPlasmas[$iDisplayPlasmaNumber - 1][2] & ")") $iPlasmas = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$iSine] & " / " & $iSpread & "))") EndIf $iPlasma = Int($iPlasmas) ;Account for Pallete Shift $iPlasma += $iPalleteShift ;Wrap Pixel Pallete Color If $iPlasma >= 256 Then Do $iPlasma -= 256 Until $iPlasma < 256 EndIf If $iPlasma <= -1 Then Do $iPlasma += 256 Until $iPlasma > -1 EndIf ;Set Pixel Color value from Pallete $aPixels[$iIndex] = $aWorkPallete[$iPlasma] ;Increment Pixel Index Counter $iIndex += 1 If $iIndex = $iGridSize Then $iIndex = 0 Next Next ;Pallete Shift Logic If $bPalleteShift Then $iPalleteShift += $iPalletShiftDirection If $iPalleteShift >= 256 Then $iPalleteShift = 0 If $iPalleteShift <= -1 Then $iPalleteShift = 255 EndIf Return $aPixels EndFunc ;==>_RenderPlasma Func _WM_GETMINMAXINFO($hwnd, $Msg, $wParam, $lParam) ;Only Control Size of Main GUI If $hwnd <> $aGUI[$hGUI] Then Return Default $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($tagMaxinfo, 7, $iWinMinWidth) ; min X DllStructSetData($tagMaxinfo, 8, $iWinMinHeight) ; min Y Return 0 EndFunc ;==>_WM_GETMINMAXINFO Func _WM_NOTIFY($hwnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") ;Local $tInfo If Not _IsPressed("01", $hDLL) Then Return Default Switch $iIDFrom Case $aGUIPallete[$idSliderRPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderRValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderRSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaSpread] Switch $iCode Case $NM_CUSTOMDRAW $aPlasmas[$iSelectPlasma][1] = 0.2 * GUICtrlRead($iIDFrom) EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaRotation] Switch $iCode Case $NM_CUSTOMDRAW EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaPosition] Switch $iCode Case $NM_CUSTOMDRAW $aPlasmas[$iSelectPlasma - 1][2] = GUICtrlRead($iIDFrom) EndSwitch Return 0 EndSwitch Return 0 EndFunc ;==>_WM_NOTIFY Func _Zoom() Local $bPlaying = $bIsPlaying If $bPlaying Then $bIsPlaying = False Local $iCtrlID = @GUI_CtrlId Switch $iCtrlID Case $aGUI[$idMnuOptionsZoomOut] $iCols += 2 $iRows += 2 If $iCols >= 4 * 8 Then $iCols = 4 * 8 If $iRows >= 4 * 8 Then $iRows = 4 * 8 Case $aGUI[$idMnuOptionsZoomIn] $iCols -= 2 $iRows -= 2 If $iCols <= 4 Then $iCols = 4 If $iRows <= 4 Then $iRows = 4 EndSwitch If $bPlaying Then $bIsPlaying = $bPlaying EndFunc ;==>_Zoom #EndRegion - Main GUI Functions #Region - Pallete Mixer GUI Functions Func _GUIPallete_ColorSet($iColor, $iValue = -1, $iPosition = "", $iSpread = "") If $iValue >= 0 Then $aPalleteSettings[$iColor][2] = (128.0 - $iValue) If $iPosition Then $aPalleteSettings[$iColor][0] = (0.25 * $iPosition) If $iSpread Then $aPalleteSettings[$iColor][1] = ($iSpread ^ 2) Return _GUIPallete_Update() EndFunc ;==>_GUIPallete_ColorSet Func _GUIPallete_Draw() ;Draw Color Pallete in Palette Mixer GUI _GDIPlus_GraphicsClear($hBackbufferPallete, 0xFF000000) Local $iX = 0 For $iColor = 1 To 256 Local $dARGB = $aPallete[$iColor - 1] ;Set Brush Color _GDIPlus_BrushSetSolidColor($hBrushPallete, $dARGB) ;Draw Color Bar to Bitmap _GDIPlus_GraphicsFillRect($hBackbufferPallete, $iX, 0, 320 / 256, 40, $hBrushPallete) $iX += (320 / 256) Next ;Write Bitmap to Screen Return _WinAPI_BitBlt($hDCPallete, 8, 8, 320, 40, $hDC_backbufferPallete, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI EndFunc ;==>_GUIPallete_Draw Func _GUIPallete_Exit() ; Clean up resources GUIDelete() _GDIPlus_BrushDispose($hBrushPallete) _GDIPlus_GraphicsDispose($hBackbufferPallete) _WinAPI_SelectObject($hDCPallete, $DC_objPallete) _WinAPI_DeleteObject($hHBitmapPallete) _WinAPI_ReleaseDC($aGUIPallete[$hGUIPallete], $hDCPallete) Return 1 EndFunc ;==>_GUIPallete_Exit Func _GUIPallete_Hide() Return GUISetState(@SW_HIDE, $aGUIPallete[$hGUIPallete]) EndFunc ;==>_GUIPallete_Hide Func _GUIPallete_Reset() $aPalleteSettings = $aPalleteDefaults GUICtrlSetData($aGUIPallete[$idSliderRPosition], $aPalleteSettings[0][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderRValue], 128 - $aPalleteSettings[0][2]) GUICtrlSetData($aGUIPallete[$idSliderRSpread], Sqrt($aPalleteSettings[0][1])) GUICtrlSetData($aGUIPallete[$idSliderGPosition], $aPalleteSettings[1][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderGValue], 128 - $aPalleteSettings[1][2]) GUICtrlSetData($aGUIPallete[$idSliderGSpread], Sqrt($aPalleteSettings[1][1])) GUICtrlSetData($aGUIPallete[$idSliderBPosition], $aPalleteSettings[2][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderBValue], 128 - $aPalleteSettings[2][2]) GUICtrlSetData($aGUIPallete[$idSliderBSpread], Sqrt($aPalleteSettings[2][1])) Return _GUIPallete_Update() EndFunc ;==>_GUIPallete_Reset Func _GUIPallete_ShiftToggle() ;Toggle Pallete Shift Local $iCtrlState = GUICtrlRead(@GUI_CtrlId) If BitAND($iCtrlState, $GUI_CHECKED) Then ;Disable PalleteShift $bPalleteShift = False GUICtrlSetState(@GUI_CtrlId, $GUI_UNCHECKED) Else ;Enable PalleteShift $bPalleteShift = True GUICtrlSetState(@GUI_CtrlId, $GUI_CHECKED) EndIf EndFunc ;==>_GUIPallete_ShiftToggle Func _GUIPallete_Show() GUISetState(@SW_SHOW, $aGUIPallete[$hGUIPallete]) _GUIPallete_Draw() EndFunc ;==>_GUIPallete_Show Func _GUIPallete_Update() ;Re-Calculate Work Color Pallete For $iStep = 0 To 255 Local $iR = Int($aPalleteSettings[0][2] + ($aPalleteSettings[0][2] * Sin((3.1415 * $iStep / $aPalleteSettings[0][1]) - $aPalleteSettings[0][0]))) Local $iG = Int($aPalleteSettings[1][2] + ($aPalleteSettings[1][2] * Sin((3.1415 * $iStep / $aPalleteSettings[1][1]) - $aPalleteSettings[1][0]))) Local $iB = Int($aPalleteSettings[2][2] + ($aPalleteSettings[2][2] * Sin((3.1415 * $iStep / $aPalleteSettings[2][1]) - $aPalleteSettings[2][0]))) $aPallete[$iStep] = "0xFF" & Hex($iR, 2) & Hex($iG, 2) & Hex($iB, 2) Next Return _GUIPallete_Draw() EndFunc ;==>_GUIPallete_Update #EndRegion - Pallete Mixer GUI Functions #Region - Plasma Editor GUI Functions Func _GUIPlasmaEditor_Hide() GUISetState(@SW_HIDE, $aGUIPlasmaEditor[$hGUIPlasmaEditor]) EndFunc ;==>_GUIPlasmaEditor_Hide Func _GUIPlasmaEditor_PlasmaAddRem() EndFunc ;==>_GUIPlasmaEditor_PlasmaAddRem Func _GUIPlasmaEditor_PlasmaDisplay() Local $sSelection = GUICtrlRead($aGUIPlasmaEditor[$idCmbPlasmaDisplay]) If $sSelection = "All Combined" Then $iDisplayPlasma = 0 Else $iDisplayPlasma = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSelector])+1 EndIf Return $iDisplayPlasma EndFunc ;==>_GUIPlasmaEditor_PlasmaDisplay Func _GUIPlasmaEditor_PlasmaSelect() Local $sSelection = GUICtrlRead($aGUIPlasmaEditor[$idCmbPlasmaSelector]) $iSelectPlasma = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSelector]) _GUIPlasmaEditor_PlasmaDisplay() Return _GUIPlasmaEditor_PlasmaSettingsLoad($iSelectPlasma) EndFunc ;==>_GUIPlasmaEditor_PlasmaSelect Func _GUIPlasmaEditor_PlasmaSetPosition() EndFunc ;==>_GUIPlasmaEditor_PlasmaSetPosition Func _GUIPlasmaEditor_PlasmaSetRotation() EndFunc ;==>_GUIPlasmaEditor_PlasmaSetRotation Func _GUIPlasmaEditor_PlasmaSetShape() $aPlasmas[$iSelectPlasma][0] = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaShape]) EndFunc ;==>_GUIPlasmaEditor_PlasmaSetShape Func _GUIPlasmaEditor_PlasmaSetSpread() $aPlasmas[$iSelectPlasma][4] = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread]) EndFunc ;==>_GUIPlasmaEditor_PlasmaSetSpread Func _GUIPlasmaEditor_PlasmaSettingsLoad(ByRef $iPlasma) GUICtrlSetData($aGUIPlasmaEditor[$idSliderPlasmaSpread],$aPlasmas[$iPlasma][1]/0.2) _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaShape],$aPlasmas[$iPlasma][0]) If $aPlasmas[$iPlasma][4] Then _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread],1) Else _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread],0) EndIf Return 1 EndFunc ;==>_GUIPlasmaEditor_PlasmaSettingsLoad Func _GUIPlasmaEditor_Show() GUISetState(@SW_SHOW, $aGUIPlasmaEditor[$hGUIPlasmaEditor]) EndFunc ;==>_GUIPlasmaEditor_Show #EndRegion - Plasma Editor GUI Functions edit: Minor tweaks