You Are Here:

Community: Developer Discussion Boards

#1 Old DirectGraphics.getPixels(...) doesn't using it's DirectGraphics context - 2003-04-17, 10:23

Join Date: Mar 2003
Posts: 5
Location: Kaliningrad, Russia
Send a message via ICQ to dmonk
dmonk
Offline
Registered User
Hello,

I'm trying to unpack png image into memory.
I've done this using Nokia UI API on folowing way:

Image img = Image.createImage("/img/test.png");
Graphics gr = img.getGraphics();
DirectGraphics dgr = DirectUtils.getDirectGraphics(grBG);
pixels = new short[img.getWidth()*img.getHeight()];
dgr.getPixels(pixelsBG, 0, img.getWidth(),
0,0, img.getWidth(), img.getHeight(),
DirectGraphics.TYPE_USHORT_4444_ARGB);

After that in array I'm getting pixels of currently displayed
on the screen Displayable object, but not the pixels of
test.png image. I've tested this on:
- Nokia_Series_40_MIDP_Concept_SDK_Beta_0_3
- Series_60_MIDP_SDK_for_Symbian_OS_v_1_0

My questions are:
a) what I'm doing wrong?
b) Is it possible somehow to unpack png image by using
standart libraries?
c) Is there any other ideas how to do this.

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