I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / MISC Areas / Mattel JuiceBox
JBP file conversion
availability of

New MessageJBP file conversion (modified 0 times) AlphA
Profile
I know of one command line application that will convert images to the proprietary 12 bit, 57k, 240x160 JBP file format. Has anyone else come up with a way to do this? I’d like to be able to do this from a few box’s. So, a windows version would be great, too. Resizing to 240X160 is easy. The 12bit part has me stumped.
http://www.bigmech.com
http://www.bigmech.com.nyud.net:8090/misc/juiceboxhack/juiceboxhack.html
06-18-2005 18:07:08

New MessageRE:JBP file conversion (modified 0 times) teched
Profile
> I know of one command line application that will convert images to the proprietary 12 bit,
> 57k, 240x160 JBP file format. Has anyone else come up with a way to do this?

Yes, there are multiple ways to do it. What application do you already know about?

> The 12bit part has me stumped.

In what way does the 12bit part have you stumped? What do you have now?

Jacob

06-18-2005 18:57:36

New MessageRE:JBP file conversion (modified 1 times) AlphA
Profile
"Yes, there are multiple ways to do it. What application do you already know about?"

How about photoshop? I use it a lot and assumed it could convert virtually anything to anything. But, I have yet to find a way to export anything 12 bit.

06-18-2005 19:03:12

New MessageRE:JBP file conversion (modified 0 times) teched
Profile
> How about photoshop? I use it a lot and assumed it could convert virtually anything to anything.
> But, I have yet to find a way to export anything 12 bit.

I am not an Adobe Photoshop user, perhaps someone else can help you there.

Have you considered contacting Adobe for either support or a feature request?

http://www.adobe.com/support/main.html
http://www.adobe.com/support/feature.html

Jacob

06-18-2005 19:13:49

New MessageRE:JBP file conversion (modified 0 times) AlphA
Profile
Perhaps I will. Thanks for the links.
You mentioned multiple ways. What did you have in mind? What do you use?
06-18-2005 19:33:37

New MessageRE:JBP file conversion (modified 0 times) AlphA
Profile
"In what way does the 12bit part have you stumped? What do you have now?"

I understand the format, but I have yet to find a way to automate the process, short of learning machine code and hacking out my own conversion tool.

Juicebox images appear to be saved in a simple raw, interleaved RGB format. In hex, the values simply follow the placement format of: RGBRGBRG… However, every raw image I’ve came across in the PC world has been: RRGGBBRRGGBBRRGG…

So, a pixel with max red color would be (hex):F00 on a juicebox and FF0000 in raw image format.

EG. If I had an image with every pixel alternating between black and white, a juice box image would appear as follows (hex): FFF000FFF000FFF000…
However, the same image in raw format (example: saved from photoshop as .raw, header=0, channels in interleaved order) would appear as: FFFFFF000000FFFFFF000000FFFFFF000000…
The conversion is pretty simple. I’m surprised one isn’t already available for both linux and windows. That would solve everyone’s image woes.

06-19-2005 02:15:44

New MessageRE:JBP file conversion (modified 0 times) AlphA
Profile
Ok. I went ahead and wrote my own (sorta).
http://www.bigmech.com/misc/jb_ami_cnv/jb_ami_cnv.html
06-19-2005 09:44:46

New MessageRE:JBP file conversion (modified 0 times) teched
Profile
> You mentioned multiple ways. What did you have in mind? What do you use?

One way, you later indicated yourself, division. Another way is the method I used, a table of values.

