View Full Version : importing sprites from Paint
powerpuff
01-19-2007, 04:21 AM
Hello does anyone know how to use sprites from the internet that's pasted to Paint. Then, it is imported to Java?? anyone heard of that idea? Thank you.
powerpuff
01-22-2007, 05:12 PM
no one knows : (?
I don't really understand what you want to do. Could you please clarify?
Do you want to load a picture that is currently open in Paint into a Java program? Or do you simple want to open a picture in a Java program?
powerpuff
01-25-2007, 03:36 AM
oh sorry, i want to load the picture from Paint to java so i can do some animation with it. This is what i got so far, i was also wondering why it isn't displaying anything? Would this be the proper way to do animation or do i need to store it in somewhere. i don't know how to not use Java Static Arrays, background = new Image(); doesn't work. This program works, but just doesn't show anything. Thanks.
public void init()
{
background = new Image[1];
Image background= getImage(getCodeBase(), "background.gif" );
}
public void paint( Graphics g )
{
Dimension d = getSize();
Image offScrImage = createImage( d.width, d.height );
Graphics og = offScrImage.getGraphics();
g.drawImage( offScrImage, 0, 0, this );
}
powerpuff
01-27-2007, 11:58 PM
Can someone help me write and display a simple sprite background from Paint without using static arrays, instead with ArrayLists. Thanks.
By displaying a simple background from paint..
Image background = getImage(getCodeBase(), + "blah.gif");
All the programs on the site does not make sense to me, other than that programs use static arrays. I was wondering if there's a simple sprite background display out there that someone can show me.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.