kiboost Posted December 14, 2012 Share Posted December 14, 2012 (edited) Hi, Seems gdi+ doesn't read tga (8bits tga without alpha). I'm writing a 64bits script that list some directories containing some tga file sequences, and I would like to show one of these tga into my gui. Any idea how to get that ? What would rocks would be to also be able to display 32bit rgba exr files. Edited December 14, 2012 by kiboost Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
UEZ Posted December 15, 2012 Share Posted December 15, 2012 (edited) No, GDI+ cannot load TGA files. If you have knowledge in C++ you can try to convert the code from here http://www.dhpoware.com/source/bitmap.html to AutoIt (no RLE supported)!I'm just working on the bool Bitmap::loadTarga(LPCTSTR pszFilename) function but my C++ skill is near zero...If somebody feels free to convert it please post it into this forum!Br,UEZ Edited December 15, 2012 by UEZ 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...
funkey Posted December 18, 2012 Share Posted December 18, 2012 (edited) I made a DLL out of this code to load targa files to hBitmap. Hope this is useful and works as expected. Edited December 18, 2012 by funkey UEZ 1 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
kiboost Posted December 18, 2012 Author Share Posted December 18, 2012 Thanks funkey, but seems you just convert the tga to bmp before showing it. I use cmd line nconvert tools to do this into jpg and use guictrlcreatepic, works also. But native handle of tga, png, exr (16 and 32bits) would really help a lot. Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
funkey Posted December 18, 2012 Share Posted December 18, 2012 Sample code just makes a bitmap from targa file. But you receive a hBitmap and you can do everything you want with it. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
UEZ Posted December 18, 2012 Share Posted December 18, 2012 I made a DLL out of this code to load targa files to hBitmap. Hope this is useful and works as expected.Hi funkey,somehow I sensed it that you will do it. Is there any chance to do it completely in AutoIt without using the DLL? I started the conversation but I still stuck on understanding some commands in C++.Br,UEZ 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...
funkey Posted December 18, 2012 Share Posted December 18, 2012 Hi UEZ, it should be no problem to do this in AutoIt. I will have a look at it when I have time. Not sure if this happens this year or not. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
JScript Posted December 18, 2012 Share Posted December 18, 2012 I'm in this project too! I am converting some functions... JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
kiboost Posted December 18, 2012 Author Share Posted December 18, 2012 Does it do it instantely in memory ? Would be better than converting into hard file ! Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
funkey Posted December 18, 2012 Share Posted December 18, 2012 All in memory, writing file to disk is just an example. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
funkey Posted December 19, 2012 Share Posted December 19, 2012 Hello, now I managed to convert the code to AutoIt. I hope there are not to much errors in it. It is not that fast, but i think some improvements could be done. Best regards funkey UEZ 1 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
kiboost Posted December 19, 2012 Author Share Posted December 19, 2012 I made a DLL out of this code to load targa files to hBitmap. Hope this is useful and works as expected.I got DLL error: 1I also see it is 32bit, could it work in 64bit mode ? Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79 Link to comment Share on other sites More sharing options...
UEZ Posted December 19, 2012 Share Posted December 19, 2012 (edited) The DLL version crashes (AutoIT3.exe ended.rc:-1073741819) also on my machine (Win7 x64) but the 2nd pure AutoIt code works properly! Btw, can you provide the DLL code? For transparent images the black background is ugly but can be changed easily! I will analyse your code to understand the conversation from C++ to AutoIt... Thank you very much! Br, UEZ Edited December 19, 2012 by UEZ 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...
funkey Posted December 19, 2012 Share Posted December 19, 2012 So, now you can download all I have about this. I cleaned some things in the DLL also.tga.rar mesale0077, UEZ, Andreik and 1 other 4 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
UEZ Posted December 19, 2012 Share Posted December 19, 2012 Thanks a lot! Br, UEZ 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...
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