The division method your script/program uses does divides every byte by 16, does it not? (I'm not familar with AMOS Basic files.)

The method I used has the math precalculated, and fixed (hardcoded), in the source and "looks up" the 8 bit value in the table and gets the corresponding 4 bit value.

A mixed method, would calculate the table of 16 4 bit values that correspond to the 256 8 bit values, at run time.

> The conversion is pretty simple. I’m surprised one isn’t already available for both linux and windows.

One isn't? (Check the Picture Format thread)

> That would solve everyone’s image woes.

Not everyone's image woes are solved.

> Ok. I went ahead and wrote my own (sorta).

Sorta?

Did you have to learn machine code?

Jacob

06-19-2005 20:11:27

New Messageconversion for OSX user with X11/GIMP to get images to .jbp format (modified 0 times) ignoramous
Profile
I'm a total newbie so sorry for making your eyes roll.

Using OSX, is there a way I can use the perl script above, or GIMP?

If anybody could clue me in I would really appreciate the charity.

thanks.

06-19-2005 22:56:51

New MessageRE:JBP file conversion (modified 0 times) Tom61
Profile | Email
>The conversion is pretty simple. I’m surprised one isn’t already available for both linux and windows. That would solve everyone’s image woes.

Up until fairly recently, nobody had made a homebrew SD card interface, which means you bought the MP3 player kit, which comes with the software to convert images, so that explains why there's no established homebrew program to convert images under Windows. Teched's program will appearently work under Windows using a Perl interpretter, the trouble is getting a headerless 24bit bitmap.

>Using OSX, is there a way I can use the perl script above, or GIMP?

There's GIMP for OS X, and OS X should include support perl scripts from the terminal.

06-20-2005 14:11:27

New MessageRE:JBP file conversion (modified 0 times) joe_the_evil
Profile
If anybody wants it, i've written an image converter in QB with some asm svga librarys, though, any part of the image outside of (240,160) will not be saved. also, it only does BMPs, but they can be 8 or 24 bit, also, it dosen't really convert it, it just loads the image on the screen, then saves it as a *.jbp loadable file. i won't bother compiling (or posting) it unless someone wants it. (i know, i know. y'all think qb sucks and is for noobs, but how many qb programs have you seen that use 24 bit screenmodes?)
06-24-2005 22:19:57

New MessageRE:JBP file conversion (modified 0 times) angel
Profile
Please post it. I want it. Is it an exe? Do I need a vm of some sort?
angel
06-25-2005 14:46:10

New MessageRE:JBP file conversion (modified 0 times) joe_the_evil
Profile
No, not yet at least. i'm moving and won't have access to my computer at least until wedsday. (i'm using my mom's right now) anyway, when i compile it, it will be an ms dos excecutable. (.exe) but if you want the scource you'll need the library i used, it's called the 'future library' it's available at http://www.qb45.com
just look around and you'll find it. anyway, once my computer's set up i'll compile it and put it on my website. also (don't make fun) i don't know how to put a file up for download on my site! it's on the geocities site, can anyone help with this?
06-25-2005 16:23:55

New MessageRE:JBP file conversion (modified 0 times) joe_the_evil
Profile
Never mind, i've figured it out, but i still won't be able to post the program until about wedsday.
06-25-2005 19:32:45

New MessageRE:JBP file conversion (modified 0 times) joe_the_evil
Profile
since i won't be able to post my prog just yet, here's the math i used

to combine two 4bit numbers:
c = a * 16 + b
a = the first number, b = the second number, c = the 8bit output

a more advanced, but more useable algorythm:
byt1 = r1 * 16 + g1
byt2 = b1 * 16 + r2
byt3 = g2 * 16 + b2

if you're stupid, r = red, g = green, b = blue
byt1-3 are the 8bit outputs to write to the file

in my code, i used two for-next loops (one for x: 0 to 240, one for y: 0 to 160)
each cycle it adds the RGB data for the current pixel into an array (actually three, just linked),
when the array has 2 sets of rgb variables, it converts the two pixels into the 12bit rgb and writes it to the file
then it clears the array, and moves on the the next two pixels until it's done

06-26-2005 13:42:52

New MessageRE:JBP file conversion (modified 0 times) joe_the_evil
Profile
I've finally posted my converter software, i've also modified it to handle PCX and GIFs as well as BMPs.
it can be found at http://www.geocities.com/joe_the_evil_programmer
07-06-2005 12:12:23

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3