Omnimaga

Calculator Community => TI Calculators => General Calculator Help => Topic started by: nxtboy III on February 20, 2012, 11:09:37 am

Title: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 11:09:37 am
Hi,
I was wondering if there was a computer program to convert a 4-lvl grayscale picture to 3 monochrome pictures (like a png or bmp) using a grayscale routine like this:

light gray

100
010
001

Dark gray is the opposite.

EDIT:
For example, a program that would convert the first image I post to the other three:
Thanks,
nxtboy III
Title: Re: Computer program to convert picture to calc grayscale?
Post by: BlakPilar on February 20, 2012, 11:29:24 am
I might be able to throw one together in .NET, but the colors (i.e. their RGB values) would have to be exact. If they were even off by one byte it wouldn't separate them correctly. Picture format wouldn't really be a problem because .NET has support for BMP (which is its native), PNG, TIFF, JPG, GIF, and ICO.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: BlakPilar on February 20, 2012, 11:31:14 am
Oh... Or you could use that... lol
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 11:35:49 am
???
Use what? You said "Oh... Or you could use that... lol"

EDIT: So do you think you could make it?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: BlakPilar on February 20, 2012, 12:47:47 pm
I thought SourceCoder would do that? And if I did it might not be till later tonight, I have a lot going on today.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 01:06:49 pm
What is sourcecoder?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: BlakPilar on February 20, 2012, 01:23:27 pm
Oh, Deep Thought deleted his post. I guess it didn't do what he thought you wanted. Anyway, yeah I can try it but like I said, it'd be later tonight.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 01:25:01 pm
Ok. Thanks. :)
Title: Re: Computer program to convert picture to calc grayscale?
Post by: DJ Omnimaga on February 20, 2012, 03:00:29 pm
I don't know any computer program that dithers grayscale like your 3 last pictures, but I know there is one for the 83+ that does, assuming you got WabbitEmu and a 83+/84+ ROM handy.

http://www.omnimaga.org/index.php?action=downloads;sa=view;down=130

On your computer you take your grayscale pic then separate each "color" into 3 monochrome images, convert them to 8xi with TI-Connect or Image Studio. Then using that 83+ program you can interlace the grayscale between each pic. I think you end up with 3 or 4 pictures.

However I'm unsure if current versions of WabbitEmu still supports exporting files with F7.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 03:13:54 pm
So there is no computer program to do it?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: DJ Omnimaga on February 20, 2012, 03:15:38 pm
Nope, sorry :(. At least not to convert in that grayscale format. It's because most ASM/Axe routines do the interlacing for you, so such program would be pretty much useless for calcs. The one for the calcs is for TI-BASIC/xLIB users, but very few people makes grayscale games using TI-BASIC and libraries since it takes a considerably higher amount of memory for the data. (3-4 pictures instead of 2)
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 03:18:30 pm
Well I needed this for my NXT so it would be easier to convert them.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: DJ Omnimaga on February 20, 2012, 03:31:21 pm
Actually lol I misread your original post. I thought you wanted a program to produce the scanlines shown in the 3 pics at the top for other sprite sheets or pics, not the opposite lol. My bad.

If you absolutely just want to separate the grays and blacks then you just need Photofiltre or another image software that supports "Replace color", then make 3 copies of the image, where:

-on one of them you get rid of black and dark gray (change them to white) then replace the light gray with black
-on the 2nd one you get rid of black and light gray then replace the dark gray with black
-on the 3rd one you get rid of both dark and light gray

Then you got each shades of gray separated.

Sorry for the misunderstanding lol X.x
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 03:34:24 pm
:(
Actually, you were right the first time and you did not misunderstand me.
So I guess there is no current way to do it...
Title: Re: Computer program to convert picture to calc grayscale?
Post by: DJ Omnimaga on February 20, 2012, 03:40:31 pm
Oh ok lol. ANd yeah to get images to look like in your first post the only way is using that calc program. :(

Of course someone could make a computer one, but it wouldn't be very useful for many people because nobody seems to use grayscale in BASIC anymore.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 03:47:30 pm
Yeahh....
BTW, is this the best grayscale routine or is the one used for rigview better?
Off topic:
Could you help me with my game: http://ourl.ca/15236
Title: Re: Computer program to convert picture to calc grayscale?
Post by: shmibs on February 20, 2012, 05:23:42 pm
there is a fairly simple way to do what you want using the GIMP. you want to fill in areas that are all one colour with a specific patter, yes?
what you'd need to do is make images with small sections of the patterns you want to use so that, if it were tiled repeatedly, all the lines would match up at the tiles' edges, and then save it as a GIMP pattern (*.pat) file and copy it into the pattern folder wherever you have GIMP installed. from then on, it will appear in your list of patterns. then use the select by colour tool to limit your selection to only the colour you want to replace with the pattern, choose the bucket fill tool, set it to "fill whole selection" and "pattern fill" and you can fill the entire area with that pattern.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 05:26:37 pm
Actually, that is what I am doing right now.
But I wanted a very fast way of doing it so I do not have to do it myself.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: shmibs on February 20, 2012, 05:54:37 pm
that seems pretty fast to me, unless you have thousands of images. you're doing this, right?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 05:58:46 pm
Yes, I am doing that, but I have to do that 3 times for each image, then save it and everything else. All together that takes a while. That's why I need a program so I can convert tons and tons of files very quickly.
Title: Re: Computer program to convert picture to calc grayscale?
Post by: someone on February 20, 2012, 06:20:24 pm
I know that Irfanview (http://www.irfanview.com/) has an option to change the color depth to 2 colors (1 bpp) & that you can apply the changes to multiple images. Though I'm not sure if is what you're looking for...

Here's a page I found that mentions more or less how to do it:
http://imslp.org/wiki/IMSLP:Image_Conversion (http://imslp.org/wiki/IMSLP:Image_Conversion)
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 20, 2012, 06:22:23 pm
umm....
I don't think I can do exactly what I need to on IrfanView...
But thanks anyways. :)
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on February 23, 2012, 05:17:32 pm
BlakPilar-
Did you ever happen to make that program?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: Jonius7 on February 25, 2012, 05:34:23 am
If there was a program like this that did this nicely that would help greatly.
TokenIDE goes as far as to convert an image to black and white, but not greyscale unfortunately
Title: Re: Computer program to convert picture to calc grayscale?
Post by: nxtboy III on March 06, 2012, 10:07:16 pm
So there is no program to do this automatically? Could it be easily made?
Title: Re: Computer program to convert picture to calc grayscale?
Post by: Jonius7 on March 07, 2012, 05:42:35 am
OMG, sorry I didn't realised I'd posted the same post twice :P
It might be capably possibly to make, however I wouldn't have much of an idea myself though.