Followers 0

# Image embedded...

## 10 posts in this topic

Hi, ppl I need to set a background image to my application but if i change the name or the directory of the pic... my application does not get the pic... i tried to embed it but i dont know how......

can anyone help ?

thanks.....

##### Share on other sites

Post some code up...let me see..

##### Share on other sites

FileInstall ( "source", "dest" )

"source" = Current location of your image file

"dest" = Location you want the file extracted to so your script can find it

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

##### Share on other sites

FileInstall ( "source", "dest" )oÝ÷ Ú«¨¶Ê.­Çªº

8)

##### Share on other sites

Thank you guys but i think i didnt explain myself correctly.... look, i am trying to do a tool to kill a virus called "Gullum" that infected some PCs here at work, i have no problem with the code but i want it to have a cool face to users so i put a backgroud image on it, the problem is that when people carry it for their PC the backgroud pic disappears because it lost the path i think, i want the backgroud picture inside the application....

this is the design.

PD: sorry about my english, i speak spanish.

##### Share on other sites

ofLight & Valuater are correct...you need to use FileInstall so anyone who runs your code on their machine will have the background pic....

##### Share on other sites

#7 ·  Posted (edited)

FileInstall() is really solution.

Amd you may look at alternative way how to embed data/pictures into EXE - resources

Edited by Zedna

##### Share on other sites

FileInstall() is really solution.

Amd you may look at alternative way how to embed data/pictures into EXE - resources

thank you folks.... i really appreciate your help..... i will work on that way.... better of... i have that solution.

##### Share on other sites

thank you folks.... i really appreciate your help..... i will work on that way.... better of... i have that solution.

##### Share on other sites

I think ConeXXion is talking about embedding the image into the code lik mrbond007 did here or like

the example I made for myself using what was done by mrbond007 but I cannot get the hex editor to work for me. If anyone else figures it out please pm me or post the example ..

Either way ConeXXion the image gets compiled basically by using fileinstall and gets placed in the %temp% folder then deleted when closed.

