Joke758 1 Posted October 4, 2006 (edited) Make cool jpg file with my generator!You can choose the size of the file. Default is 100kb.expandcollapse popup;By Joke758 Global $bites = IniRead ( "artgen.ini", "bites", "bites", "100000" ) ;JPG header Global $hex = 'FFD8FFE000104A46494600010101006000600000FFDB0043000806060706050807070'& _ '70909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C00242E2700222C23'& _ '1C1C2837292C30313434341F27393D38323C2E333432FFDB0043010909090C0B0C1'& _ '80D0D1832211C213232323232323232323232323232323232323232323232323232323'& _ '232323232323232323232323232323232323232323232FFC00011080248038103012200'& _ '021101031101FFC4001F000001050101010101010000000000000000010203040506070'& _ '8090A0BFFC400B5100002010303020403050504040000017D01020300041105122131'& _ '410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A2'& _ '5262728292A3435363738393A434445464748494A535455565758595A6364656667686'& _ '96A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8'& _ 'A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE'& _ '1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301010101010101'& _ '01010000000000000102030405060708090A0BFFC400B5110002010204040304070504'& _ '0400010277000102031104052131061241510761711322328108144291A1B1C1092333'& _ '52F0156272D10A162434E125F11718191A262728292A35363738393A4344454647484'& _ '94A535455565758595A636465666768696A737475767778797A82838485868788898A'& _ '92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5'& _ 'C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9'& _ 'FAFFDA000C03010002110311003F00F7FA2800' $Form1 = GUICreate("Creating", 237, 74, 302, 218) $Progress2 = GUICtrlCreateProgress(16, 40, 209, 17) GUICtrlSetColor(-1, 0x316AC5) GUICtrlCreateLabel("Creating...", 16, 8, 97, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) ;Making the body of the jpg For $a = 1 to $bites $percent = int(($a/$bites)*100) GuiCtrlSetData ( $progress2, $percent ) $hex &= Hex(Random ( 0, 255 ), 2) Next GuiDelete ( $form1 ) ;modify $hex = '0x' & $hex ;saving Local $h_Open = FileOpen('output.jpg', 2) FileWrite($h_Open, BinaryString($hex)) FileClose($h_Open) MsgBox ( 64, "Art Generator", "Done!" & @CRLF & @scriptdir & "\output.jpg" )Here's an example: Edited October 6, 2006 by Joke758 [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Share this post Link to post Share on other sites
spyrorocks 1 Posted October 5, 2006 haha this is cool [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Share this post Link to post Share on other sites
Joke758 1 Posted October 5, 2006 Yeah, post your creation! [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Share this post Link to post Share on other sites
fisofo 0 Posted October 5, 2006 Perhaps I'm missing something... I get an undetermined string error for that "Global $hex =" line. Ideas? Share this post Link to post Share on other sites
Richard Robertson 187 Posted October 5, 2006 Wow, nice image. Now if only you could generate cool line drawings. Share this post Link to post Share on other sites
dv8 3 Posted October 5, 2006 Perhaps I'm missing something... I get an undetermined string error for that "Global $hex =" line. Ideas?The string needs to be on one line. Here it's broken because there's no horizontal space... Free Remote Desktop Software For Windows Share this post Link to post Share on other sites
dv8 3 Posted October 5, 2006 (edited) Make cool jpg file with my generator!You can choose the size of the file. Default is 100kb.Thanks to w0uter for his _Replace function.Maybe you should show what your ARTGEN.INI looks like? EDIT1: Because without it, the output.jpg is 0kb.EDIT2: I figured it out. Sorry. Edited October 5, 2006 by dv8 Free Remote Desktop Software For Windows Share this post Link to post Share on other sites
jvanegmond 306 Posted October 5, 2006 This is just awesome! I have been waiting to see these things on AutoIt more! github.com/jvanegmond Share this post Link to post Share on other sites
dv8 3 Posted October 5, 2006 Something is wrong. I keep getting 0kb output.jpg file. Free Remote Desktop Software For Windows Share this post Link to post Share on other sites
fisofo 0 Posted October 5, 2006 The string needs to be on one line. Here it's broken because there's no horizontal space...Heh... i guess it's still early It runs now, but I also get a 0 Kb sized file... does this need beta to run? Share this post Link to post Share on other sites
Kohr 0 Posted October 5, 2006 0kb file size here as well. Kohr AutoIt LinksAutoIt CrapsGrid_PixelSearchAdvancedPixelGrab Share this post Link to post Share on other sites
RazerM 0 Posted October 5, 2006 I managed to get it working. Remove the space from the $hex variable beginning and the $hex &= part. This is quite cool. Nice job My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Share this post Link to post Share on other sites
Kohr 0 Posted October 5, 2006 That fixed it. Great job on this. AutoIt LinksAutoIt CrapsGrid_PixelSearchAdvancedPixelGrab Share this post Link to post Share on other sites
Joke758 1 Posted October 5, 2006 I'm working on making nice design.. artgen.ini should looks like that: [bites] bites=22222 But it's not very important.. [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Share this post Link to post Share on other sites
zcoacoaz 0 Posted October 5, 2006 (edited) Well it is interesting and original, I'll give you that Maybe someone could use this as inspiration to make an actual image generator. Edited October 5, 2006 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Share this post Link to post Share on other sites
Joke758 1 Posted October 5, 2006 (edited) Ok, I made a random design generator. I remove the compiling step so it's very fast. Here's the script:expandcollapse popup;By Joke758 Global $bites = IniRead ( "artgen.ini", "bites", "bites", "200000" ) Global $temp ;JPG header Global $hex = 'FFD8FFE000104A46494600010101006000600000FFDB0043000806060706050807070'& _ '70909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C00242E2700222C23'& _ '1C1C2837292C30313434341F27393D38323C2E333432FFDB0043010909090C0B0C1'& _ '80D0D1832211C213232323232323232323232323232323232323232323232323232323'& _ '232323232323232323232323232323232323232323232FFC00011080248038103012200'& _ '021101031101FFC4001F000001050101010101010000000000000000010203040506070'& _ '8090A0BFFC400B5100002010303020403050504040000017D01020300041105122131'& _ '410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A2'& _ '5262728292A3435363738393A434445464748494A535455565758595A6364656667686'& _ '96A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8'& _ 'A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE'& _ '1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301010101010101'& _ '01010000000000000102030405060708090A0BFFC400B5110002010204040304070504'& _ '0400010277000102031104052131061241510761711322328108144291A1B1C1092333'& _ '52F0156272D10A162434E125F11718191A262728292A35363738393A4344454647484'& _ '94A535455565758595A636465666768696A737475767778797A82838485868788898A'& _ '92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5'& _ 'C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9'& _ 'FAFFDA000C03010002110311003F00F7FA2800' $Form1 = GUICreate("Creating", 237, 74, 302, 218) $Progress2 = GUICtrlCreateProgress(16, 40, 209, 17) GUICtrlSetColor(-1, 0x316AC5) GUICtrlCreateLabel("Creating...", 16, 8, 97, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) ;Making the body of the jpg For $a = 1 to $bites $2tmp = Round(Random ( 1, 2 )) If $2tmp = 1 then $temp = $temp + 128 Else $temp = $temp - 64 EndIf If $temp > 255 then $temp = 1 $percent = int(($a/$bites)*100) GuiCtrlSetData ( $progress2, $percent ) ;$hex &= Hex(Random ( 0, 255 ), 2) $hex &= Hex( $temp, 2 ) Next GuiDelete ( $form1 ) ;modify $hex = '0x' & $hex ;saving Local $h_Open = FileOpen('output.jpg', 2) FileWrite($h_Open, BinaryString($hex)) FileClose($h_Open) run("rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen " & @scriptdir & "\output.jpg") ;Thanks to daslick MsgBox ( 64, "Art Generator", "Done!" & @CRLF & @scriptdir & "\output.jpg" )Example: Edited October 6, 2006 by Joke758 [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Share this post Link to post Share on other sites
daslick 2 Posted October 6, 2006 You should add this to your code!!! run("rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen C:\Program Files (x86)\AutoIt3\Examples\output.jpg") Share this post Link to post Share on other sites
CoePSX 4 Posted October 6, 2006 (edited) This is really a great job! Small script, simple idea, wonderful result. d-(^Â_^)-b Edited October 6, 2006 by CoePSX [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font] Share this post Link to post Share on other sites
guestscripter 5 Posted October 6, 2006 How could I specify the size, so that I can make a wallpaper for my 1680x1050 monitor? Or could you write me the script for that please? ImageSearch15.au3 featuring _ImageSearchStartup() and _ImageSearchShutdown() Share this post Link to post Share on other sites
Joke758 1 Posted October 6, 2006 Wow, I'm glad that you like it and you want to use it as your wallpaper The jpg header is only for 897x584. I'll edit a jpg file with 1680x1050 resolution and post the new header here. [u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own! Share this post Link to post Share on other sites