gesher 0 Report post Posted January 18, 2009 es posible usar un png animado con autoit??? asi como el gif it is possible to use an animated PNG with AutoIt??? like the gif Share this post Link to post Share on other sites
smashly 11 Report post Posted January 18, 2009 Currently no you can't, But yes you could do it using GDI+ and file reading. You would first need to read the APNG data chuncks so you can feed GDI+ the correct frame data. It would take a little effort, but it would be fully possible from the APNG specifications I just read. Cheers Share this post Link to post Share on other sites
rasim 19 Report post Posted January 18, 2009 gesherThis seems a trick, but works:; Animated Gif ; Author - gafrost Opt("MustDeclareVars", 1) #include <IE.au3> _Main() Func _Main() Local $pheight = 50, $pwidth = 50, $oIE, $GUIActiveX, $gif $gif = FileOpenDialog("Select Animated Gif", @ScriptDir, "gif files (*.gif)", 3) If @error Then Exit _GetGifPixWidth_Height($gif, $pwidth, $pheight) $oIE = ObjCreate("Shell.Explorer.2") GUICreate("Embedded Web control Test", 640, 580) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $pwidth, $pheight) $oIE.navigate ("about:blank") While _IEPropertyGet($oIE, "busy") Sleep(100) WEnd $oIE.document.body.background = $gif $oIE.document.body.scroll = "no" GUISetState() While GUIGetMsg() <> -3 WEnd EndFunc ;==>_Main Func _GetGifPixWidth_Height($s_gif, ByRef $pwidth, ByRef $pheight) If FileGetSize($s_gif) > 9 Then Local $sizes = FileRead($s_gif, 10) ConsoleWrite("Gif version: " & StringMid($sizes, 1, 6) & @LF) $pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1)) $pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1)) ConsoleWrite($pwidth & " x " & $pheight & @LF) EndIf EndFunc ;==>_GetGifPixWidth_Height Share this post Link to post Share on other sites
AdmiralAlkex 116 Report post Posted October 20, 2009 So you disappear for NINE months and when you come back you tell us you didn't spend the slightest effort to do anything yourself? You must be the laziest man alive. Anyway, to read files you use FileRead(). To decode it into something useful, read about the technical details in the Wikipedia article you stole that image from. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
gesher 0 Report post Posted October 22, 2009 and to get started? 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 .PNG........IHDR 00 00 00 01 00 00 00 01 08 02 00 00 00 90 77 53 ..............wS DE 00 00 00 0E 49 44 41 54 78 DA 62 F8 CF C0 00 Þ....IDATxÚbøÏÀ. 10 60 00 03 01 01 00 66 FD 9F 24 00 00 00 00 49 .`.....fý.$....I 45 4E 44 AE 42 60 82 END®B`. I have no idea how to read, these data Share this post Link to post Share on other sites