Click to See Complete Forum and Search --> : document.write('bitmap source code')


ElectronShaman
01-31-2003, 12:05 PM
This may seem horribly Naieve but I had a concept
that i think is desperately in need of development.

basicly a method for writing image code directly to
html documents... using JavaScript.

The code below doesnt actualy work but what i'm looking to
find or develop would be something similar.

document.write('<img src="BMv~ 6 (  ,   @~  <!-- actual bit map src code //--> ">')

Basicly im hoping this thread will generate a huge brainstorm
:) lolol

Zach Elfers
01-31-2003, 12:09 PM
This won't work. You can't use the bitmaps code as the source.

ElectronShaman
01-31-2003, 12:16 PM
:) Yeah I know... JavaScript wasnt designed for that...

But Im looking for a way to MAKE!! it work :)

Zach Elfers
01-31-2003, 12:18 PM
You can't MAKE it work. To do that you would have to make your own JavaScript interpreter and make your own rules. Unless your enthusiastic enough to do that, this will never happen.

Zach Elfers
01-31-2003, 12:19 PM
You might be able to try messing with bitmap code. Create a bitmap, the open it in Notepad and change the code and save it. This will probably mess it up but you can see if it makes a difference.

ElectronShaman
01-31-2003, 12:20 PM
:) hmmmmm

would C++ work? or Java.... maybee

Im taking classes , still got a lot to learn though.

Zach Elfers
01-31-2003, 12:21 PM
I don't think so. I know a little C++ and Java and I don't think you could do that. Maybe with Assembly or something???:confused:

ElectronShaman
01-31-2003, 12:24 PM
whooo assembly..:) no thanks

I gotta do something portable...

Ive studied bitmap src code quiet a bit and have a good
understanding of how it works...

I just gotta find a way to access it on the fly...
so to speak...

Maybee php and mime types or something...

Zach Elfers
01-31-2003, 12:27 PM
Wow! You can understand bitmap source code?

ElectronShaman
01-31-2003, 12:32 PM
Yeah...

hang on ive got an attachment here somewhere
that explains it...

Zach Elfers
01-31-2003, 12:37 PM
Cool. When you get it, I'll download it tonight and read it.:)

ElectronShaman
01-31-2003, 12:37 PM
Oh heck... I must have taken it home...
(im at work right now)

basicly what i did is make a bit map image in paint...

i made each pixel a different color then opened the image
in notepad

and cut and pasted each symbol and till i got a correlate list

of which symbols represent each color
theres like 256 symbols...
although some of them seem to be used to represent
the same color ... somthing almost black

aside from that...
the bitmap has a head section which show how many
pixels high and wide the image is...
I still need to study that part some more...
havent quiet got it coorellated yet.

Zach Elfers
01-31-2003, 12:40 PM
It makes sense that there are 256 chars for the 256 colors. The image is saved in 256 color I am guessing?

I will have to try what you did.

ElectronShaman
01-31-2003, 12:43 PM
Sorry about that...
If you will meet me here monday i may post the
list and show how the symbols are arranged...

basicly its 3 symbols for each pixel


*** *** *** *** but it doesnt have the spaces...
there are 2 hundred and something symbols...

representing red green and blue values from

0 to 256? i think its 256... maybee 255

Zach Elfers
01-31-2003, 12:56 PM
In the RGB scale there are 255 colors. 0 to 255.

BestZest
01-31-2003, 04:41 PM
I've just been reading your 'conversation' and this does sound interesting. I dont know if it will work. But I've just had an idea ;) This will (probably) only work in IE5 but you could make an image 1x1px then use the style tag:
filter:mask(color=lime); then write a script to change the colour of each pixel using a loop. This is where your knowledge / colour table comes in. we need to create a kinda colour code for people. Could you post the table I'll have a little go. Lets see what turns up!

BestZest