Talk:Loading PNG images with TWL's PNGDecoder
Please forgive me if my questions seem inane, I am new to LWJGL and not very experienced with Java.
I entered the code as displayed, but to eliminate errors, I had to do several things (note, I am using the eclipse IDE with Java 6.23):
1. I had to prefix 'Format.RGBA' with 'PNGDecoder.' (example code line 13). If I didn't do this, Eclipse gave me an unresolved symbol error. What am I missing that required me to qualify the reference?
I do have the following import statements in my class:
import java.io.*; import java.nio.*; import de.matthiasmann.twl.utils.PNGDecoder;
2. I had to add 'catch ( FileNotFoundException ex )' and 'catch ( IOException ex )' blocks to an outer try block. If I did not do this, I got unhandled exception errors (at example code lines 5, 7, 13, and 20). How is the example code compiling without handling these exceptions?
While I understand why no example was shown that detailed the process of displaying the loaded png, is there a reference elsewhere that details this process? For instance, do any of the demos use the PNGDecoder class?
Thanks for the class, and all your other efforts to make things easier for the rest of us.