You Are Here:

Community: Developer Discussion Boards

#1 Old Obtiaing Pixel Formats - 2003-03-24, 11:57

Join Date: Mar 2003
Posts: 1
jessle
Offline
Registered User
I'm using the getNativePixelFormat() to find the local pixel format of each phone.

Although the getNativePixelFormat() returns a value, when I place it in the follwoing code it throws the following error:
"java.lang.IllegalArgumentException: Display format not supported on device 4444".

private Image ImageSource(int array[], int width, int height) {
Image img = DirectUtils.createImage(width, height, 0xf0000000);
Graphics myG = img.getGraphics();
DirectGraphics dg = DirectUtils.getDirectGraphics(myG);
dg.drawPixels(array, true, 0, width, 0, 0, width, height, 0,
dg.getNativePixelFormat());
return img;
}

However if I place "8888" in the same code then it works. This is not logical as getNativePixelFormat() is returning 4444, not 8888.

Your help will be greatly apprecieted.
Reply With Quote

#2 Old 2003-03-27, 18:35

Join Date: Mar 2003
Posts: 4
Ghost RaideR
Offline
Registered User
I dunno really, if you're testing on a series 40 device or emulator the 444 should be correct cuz these devices use 12 bit color.
Anybody got insight on this one ?
Reply With Quote

#3 Old 4444 - 2003-03-27, 23:19

Join Date: Mar 2003
Posts: 6
malmrose
Offline
Registered User
If 4444 is the correct type (and I think it is), the pixel array needs to be an array of shorts, not ints.
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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X 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