PDA

View Full Version : การ get RGB ของ PNG ไฟล์ใน J2ME MIDP 1.0 ทำอย่างไรครับ



Anonymous
15-01-2005, 01:56 PM
ช่วยบอกวิธีการ get RGB ของ PNG ไฟล์ใน J2ME MIDP 1.0 ทีครับ ทำต่อไม่ได้แล้วครับ ข้างล่างเป็นการ get PNG ครับ
ผมไม่สามารถ ดึงค่าสีของ PNG ไฟล์ออกมาได้ครับ
ใครพอรู่หรือพอมีcode ก็บอกกันด้วยนะครับ
จักเป็นพระคุณอย่างสูงครับ

------------------------------------------------------------
InputStream inputstream1 = getClass().getResourceAsStream(name1);

int ch;
int index = 0;
int len1 = inputstream1.available();

data1 = new byte[len1];
while ((ch = inputstream1.read()) != -1)
{
data1[index] = (byte)ch;
System.out.print(data1[index]+" ");
index++;
}
System.out.println("n"+index+"nn");
inputstream1.close();

<font color=white>Ref</font> (http://www.pantip.com/tech/comsci/topic/CS1704321/CS1704321.html)

Anonymous
17-01-2005, 03:58 PM
Anyone can help me?

labyrinth
18-01-2005, 06:08 PM
ใช่ได้เฉพาะ nokia ใช้ class DirectGraphics