wakillon Posted May 31, 2016 Share Posted May 31, 2016 (edited) An other tool for AutoIt Coders : Gif2Avi permit to convert an animated Gif to an Avi file for use with the (rarely used) GUICtrlCreateAvi function. Use an Avi file as loader or animation in a script (see StringFinder for example) is easier than use an animated gif. With this little tool you can also : _ Set the AVI file dimensions ( height will follow width changes for preserve ratio W/H ) _ Change FPS (frames per second) _ Try an other background color ( used in _GDIPlus_BitmapCreateHBITMAPFromBitmap function) _ Crop width and height (From the original dimension) Thanks to monoceres, Prog@ndy and UEZ for AVI functions. Source and compiled Version are available in the Download Section. May be the "GUICtrlCreateAvi" function will be a bit more used ! Some Links for find or create loaders/spinners preloaders.net loading.io dribbble.com chimply.com tools.bit-hive.com Edited June 3, 2016 by wakillon coffeeturtle and UEZ 2 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 31, 2016 Share Posted May 31, 2016 This might be of interest: https://autoit.de/index.php/Thread/84289-AVI-Compose-Video-UDF/ Drag'n'drop doesn't work for me. Conversation works fine. Any chance to set the compression? Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 31, 2016 Author Share Posted May 31, 2016 42 minutes ago, UEZ said: This might be of interest: https://autoit.de/index.php/Thread/84289-AVI-Compose-Video-UDF/ Drag'n'drop doesn't work for me. Conversation works fine. Any chance to set the compression? eukalyptus example is great, thanks ! May be you need to be admin for use Drag'n'drop ? Conversion or Conversation For the compression unfortunatelly GuiCtrlCreateAvi (after many tries with other formats) only support uncompressed "DIB " format (Microsoft Device Independent Bitmap) The only interest is that no codec is required. Synapsee 1 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 31, 2016 Share Posted May 31, 2016 The compiled exe is not working with drag'n'drop but running it from SciTE works. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 31, 2016 Author Share Posted May 31, 2016 1 minute ago, UEZ said: The compiled exe is not working with drag'n'drop but running it from SciTE works. Strange ! It works fine for me... Compile it yourself and retry... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 31, 2016 Share Posted May 31, 2016 I wrote this example some time ago which uses a built-in codec for compression: expandcollapse popup;captures whole desktop and saves it as an AVI file using Microsoft Video 1 codec #include <ScreenCapture.au3> #region structs and constans Global Const $OF_CREATE = 0x00001000 Global Const $AVIIF_KEYFRAME = 0x00000010 Global Const $ICMF_CHOOSE_KEYFRAME = 1, $ICMF_CHOOSE_DATARATE = 2 Global Const $AVIERR_UNSUPPORTED = 0x80044065 Global Const $AVIERR_BADPARAM = 0x80044066 Global Const $AVIERR_MEMORY = 0x80044067 Global Const $AVIERR_NOCOMPRESSOR = 0x80044071 Global Const $AVIERR_CANTCOMPRESS = 0x80044075 Global Const $AVIERR_ERROR = 0x800440C7 Global Const $AVIERR_OK = 0 Global $Avi32_Dll Global Const $ICINFO = _ "DWORD dwSize;DWORD fccType;DWORD fccHandler;DWORD dwFlags;DWORD dwVersion;DWORD dwVersionICM;" & _ "WCHAR szName[16];WCHAR szDescription[128];WCHAR szDriver[128];" ;http://msdn.microsoft.com/en-us/library/dd183374(v=vs.85).aspx Global Const $BITMAPFILEHEADER = "WORD bfType;DWORD bfSize;WORD bfReserved1;WORD bfReserved2;DWORD bfOffBits;" ;~ Global Const $BITMAPFILEHEADER = "align 2;char magic[2];int size;short res1;short res2;ptr offset;" ;http://msdn.microsoft.com/en-us/library/dd183376(v=vs.85).aspx Global Const $BITMAPINFOHEADER = _ "dword biSize;long biWidth;long biHeight;short biPlanes;short biBitCount;dword biCompression;" & _ "dword biSizeImage;long biXPelsPerMeter;long biYPelsPerMeter;dword biClrUsed;dword biClrImportant;" ;http://msdn.microsoft.com/en-us/library/ms899423.aspx Global Const $AVISTREAMINFO = _ "dword fccType;dword fccHandler;dword dwFlags;dword dwCaps;short wPriority;short wLanguage;dword dwScale;" & _ "dword dwRate;dword dwStart;dword dwLength;dword dwInitialFrames;dword dwSuggestedBufferSize;dword dwQuality;" & _ "dword dwSampleSize;int rleft;int rtop;int rright;int rbottom;dword dwEditCount;dword dwFormatChangeCount;wchar[64];" ;http://msdn.microsoft.com/en-us/library/dd756791(v=VS.85).aspx Global Const $AVICOMPRESSOPTIONS = _ "DWORD fccType;DWORD fccHandler;DWORD dwKeyFrameEvery;DWORD dwQuality;DWORD dwBytesPerSecond;" & _ "DWORD dwFlags;PTR lpFormat;DWORD cbFormat;PTR lpParms;DWORD cbParms;DWORD dwInterleaveEvery;" #endregion Global $rec_duration = 15 Global $fps = 5 Global $iW = @DesktopWidth, $iH = @DesktopHeight _StartAviLibrary() FileDelete(@ScriptDir & "\Test.avi") Global $aAVI = _CreateAvi(@ScriptDir & "\Test.avi", $fps, $iW - 1, $iH - 1) Global $fSleep = 1000 / $fps, $t, $td Global $total_FPS = $rec_duration * $fps, $fps_c = 1 Global $k32_dll = DllOpen("kernel32.dll") Do $fTimer = TimerInit() $hBmp = _ScreenCapture_Capture("", 0, 0, $iW - 1, $iW - 1) _AddHBitmapToAvi($aAVI, $hBmp) _WinAPI_DeleteObject($hBmp) $fps_c += 1 $td = $fSleep - TimerDiff($fTimer) If $td > 0 Then DllCall($k32_dll, "none", "Sleep", "dword", $td) EndIf If $fps_c > $total_FPS Then ExitLoop EndIf Until False _CloseAvi($aAVI) _StopAviLibrary() ConsoleWrite("Done!" & @LF) DllClose($k32_dll) Exit #region AVIWriter UDF ;http://www.fourcc.org/codecs.php Func _Create_mmioFOURCC($FOURCC) ;coded by UEZ If StringLen($FOURCC) <> 4 Then Return SetError(1, 0, 0) Local $aFOURCC = StringSplit($FOURCC, "", 2) Return BitOR(Asc($aFOURCC[0]), BitShift(Asc($aFOURCC[1]), -8), BitShift(Asc($aFOURCC[2]), -16), BitShift(Asc($aFOURCC[3]), -24)) EndFunc ;==>_Create_mmioFOURCC Func _DecodeFOURCC($iFOURCC);coded by UEZ If Not IsInt($iFOURCC) Then Return SetError(1, 0, 0) Return Chr(BitAND($iFOURCC, 0xFF)) & Chr(BitShift(BitAND(0x0000FF00, $iFOURCC), 8)) & Chr(BitShift(BitAND(0x00FF0000, $iFOURCC), 16)) & Chr(BitShift($iFOURCC, 24)) EndFunc ;==>_DecodeFOURCC ;monoceres, Prog@ndy, UEZ Func _CreateAvi($sFilename, $FrameRate, $Width, $Height, $BitCount = 24, $mmioFOURCC = "MSVC", $iQuality = 3333, $iKeyFrameEvery = 10) ;$iQuality from -1 to 10000 Local $RetArr[6] ;avi file handle, compressed stream handle, bitmap count, BitmapInfoheader, Stride, stream handle Local $aRet, $pFile, $tASI, $tACO, $pStream, $psCompressed Local $stride = BitAND(($Width * ($BitCount / 8) + 3), BitNOT(3)) Local $tBI = DllStructCreate($BITMAPINFOHEADER) DllStructSetData($tBI, "biSize", DllStructGetSize($tBI)) DllStructSetData($tBI, "biWidth", $Width) DllStructSetData($tBI, "biHeight", $Height) DllStructSetData($tBI, "biPlanes", 1) DllStructSetData($tBI, "biBitCount", $BitCount) DllStructSetData($tBI, "biSizeImage", $stride * $Height) $tASI = DllStructCreate($AVISTREAMINFO) ;https://msdn.microsoft.com/en-us/library/aa919806.aspx DllStructSetData($tASI, "fccType", _Create_mmioFOURCC("vids")) DllStructSetData($tASI, "fccHandler", _Create_mmioFOURCC($mmioFOURCC)) DllStructSetData($tASI, "dwScale", 1) DllStructSetData($tASI, "dwRate", $FrameRate) DllStructSetData($tASI, "dwQuality", $iQuality) ;Quality is represented as a number between 0 and 10,000. For compressed data, this typically represents the value of the quality parameter passed to the compression software. If set to -1, drivers use the default quality value. DllStructSetData($tASI, "dwSuggestedBufferSize", $stride * $Height) DllStructSetData($tASI, "rright", $Width) DllStructSetData($tASI, "rbottom", $Height) $tParms = DllStructCreate($ICINFO) DllCall("Msvfw32.dll", "BOOL", "ICInfo", "DWORD", _Create_mmioFOURCC("vids"), "DWORD", _Create_mmioFOURCC($mmioFOURCC), "ptr", DllStructGetPtr($tParms)) $tACO = DllStructCreate($AVICOMPRESSOPTIONS) ;https://msdn.microsoft.com/en-us/library/windows/desktop/dd742972%28v=vs.85%29.aspx DllStructSetData($tACO, "fccType", _Create_mmioFOURCC("vids")) DllStructSetData($tACO, "fccHandler", _Create_mmioFOURCC($mmioFOURCC)) DllStructSetData($tACO, "dwKeyFrameEvery", $iKeyFrameEvery) DllStructSetData($tACO, "dwQuality", $iQuality) DllStructSetData($tACO, "dwBytesPerSecond", 0) DllStructSetData($tACO, "dwFlags", 8) DllStructSetData($tACO, "lpFormat", 0) DllStructSetData($tACO, "cbFormat", 0) DllStructSetData($tACO, "lpParms", DllStructGetPtr($tParms)) DllStructSetData($tACO, "cbParms", DllStructGetSize($tParms)) DllStructSetData($tACO, "dwInterleaveEvery", 0) ;~ $tACO = DllStructCreate($AVICOMPRESSOPTIONS) ;~ DllStructSetData($tACO, "fccType", _Create_mmioFOURCC("vids")) ;~ DllStructSetData($tACO, "fccHandler", _Create_mmioFOURCC($mmioFOURCC)) ;~ DllStructSetData($tACO, "dwKeyFrameEvery", $iKeyFrameEvery) $aRet = DllCall($Avi32_Dll, "int", "AVIFileOpenW", "ptr*", 0, "wstr", $sFilename, "uint", $OF_CREATE, "ptr", 0) $pFile = $aRet[1] $aRet = DllCall($Avi32_Dll, "int", "AVIFileCreateStream", "ptr", $pFile, "ptr*", 0, "ptr", DllStructGetPtr($tASI)) $pStream = $aRet[2] ;~ $aRet = DllCall($Avi32_Dll, "int_ptr", "AVISaveOptions", "hwnd", 0, "uint", BitOR($ICMF_CHOOSE_DATARATE, $ICMF_CHOOSE_KEYFRAME), "int", 1, "ptr*", $pStream, "ptr*", DllStructGetPtr($tACO)) ;~ If $aRet[0] <> 1 Then ;~ $RetArr[0] = $pFile ;~ $RetArr[1] = $pStream ;~ $RetArr[2] = 0 ;~ $RetArr[3] = $tBI ;~ $RetArr[4] = $Stride ;~ $RetArr[5] = $pStream ;~ Return SetError(1, 0, $RetArr) ;~ EndIf ;~ ConsoleWrite(_DecodeFOURCC(DllStructGetData($tACO, "fccHandler")) & @CRLF) ;http://msdn.microsoft.com/en-us/library/dd756811(v=VS.85).aspx $aRet = DllCall($Avi32_Dll, "int", "AVIMakeCompressedStream", "ptr*", 0, "ptr", $pStream, "ptr", DllStructGetPtr($tACO), "ptr", 0) If $aRet[0] <> $AVIERR_OK Then $RetArr[0] = $pFile $RetArr[1] = $pStream $RetArr[2] = 0 $RetArr[3] = $tBI $RetArr[4] = $stride $RetArr[5] = $pStream Return SetError(2, 0, $RetArr) EndIf $psCompressed = $aRet[1] ;The format for the stream is the same as BITMAPINFOHEADER $aRet = DllCall($Avi32_Dll, "int", "AVIStreamSetFormat", "ptr", $psCompressed, "long", 0, "ptr", DllStructGetPtr($tBI), "long", DllStructGetSize($tBI)) $RetArr[0] = $pFile $RetArr[1] = $psCompressed $RetArr[2] = 0 $RetArr[3] = $tBI $RetArr[4] = $stride $RetArr[5] = $pStream Return $RetArr EndFunc ;==>_CreateAvi ;Adds a bitmap file to an already opened avi file. ;monoceres, Prog@ndy Func _AddHBitmapToAvi(ByRef $Avi_Handle, $hBitmap) Local $DC = _WinAPI_GetDC(0) Local $hDC = _WinAPI_CreateCompatibleDC($DC) _WinAPI_ReleaseDC(0, $DC) Local $OldBMP = _WinAPI_SelectObject($hDC, $hBitmap) Local $bits = DllStructCreate("byte[" & DllStructGetData($Avi_Handle[3], "biSizeImage") & "]") _WinAPI_GetDIBits($hDC, $hBitmap, 0, Abs(DllStructGetData($Avi_Handle[3], "biHeight")), DllStructGetPtr($bits), DllStructGetPtr($Avi_Handle[3]), 0) _WinAPI_SelectObject($hDC, $OldBMP) _WinAPI_DeleteDC($hDC) DllCall($Avi32_Dll, "int", "AVIStreamWrite", "ptr", $Avi_Handle[1], "long", $Avi_Handle[2], "long", 1, "ptr", DllStructGetPtr($bits), _ "long", DllStructGetSize($bits), "long", $AVIIF_KEYFRAME, "ptr*", 0, "ptr*", 0) $Avi_Handle[2] += 1 EndFunc ;==>_AddHBitmapToAvi ;Adds a bitmap file to an already opened avi file. Func _AddBitmapToAvi(ByRef $Avi_Handle, $sBitmap) Local $bm = LoadBitmap($sBitmap, True) DllCall($Avi32_Dll, "int", "AVIStreamWrite", "ptr", $Avi_Handle[1], "long", $Avi_Handle[2], "long", 1, "ptr", DllStructGetPtr($bm[2]), _ "long", DllStructGetSize($bm[2]), "long", $AVIIF_KEYFRAME, "ptr*", 0, "ptr*", 0) $Avi_Handle[2] += 1 EndFunc ;==>_AddBitmapToAvi ;Returns array with 3 elements ;[0]=BITMAPFILEHEADER ;[1]=BITMAPINFOHEADER ;[2]=Bitmap data buffer (if specified) Func LoadBitmap($sFilename, $LoadData = False) Local $RetArr[3] Local $byref Local $tBIH, $tBFH, $buffer, $fhandle $tBFH = DllStructCreate($BITMAPFILEHEADER) $tBIH = DllStructCreate($BITMAPINFOHEADER) $fhandle = _WinAPI_CreateFile($sFilename, 2, 2, 0, 0) _WinAPI_ReadFile($fhandle, DllStructGetPtr($tBFH), DllStructGetSize($tBFH), $byref) _WinAPI_ReadFile($fhandle, DllStructGetPtr($tBIH), DllStructGetSize($tBIH), $byref) $RetArr[0] = $tBFH $RetArr[1] = $tBIH If Not $LoadData Then _WinAPI_CloseHandle($fhandle) Return $RetArr EndIf $buffer = DllStructCreate("byte[" & DllStructGetData($tBFH, "size") - 54 & "]") $RetArr[2] = $buffer _WinAPI_ReadFile($fhandle, DllStructGetPtr($buffer), DllStructGetSize($buffer), $byref) _WinAPI_CloseHandle($fhandle) Return $RetArr EndFunc ;==>LoadBitmap ;Init the avi library Func _StartAviLibrary() $Avi32_Dll = DllOpen("Avifil32.dll") DllCall($Avi32_Dll, "none", "AVIFileInit") EndFunc ;==>_StartAviLibrary ;Release the library Func _StopAviLibrary() DllCall($Avi32_Dll, "none", "AVIFileExit") DllClose($Avi32_Dll) EndFunc ;==>_StopAviLibrary Func _CloseAvi($Avi_Handle) DllCall($Avi32_Dll, "int", "AVIStreamRelease", "ptr", $Avi_Handle[1]) DllCall($Avi32_Dll, "int", "AVIStreamRelease", "ptr", $Avi_Handle[5]) DllCall($Avi32_Dll, "int", "AVIFileRelease", "ptr", $Avi_Handle[0]) EndFunc ;==>_CloseAvi #endregion AVIWriter UDF Drag'n'drop works only when I comment out "#AutoIt3Wrapper_res_requestedExecutionLevel=highestAvailable". Tested on Win10 x64. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 31, 2016 Author Share Posted May 31, 2016 "MSVC" is not supported by GuiCtrlCreateAvi function I have uploaded files following your suggestion. Added some links to the first Post. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 31, 2016 Share Posted May 31, 2016 One more thing - I would always use ($GDIP_PXF32ARGB) $ahClone[$i] = _GDIPlus_BitmapCloneArea ( $hImage, 0, 0, $iWidth, $iHeight, $GDIP_PXF32ARGB ) for a better quality in line 414 and remove the sleep. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 31, 2016 Author Share Posted May 31, 2016 Sure as I use it line 101 But line 414, $aPixelFormat[0] is always equal to $GDIP_PXF32ARGB for all Gifs used. Sleep ( 20 ) is used for limit cpu usage when there is lot of frames. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wakillon Posted May 31, 2016 Author Share Posted May 31, 2016 @UEZ Something who could be interesting, would be to get ( i have try unsuccessfully with GdipGetPropertyItem ) the transparency color or the transparency index from the colors palette and be able to change it. Any idea ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted June 1, 2016 Share Posted June 1, 2016 13 hours ago, wakillon said: @UEZ Something who could be interesting, would be to get ( i have try unsuccessfully with GdipGetPropertyItem ) the transparency color or the transparency index from the colors palette and be able to change it. Any idea ? What is the purpose for this? I would say it is much easier to change the background color thus you change also the transparent color at least for transparent GIFs. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted June 1, 2016 Author Share Posted June 1, 2016 The purpose would be to convert not transparent GIF to transparent GIF for a better display on a GUI. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2016 Share Posted June 2, 2016 How you want to get the proper color value to make it transparent? To make a color value transparent is easy. expandcollapse popup#include <GDIPlus.au3> Global $sFile_GIF = FileOpenDialog("Select a GIF image (non animated!)", @ScriptDir, "GIF (*.gif)") If @error Then Exit _GDIPlus_Startup() Global Const $hImage = _GDIPlus_ImageLoadFromFile($sFile_GIF) Global $iSize = _GDIPlus_ImageGetColorPaletteSize($hImage) Global $tColorPalette = DllStructCreate("struct;uint Flags;uint Count;dword Entries[256];endstruct") _GDIPlus_ImageGetColorPalette($hImage, $tColorPalette, $iSize) ConsoleWrite($iSize & @CRLF) ConsoleWrite($tColorPalette.Flags & @CRLF) ConsoleWrite($tColorPalette.Count & @CRLF & @CRLF) ;print color table For $i = 1 To $tColorPalette.Count ConsoleWrite(Hex($tColorPalette.Entries(($i)), 8) & @CRLF) Next _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Func _GDIPlus_ImageGetColorPalette($hImage, $tColorPalette, $iSize) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImagePalette", "handle", $hImage, "struct*", $tColorPalette, "uint", $iSize) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return True EndFunc ;==>_GDIPlus_ImageGetColorPalette Func _GDIPlus_ImageGetColorPaletteSize($hImage) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetImagePaletteSize", "handle", $hImage, "uint*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $aResult[2] EndFunc ;==>_GDIPlus_ImageGetColorPaletteSize Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
TheSaint Posted June 2, 2016 Share Posted June 2, 2016 Thanks for sharing. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
wakillon Posted June 2, 2016 Author Share Posted June 2, 2016 35 minutes ago, TheSaint said: Thanks for sharing. You're wellcome @UEZ Have you seen in eukalyptus AVI-Compose-Video-UDF that you can extract frames as you want some time ago ? #include <AVIComp.au3> Global $tAVI = _AVIComp_Open( 'D:\Bureau\Test_CVID.avi' ) ConsoleWrite("> Dimension: " & $tAVI.Width & "x" & $tAVI.Height & @CRLF) ConsoleWrite("> FrameRate: " & $tAVI.FrameRate & @CRLF) DirCreate ( @ScriptDir & '\Frames' ) For $i = 1 To $tAVI.Frames _AVIComp_GetFrame($tAVI, $i) _GDIPlus_ImageSaveToFile($tAVI.Bmp, @ScriptDir & "\Frames\Frame_" & StringFormat("%03s", $i) & ".gif") Next _AVIComp_Close($tAVI) ShellExecute(@ScriptDir & "\Frames\Frame_001.gif") AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2016 Share Posted June 2, 2016 2 minutes ago, wakillon said: Have you seen in eukalyptus AVI-Compose-Video-UDF that you can extract frames as you want some time ago ? Yes of course. My idea was to convert an AVI to a GIF animation. Now it can be made... Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted June 2, 2016 Author Share Posted June 2, 2016 16 minutes ago, UEZ said: My idea was to convert an AVI to a GIF animation. Now it can be made... Great ! But it will be only for AVI files. Have you find a solution for mp4 or mkv ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2016 Share Posted June 2, 2016 (edited) This was only something within mind. That means I never tried anything in that direction yet. Currently I'm trying other things to speed up GDI+ stuff using ext. DLL which I create with FreeBasic. FreeBasic is very powerful and faaaaaaaaassssssssssttttttttt. Little example: Random Pixel Generator Edited June 2, 2016 by UEZ Synapsee 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted June 2, 2016 Author Share Posted June 2, 2016 Wow you are right ! I will take a look Thanks. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now