You Are Here:

Community: Developer Discussion Boards

#1 Old Drawing PNG images against Array Images - 2004-01-19, 18:18

Join Date: Aug 2003
Posts: 127
melas21
Offline
Regular Contributor
I would like to ask You if someone have any idea about efficiency issues those two operations. Lets say i have got an image like PNG size is 30x30 pixels and i am drawing it multiple times while moving and now the next example i have got the same image but in an array representation and i am doing the same thing which of these is faster method.

2. Is it possible to create an array of exact screen and create scens on the array and after that just paint the whole array (i think not but i might be wrong).

3. How to create small images and store them in array form??

I would be very greatful for any hints and answers.

MChmiel
Reply With Quote

#2 Old 2004-01-19, 20:11

Join Date: Dec 2003
Posts: 20
jarizappa
Offline
Registered User
I can answer the third question:


import java.io.IOException;
import javax.microedition.lcdui.*;


private Image[] baseImage = new Image[4];

for (int i = 0; i < 4; i++) {
try {
baseImage[i] = Image.createImage("/man" + i + ".png");
}
catch (IOException e) {
baseImage[i] = null;
}

}





baseImage[0] will contain a image named man0.png
baseImage[1] will contain a image named man1.png and so on...
Reply With Quote

#3 Old 2004-01-19, 22:55

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
I think what you're looking for are the com.nokia.mid.ui.* classes, specially com.nokia.mid.ui.DirectGraphics. It has methods to get an array of pixels out of a Graphics object, and to draw an array of pixels onto a Graphics object. But it will only work on Nokias.

shmoove
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