Sign in to follow this  
Followers 0
theguy0000

tg0i images

32 posts in this topic

#1 ·  Posted (edited)

Hehe, this is probably useless, but pretty cool I think.

Also thanks mmavipc.

I made my own image file format called tg0i (the guy 0000 image)

It is text-based and human readable to an extent.

I also made a program to view the images created, and a program to capture a section of the screen and save it to a tg0i image.

Here is the viewer:

http://www.theguy0000.com/read.au3

and the capture program:

http://www.theguy0000.com/capture.au3

Also, here is a program that randomly creates a 400x400 pixel image:

http://www.theguy0000.com/create.au3

----------------------------

now some info on the format of a tg0i image:

it has 6 blocks separated by -

1- only contains tg0i. Just to verify to the viewer that it is a tg0i image.

2- width in pixels

3- height in pixels

4- palette - contains a list colors in hexadecimal format separated by ;

5- contains the image pixel-by-pixel, separated by a space. Each pixel is a number that represents the color of that pixel, depending on the palette. For example, 2 would be the second color in the palette, etc...

6- useless. just contains whatever comments you like about the image.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I tested this for theguy before he released and I was like,

Me - "Made in AutoIt?"

TheGuy - "Yes, AutoIt"

My face just dropped!

This is awesome, and I am going to create my own with this, if you dont mind?

Edit: An example of theguys image format, is:

[tg0i]

tg0i-13-10-FF0000;00FF00;0000FF-2 3 1 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 1 2 3 2 2 1 2 3 3 2 1 1 1 2 3 2 3 3 3 2 2 1 1 1 1 2 3 3 1 1 2 3 2 2 1 3 3 2 1 2 3 1 3 2 2 3 1 3 3 3 2 1 3 2 3 2 1 2 3 2 1 2 3 1 2 3 1 2 3 2 2 3 3 2 1 2 1 3 3 3 3 2 1 2 3 1-

This is a tg0i image.

[/tg0i]

Edited by Secure_ICT

Share this post


Link to post
Share on other sites

I tested this for theguy before he released and I was like,

Me - "Made in AutoIt?"

TheGuy - "Yes, AutoIt"

My face just dropped!

This is awesome, and I am going to create my own with this, if you dont mind?

heh, of course I don't mind. I bet there are much better ways to make images than this, and hopefully make them smaller.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

I cant get this to work. I follow the directions and it creates a file on my desktop. I open it up using the read.au3 and theres nothing there.


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

I cant get this to work. I follow the directions and it creates a file on my desktop. I open it up using the read.au3 and theres nothing there.

how exactly do you open it using read.au3?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

how exactly do you open it using read.au3?

1. Double click on read.au3 file

2. Find the image i made using your capture.au3

3. Click Open.


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

1. Double click on read.au3 file

2. Find the image i made using your capture.au3

3. Click Open.

Re-download read.au3 and replace your old one. I think I had an old version before.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Re-download read.au3 and replace your old one. I think I had an old version before.

K its working now. Very cool, nice work!


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

K its working now. Very cool, nice work!

thanks!

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

I just realized, the capture script will crash when the image contains pure black.

May I ask why the maximum array subscript value is 65,535? I only need 65,536 lol


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Cool script.

I can make an array bigger than that, explain the problem?


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

#13 ·  Posted (edited)

Cool script.

I can make an array bigger than that, explain the problem?

I am refering to line 30 of capture.au3. I use Dim $colors[Dec("FFFFFF")] and it's fine. I use Dim $colors[Dec("FFFFFF")+1] and I get "Array maximum size exceeded"

edit: nevermind, turns out Dec("FFFFFF") is 16,777,215 :rolleyes: so why is the limit 16,777,215? Why not 16,777,216? :rambo:

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

This is funny, but it is slow as hell. :rolleyes:

Have you concidered doing using a background color, and checking for that when capturing..?

Share this post


Link to post
Share on other sites

This is funny, but it is slow as hell. :rolleyes:

Have you concidered doing using a background color, and checking for that when capturing..?

hey yeah, i could have the capture program see what color is most common in the image, then have all the pixels in the reader default to that color, and change them if necessary...

okokok i'll go make this thing way better now...


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

This looks interesting. Something that would be nice, is a human readable vector type. That would reduce the size somewhat and produce higher quality images at different sizes. Something like, eh what was it, svg?

Share this post


Link to post
Share on other sites

ok i updated the reader and tested it, and the loading if images is DRAMATICALLY better. Now I need to fix the capture program...


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

everything is updated.

capture.au3:

-now selects the most used color as the background, to make image loading as efficient as possible.

-now doesn't crash when the color black is encountered.

-is now much slower...oops. lol

read.au3:

-gets the background color from the image file and makes that color default, and then skips that color when loading the image. This dramatically decreases loading time.

-now the last (now 7th) block, used for comments, is not required. The image will be accepted without it.

-is now much faster. yay :rolleyes:

create.au3:

-picks a random one of the five colors and makes it the background color...

all updated files are in first post.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Very nice. :rolleyes:

This is a good artificial intelligence example.

thanks. I still think an editor would be awesome, but with autoit, it would be incredibly slow...I just can't think of a way to do it.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0