You Are Here:

Community: Developer Discussion Boards

#1 Old DrawImage vs DrawPixels - 2003-10-28, 12:31

Join Date: Sep 2003
Posts: 60
smb101
Offline
Regular Contributor
My tiled background currently draws 64 16x16 tiles using the drawImage function. If I was to use an array to store the pixels for each tile, and instead of using drawImage, use drawPixels would this have a significant performace increase?
Reply With Quote

#2 Old 2003-10-28, 12:35

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
Yes on Series 40
No on Series 60.

Search the Forum. Recently there've been huge discussions of the issue
Reply With Quote

#3 Old 2003-10-29, 17:22

Join Date: Mar 2003
Posts: 61
Location: Merseyside
EvilCartman
Offline
Regular Contributor
Not sure if anyone else has this, but i've found that drawPixels is faster for drawing lots of tiles than drawImage on s60.

However drawing large images, like the background, are alot slower using drawPixels than drawImage.
Reply With Quote

#4 Old 2003-10-29, 23:28

Join Date: Aug 2003
Posts: 134
dannyc4
Offline
Regular Contributor
Huh? If you draw a large image you would use only one method call, so why would drawing 1000 small image be faster then?
Reply With Quote

#5 Old 2003-10-29, 23:30

Join Date: Aug 2003
Posts: 134
dannyc4
Offline
Regular Contributor
Mmm, on the other hand thinking of it, drawImage will have some overhead and so will drawPixels have.... Maybe drawPixels has more overhead on actually drawing a pixel, but less on initialisation/setup.
Reply With Quote

#6 Old 2003-10-30, 09:34

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Quote:
Huh? If you draw a large image you would use only one method call, so why would drawing 1000 small image be faster then?
I believe he meant that drawing 100 small images with drawPixels is faster than drawing 100 small images with drawImage. As opposed to drawing one big image which is faster with drawImage.

shmoove
Reply With Quote

#7 Old 2003-10-30, 11:03

Join Date: Mar 2003
Posts: 61
Location: Merseyside
EvilCartman
Offline
Regular Contributor
Quote:
I believe he meant that drawing 100 small images with drawPixels is faster than drawing 100 small images with drawImage. As opposed to drawing one big image which is faster with drawImage
Yeh i did :), sorry if i didn't make that clear.
Reply With Quote

#8 Old 2003-10-30, 12:00

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
What is the size of image when these methods are equally fast?
Does anybody want to perform a test? :)
Reply With Quote

#9 Old 2003-11-04, 21:31

Join Date: Aug 2003
Posts: 134
dannyc4
Offline
Regular Contributor
Just can't keep my mind off that s60 drawing thing... Another question:

You could use drawPixels() in two fashions:

* create offscreen Image using DC; use drawPixels() to fill offscreen Image; use drawImage() to blit offscreen Image to display in paint() method.

* use drawPixels() to directly blit to display in paint() method.

Did anyone ever tried both? Is it any faster to use drawPixels() in an offscreen Image than directly to screen?
Last edited by dannyc4 : 2003-11-04 at 21:38.
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