Hello all,

 I have trouble with the drawImage in the below. Does anyone can help?
Thank you in advance.


Image img = toolkitloadImage("huygens1.thm.gif");
int iw = img.getWidth(this);
int ih = img.getHeight(this);
private static BufferedImage bi = new
BufferedImage(iw,ih,BufferedImage.TYPE_INT_RGB);
Graphics2D g2 =  bi.createGraphics();
g2.drawImage(img , 0, 0, this);
int[] pixels = (img.getRaster()).getPixels(0,0,r.iw,r.ih,new int[r.iw*r.ih*3]);

Compliation Error
*******
Identifier expected.
g2.drawImage(img, 0, 0, this);
                ^

As I change to g2.drawImage(Image img, 0, 0, this); it showed

Type expected
g2.drawImage(Image img, 0, 0, this);
                        ^

Then I change to g2.drawImage(Image img, int 0, int 0, this); it showed

Identifier expected
g2.drawImage(Image img, int 0, int 0, this);
                                  ^

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to