Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (616)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java 2D / Image to BufferedImage on: 2004-06-19 13:31:07
The subject says it all. Can anyone tell me how to convert an Image to a BufferedImage?

2  Game Development / Newbie & Debugging Questions / Reading BMPs in ImageIO on: 2004-06-18 19:02:19
From what I found java.imageio.ImageIO cannot read .bmp files. This is not good for me. Can anyone tell me of a different class that can read BMPs and preferably return a BufferedImage?

3  Java Game APIs & Engines / Java 2D / Re: Transparency on: 2004-06-15 22:47:31
This is what it printed:

DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000
4  Java Game APIs & Engines / Java 2D / Re: Transparency on: 2004-06-15 18:55:53
Sorry I took a while. The code compiles but throws an exception of type ClassCastException. It's thrown at the line:
IndexColorModel icm = (IndexColorModel)(loadedImage.getColorModel());

can anyone tell me why this is so?
5  Java Game APIs & Engines / Java 2D / Re: Transparency on: 2004-06-14 17:12:13
Thanks Abuse,

Its what I was looking for. One question though... what did you mean when you called "plied()"? Is it a typo? What package do I have to import?
6  Java Game APIs & Engines / Java 2D / Re: Rotate image on: 2004-06-14 15:18:09
Your best bet is probably to just create those rotation images outside your program. Then just load the files during runtime. I just create 8 similar images, each pointing in a different direction.

7  Java Game APIs & Engines / Java 2D / Transparency on: 2004-06-14 15:14:19
Does Java allow you to set a certain color transparent after the image has been loaded into memory? I don’t want to go through all my GIFs and make the background transparent. I remember that C# has a feature where you specify a pixel and its color becomes transparent. Does Java have this? Can anyone post some code?

8  Game Development / Newbie & Debugging Questions / Re: Loading Images on: 2004-06-10 16:04:48
OK Cheesy,

I'm very sorry to have been wasting your time. oNyx you were absolutely right and your advice is worth gold. I can't stop smiling. :-D. I just spent the last 3 days of my summer break on a simple mistake.

When I was saving the images using Microsoft Paint, I would write the following into the name edit box: image.gif. However, I would forget to change the format to gif. Assuming that Microsoft would do so automatically. This was the problem.

Again I apologize for my last 3 posts. Hey at least I learned something in the process.


PS: I'm really not stupid, just 15. So please don't hold my age and inattention to detail against me.

Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy Cheesy
9  Game Development / Newbie & Debugging Questions / Re: Loading Images on: 2004-06-10 14:06:55
OK, I made some progress. The problem arises when ImageIO calls the getImageReaders() method. I looked inside it but didn't understand what the problem was. Anyway, when it calls getImageReader() the method returns an empty Iterator. This is why it keeps returning null. What file formats does ImageIO support. I was using .gif and thought that it was supported. Can anyone help?

10  Game Development / Newbie & Debugging Questions / Re: Loading Images on: 2004-06-10 13:36:55
It still doesn’t work. When I attempt to load an image that I find on google images it works fine. But when I try to load them from my disk it (ImageIO) returns a null image. I use JBuilder so I put the image in the \classes directory. It (getResource) finds the image but when I pass the URL to ImageIO it still returns a null.

11  Game Development / Newbie & Debugging Questions / Loading Images on: 2004-06-10 13:25:37
I'm having some trouble loading images into my game. The images are currently saved in the directory where my class files are located. I'm using Windows 2000. I call the ClassLoader.getResource() method and it returns a URL that looks something like this: "file:C:/_Work/.../image.gif". Is this a valid URL to pass to the function or does the URL have to be an actual http address. I'm not sure that the question makes sense, but can anyone explain how to load images in Java.

Pages: [1]
Coldstream24 (17 views)
2015-09-02 15:41:28

Andrew_3ds (28 views)
2015-09-01 10:08:10

afikri (19 views)
2015-08-31 00:30:22

afikri (26 views)
2015-08-31 00:30:07

afikri (13 views)
2015-08-31 00:27:24

afikri (17 views)
2015-08-31 00:26:40

Roquen (30 views)
2015-08-29 02:30:54

GamerC4 (37 views)
2015-08-22 11:38:50

GamerC4 (34 views)
2015-08-22 11:37:18

GamerC4 (41 views)
2015-08-22 11:37:01
HotSpot Options
by Roquen
2015-08-29 02:33:11

Rendering resources
by Roquen
2015-08-17 03:42:29

Rendering resources
by Roquen
2015-08-17 00:36:56

Rendering resources
by Roquen
2015-08-12 22:40:51

Networking Resources
by Roquen
2015-08-12 22:40:43

List of Learning Resources
by gouessej
2015-07-09 02:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 02:34:43

List of Learning Resources
by PocketCrafter7
2015-05-30 20:37:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!