Author Topic: Request for a Java Programmer  (Read 42706 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #30 on: December 21, 2010, 07:47:52 pm »
Here it is.

It's completely command-line (since I've never really done AWT stuff). Just put the .bmp file in the same directory as the .class file (to make things easier, so you don't have to type out the entire path) and run it with java bmp.class. It should detect nonexistent files, invalid filetypes, and some other common errors, but not invalid numbers for the width/height stuff (mostly because I'm not sure what to put there ;D). It outputs to a program with the same name as the bitmap (cut down to 8 characters if it's too long).

A couple of problems (not exactly bugs, since I put them in on purpose):
  • It only accepts monochrome images (with one bit per pixel). I don't know how to parse larger color resolutions, and I don't have time to figure it out today, sorry.
  • It doesn't accept compressed images. Occasionally bitmaps are compressed, like with RLE, and I can probably do that stuff on another day, but not today.
  • The character values it accepts for the starting and ending characters are in decimal. As I said, I don't have time today, but I can probably add a little routine later that converts hex to decimal.

Tell me if there are any real bugs :)

bmp28xp.class is the compiled CLASS file, bmp28xp.java is the source, testing.bmp is an example .bmp I used for testing, and TESTING.8xp was what it gave me when I typed in 6 for width, 8 for height, and 65 for both starting and ending character.

EDIT: Updated files here.
« Last Edit: December 21, 2010, 09:41:21 pm by Deep Thought »




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Request for a Java Programmer
« Reply #31 on: December 21, 2010, 07:49:47 pm »
Deep Thought: Are you releasing the source? I'd like to give it a try and make it GUI :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #32 on: December 21, 2010, 07:51:37 pm »
Yep, edited in.




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #33 on: December 21, 2010, 07:54:48 pm »
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone
« Last Edit: December 21, 2010, 07:55:51 pm by Hot_Dog »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Request for a Java Programmer
« Reply #34 on: December 21, 2010, 07:59:39 pm »
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #35 on: December 21, 2010, 08:00:38 pm »
Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

It's not needed until January anyways :D
« Last Edit: December 21, 2010, 08:00:52 pm by Hot_Dog »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #36 on: December 21, 2010, 08:04:16 pm »
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Sorry, now it's edited in.




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #37 on: December 21, 2010, 09:22:34 pm »
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

Btw, ScoutDavid, just a reminder: The program name should be exactly 8 characters, no more and no less.  The height/width should be no more than 16, no less than 1.  The starting character and ending character should be no more than 255, no less than 0.  Finally, the ending character cannot be smaller than the starting character.

As always, let me know of any questions!

Deep Thought, no problems so far ;D

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #38 on: December 21, 2010, 09:29:52 pm »
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

Btw, ScoutDavid, just a reminder: The program name should be exactly 8 characters, no more and no less.  The height/width should be no more than 16, no less than 1.  The starting character and ending character should be no more than 255, no less than 0.  Finally, the ending character cannot be smaller than the starting character.

As always, let me know of any questions!

Deep Thought, no problems so far ;D

Wait, you mean names for fonts have to be exactly 8 chars long?

Anyway, here's the bmp28xp files with the updates.
« Last Edit: December 22, 2010, 03:47:21 pm by Deep Thought »




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #39 on: December 21, 2010, 10:36:07 pm »
Wait, you mean names for fonts have to be exactly 8 chars long?


Yep 8)

I'm having trouble running a .class file.  What do I do?
« Last Edit: December 21, 2010, 10:36:58 pm by Hot_Dog »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #40 on: December 21, 2010, 10:38:48 pm »
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?
« Last Edit: December 21, 2010, 10:38:59 pm by Deep Thought »




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #41 on: December 21, 2010, 10:39:35 pm »
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?

Ah, I had ".class" at the end.  It's working now :D

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #42 on: December 21, 2010, 10:41:39 pm »
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?

Ah, I had ".class" at the end.  It's working now :D


Glad it works.

When I first tried Java that confused me too. javac requires the extension (.java), but not java :P
« Last Edit: December 21, 2010, 10:41:51 pm by Deep Thought »




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #43 on: December 21, 2010, 10:47:28 pm »
Deep Thought, do you invert the bitmap as you write it to an .8xp file?  I'm finding that's the case, and if so, 5 stars for you

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #44 on: December 21, 2010, 10:49:15 pm »
Deep Thought, do you invert the bitmap as you write it to an .8xp file?  I'm finding that's the case, and if so, 5 stars for you

Thank you ;D
« Last Edit: December 21, 2010, 10:49:29 pm by Deep Thought »