Hi Yang,
As noted in your listing,
>Compliation Error
>*******
>Identifier expected.
this is a compiler error, not really a 2D or drawImage thing at all. If
your submitted code accurately reflects the real code, the problem is likely
at:
>int ih = img.getHeight(this);
>private static BufferedImage bi = new <<<<<<<<<<<<<<<<<<<<<<<<
>BufferedImage(iw,ih,BufferedImage.TYPE_INT_RGB);
change this to
>private static BufferedImage bi = new;
that is, put a semicolon at the end of the statement.
Joe Sam
Joe Sam Shirah
Autumn Software
What you don't know DOES hurt you...and your business
___________________________________________
-----Original Message-----
From: Yang Chen <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, October 19, 1999 2:01 PM
Subject: [JAVA2D] drawImage
>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".