Local \$pic = "0x"
\$pic &= "FFD8FFE000104A46494600010101006000600000FFDB0043000101010101010101010101010101010101010"
\$pic &= "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
\$pic &= "FFDB004301010101010101010101010101010101010101010101010101010101010101010101010101010101010"
\$pic &= "10101010101010101010101010101010101010101010101FFC0001108002C005F03012200021101031101FFC400"
\$pic &= "1E00000103050101000000000000000000000906070A00010405080203FFC4003A1000010401020206070605050"
\$pic &= "00000000004010203050607110008091213142131154151617191F01632526281C1172253B1D123547292F1FFC4"
\$pic &= "001B01000105010100000000000000000000000603040507080209FFC4002A11000300020201040201030500000"
\$pic &= "000000102030405111213000607211431081522232425334161FFDA000C03010002110311003F009FC71A5B2B81"
\$pic &= "7A473C75FA89798B8FA8D98E5C5C4190CC3B4E56F8DA48DB8E076429F51639D6466545B0B4D1DE08553D30C1CB6"
\$pic &= "B3AAE6C9D9A90CDF7DBEF37DA89F8FDFFE78DE0D94033351527678A6FB23D3C3DDF79388E4DD73152CD5167363F"
\$pic &= "ACBCD732FBD1C5BE966B88795D229D96683BD407DA400E80085115A84A44A6C211431528DDA30622199D1C8D415"
\$pic &= "EF4886B9E199960BA720D961198B73B0A9CA76A14B84E4B8CCD86B2AE00E5D4369DA74DCFAEA1CAE58E435B161A"
\$pic &= "18094136F837377EDD9E5E1FCCCDBCBC9775DF7F6FF007E3447E655E33FAAE2234DBC3EF37F67227ABDBC009D3E"
\$pic &= "E79355F22CE33DC16DF32D23A2AAC51A15A639A8991D46A1D22669456F39628224B81D1499B3F1DBCAC7569735A"
\$pic &= "91366870870E556CE1D6D7F6F30F033587F393AB1A9B94E5B71A8B97E6B80E1C29A5D160F45A104E9CD94C5CD8E"
\$pic &= "DA1B51777F925C6B0693E4E7D932F0C0E6368A0ABAFC55B574ED1613EBEC8B9A4B157393FC87F8B71F1F12E9BBB"
\$pic &= "65D72ED48261E261D1F2254803F93E77A34B1273C7A75835FF29A16ABA0C5A6421EE1087C49EF7B5AF26D6CF1D2"
\$pic &= "134AB6464642A4A89523C3E2540F90EF5426A25E0159CD58DD24C3A992D57E620192A3193B1CABE09B393F2FE65"
\$pic &= "F6FD78F0B36170B988EEBB7C537F34FF3C45CB36E7D329E5DEE68F5146CAB54350B486A62959AB147AA83697B72"
\$pic &= "9ABAB2091621728D392B4BB4FB026927D2A2CC4DB51646CB31AEABD928E0114C5B7D251120D66E903C3744744F2"
\$pic &= "3DA3F26FB47DEB81B9D869F39D63A06FF765CC98853124718E52E5378E9695315E296EB68D68A1E179B057995F4"
\$pic &= "3FBFF0065EFFDB795AEC4D8632B536C3FD0363B9AA6453CC20623B2CDD2CB479F33A221EB5938E55C1F4574CB91"
\$pic &= "06639CB2B536DFCDC88BF14F1DFEBDFC2464CE6B9B2F67DE23F3DB6EB377F3FF0097ABE5F3F08F7EBE748E6B363"
\$pic &= "FA2D539E6186689D96619B938A51D761F15B6A5946E9E9F9C4E28435BDD986E15575B998989946322B402B971D9"
\$pic &= "034C591058C8988223816161134B2F59EE0DCEFE44FC5D8969C63B8BEC8D20B9069838BFE292504DA4B4A66D70C"
\$pic &= "792A945759CFC8CA3B2D44DD4A022C6F88BDEF79BD29AF96185AB482655FFC94642CB4645C69E4FF00623295676"
\$pic &= "EAA4F050B2B063247ACBD18F46F67235DBA2793917D9EC55DBEBDDC287CF8045D1B9CECE6BACF996AE68CEA5234"
\$pic &= "CCCF47AC71C2C6CAA18A11BED76139C7A7A5C5CCB708106BAAC2CB2ABD007D564DE89080A5B02A286CA9ABC310A"
\$pic &= "748D57960288DD59D78620BB9D4676876999A8D94D659B835F15D15C5139645A4DD1D7E9A7493A510F009571D95"
\$pic &= "5B9509ACA6456033EDF85FB7FD5DEEFD7F4E222FCFB3D5DD27AC4FF0071CA6E1CE7AA78755D1EA96AEC6D4DFC15"
\$pic &= "99E8251E9DE2F74B14B20F639ED16799CDC1B883656224505B974F9285675504EE492D6286C220639E60496B29F"
\$pic &= "FE4BC2D7F897722327A996CB436A745244E49B6C5EF573C7F6A2723B31FA0481FF007EAC2F862B397BFB5C69459"
\$pic &= "87C3DA4D7B103BBB60DBAA2F3FB66E09007D900F1E87DE5BCD3E7D886B25072E60D260666339C93465CB95D963E"
\$pic &= "F2338C7C122BF2C2AE29AA2DFBDC60F74B3928ABFA93175961635D011643D7183C8405E8CE8C9309A6B7B5A8CA4"
\$pic &= "C8C996E689960354111123435E221AF8A4290F1E5AA98C26570F1A443A8B641C10CAF7484C652A44AC7C26D1EC8"
\$pic &= "EBF16BB82CB4371990B35E2DC58E737DA6821798D3CB4B0CFDC4EAFCECB865BCC7C4A5188395A3D54E05520E65B"
\$pic &= "45098D5C791A270D34C3A5517AE3A9F5AE7072B1A8D99F8F958937AE65AE8676892F8FF0089851752D12589369D"
\$pic &= "5FA30E1DB25158F343EB1AA24466A264D02AA2B998CE2723E5491CD63D127BD62B118D635FD54D9FDB39AF7239B"
\$pic &= "23588D4D955F93A58D7CB4DDA8E4C82B9722CACB854490494D8DC993D8CF1C713EC6ACFAB92463376CCDB3A9280"
\$pic &= "9157B136BE689D388AE0E27A557F6BAB5A838D47698B56DEE358FE2B0DD55DD649534E5D74CA55FB2316661F3C7"
\$pic &= "1BE69236C2448D19F336210C165497B49118C6C87A0C8ABF48B52728C6EE2057E1F9066159265149653361AACB0"
\$pic &= "16C4C99D32151CF0CB4824AB47520740AECFC2C89120F9B8565A4532F1D9D935439F2295E3222522587DA94AB3A"
\$pic &= "2A907EC90ABC9700B877589E379710DABD41C6DB9CE136A6B64BCC48EBA329BED0574C85CE94C7DA63B1D498189"
\$pic &= "4615393950B8F9D8EE73A857B8E4D571435A0C45992852C95E958EB5AC1832201E08C83E8468273119E60BA3BA8"
\$pic &= "1634339A86351D203CBAEBF9FCB0EA503519CE7D9DCD5F1555FAE2E941A6E2C9695C06455C4E483A498BE9F50DD"
\$pic &= "5698F7B50DB618794C13260B8D8472D025508715CBCBC785194F947DA5B3D96BF1B231AB4ACB267888EF6CB18B2"
\$pic &= "461AB774C80D8F69128EAE883316099D24728EF6A35CF6C9D6ECDBC29F4E75832CCCB412BF57ACA2AC6E56987CD"
\$pic &= "67009595E20D58C36B4289A2C03D4F762079079640E259E13233A73D92C8E36638A26622455F331A199A643CB18"
\$pic &= "AA63685E8AE600F27D1116E463B8F1B8A6276F4790D05E64551579055DCD244F02DAAEC294A223B21EC462637C1"
\$pic &= "54EC6C05D8CC2AFDB5D2369AE6DB34DF63886271A28B2679315B536B952A382C4BF5A0F1C68BC0913301893FA30"
\$pic &= "4BC57CA6BA426692791FC4846BD9D41224FCA9ECFDB80C5D14FA3D98E97F2B1A0D8D66D4C4D164D59A7F4FE97A8"
\$pic &= "3237C4656926B65B06866C1231928C70F097146609335938853661A6632589ED69A215AAC8236AFA9138F5CFDA5"
\$pic &= "AEC4D4FB6341AFC1C29EBB1B1B5382A98539F8841DF1D2B70E842B1B3DDE94BBD0796B77A52A4D1DC9C03BECBBE"
\$pic &= "7EEB6B979392F996B67E496C977EE6AAB5649156E4813592A24954F4492A24F845503E92C6D958E63911515153C"
\$pic &= "7DFF5F3DB8E62D6BD0FC6B542A49A5C928EBEF2B4896021C2580B193130B0C861609B07688AF14FAF32284DAE3C"
\$pic &= "74752559581560482083EA2D1DE4E949BB4E936574A231474752195D19486565201560410402083E85B58727F58"
\$pic &= "6C52D790974457CF1F772059F23C86788919C8D64901292DABD4986666F1931CEB23098DEF8C849639646BF22B3"
\$pic &= "922D34029CCA11B4F30D1696C5C1BEC69E0C62921AA3E4AF585C0C86D7C4134429E13871DC23E786470CB042B0A"
\$pic &= "B1638D509DF741FF00A69C7A41A144DBA89F2E2331F41A2C4677C4D26A315E926851F1F5B870678BAB2BC5DA515"
\$pic &= "7A1C75DC9EE0B5A136B40C331B0EB584CE632BC4A3AB18261852AB89298242332069043BF9A79D234965778C8E7"
\$pic &= "2F8F1B40B940D3BFB4A265456098991918930930F7E463B513DD0F204C4883921B590471D13C48956219D190D74"
\$pic &= "11AAB2256B576E084F7787FA6DF9717482145DD236A2F0F3F0307C7297E16278A262D19FE347C726C6E3F1DA49D"
\$pic &= "3ACCE3F03C250032E078FAF03D37FCACAEEF4FC9BF7A8A0A3F9A9DE82DFF3076EDCB8AF27C81890FCFF00773E9B"
\$pic &= "4C6B01AEAC1191F778F76B5136EAA6DE4BEFF3F1F6F157BA7F5B611B9AA346A8A9EB6EFF00BEDEBF3E1CF44444D"
\$pic &= "91364E2FC3BF487AE3C3F977C67BF1278B455839A5ABD4932000584A256491B2BD482238DB2CAAF7A23DFDA3DCA"
\$pic &= "4454DD77EC6ECE3FC29C52451A2EE8C6A2FC384FC52E02F8A7D43770BD1780FFBEE071C06E7EFB7EFFF007D77E4"
\$pic &= "7E79EEFC95EA4F63CF5FD75E79E7AF1F5C7EBD2131AC547A8631B1C4D6EC89E49B796DF1FD3F4DB7E17A888D444"
\$pic &= "4F244DB8BEC89E49B715C29EB8F5FFFD9"

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
\$AForm1 = GUICreate("Embedded Image Example", 310, 130, 193, 125)
GUISetState(@SW_SHOW)

\$Label1 = GUICtrlCreateLabel("Embedded Image:", 8, 16, 199, 27)
GUICtrlSetFont(-1, 14, 800, 0, "Verdana")
\$Label2 = GUICtrlCreateLabel("Embedded Button:", 7, 63, 203, 27)
GUICtrlSetFont(-1, 14, 800, 0, "Verdana")

GUICtrlCreatePic("1.jpg", 200, 0, 200, 80)
FileWrite(@TempDir & "\chip.jpg", Binary(\$pic))

GUICtrlCreatePic(@TempDir & "\chip.jpg", 210, 5, 95, 44)
GUICtrlSetState(-1, \$GUI_DISABLE)

\$but1 = GUICtrlCreatePic(@TempDir & "\chip.jpg", 210, 57, 95, 44)
GUICtrlSetCursor(-1, 0)

FileDelete(@TempDir & "\chip.jpg")

#EndRegion ### END Koda GUI section ###

While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
Case \$Exit
Exit
EndSwitch
WEnd