Hi Yang and list,

    Yep, I know, wrong!!!  Sorry, been a long day or something like that.
Even so, the type of error you ar getting indicates something like a missing
semicolon, bracket or brace.  In the absence of more code, comment out the
offending line and or surrounding lines to see where that leads you.



                                                        Joe Sam



Joe Sam Shirah
Autumn Software
What you don't know DOES hurt you...and your business
___________________________________________



>    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
>
>
>-----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".

Reply via email to