×

Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Regular Contributor
    Join Date
    Dec 2012
    Location
    Indonesia,DKI Jakarta
    Posts
    87

    Re: Image.createImage(byte[] bytes, int offset, int len) does not works

    Quote Originally Posted by grift View Post
    Had a look, and have had as little luck as you have had. Is there any reason why you can't just use LCDUI instead of LWUIT? If you must use LWUIT, can you not just create the image by passing down the path of the image instead?
    Code:
    Image imgLogo = Image.createImage("/logo.png");
    Having said that, there should be no reason why the code you have doesn't work, especially considering it works perfectly for LCDUI.
    Ah, you got stuck as i had. I can create image with just passing down the path of the image. But my focus here, I am trying to create image from byte array. It is more efficiency for resource used. I can't used LCDUI it because i have to refactored all of my code that based on LWUIT framework. So, Is this a LWUIT bug on Image.createImage with byte array..?. Because it works perfectly with LCDUI.

  2. #17
    Registered User
    Join Date
    Mar 2013
    Location
    United Kingdom
    Posts
    161

    Re: Image.createImage(byte[] bytes, int offset, int len) does not works

    Quote Originally Posted by muhamad.iqbal View Post
    Ah, you got stuck as i had. I can create image with just passing down the path of the image. But my focus here, I am trying to create image from byte array. It is more efficiency for resource used. I can't used LCDUI it because i have to refactored all of my code that based on LWUIT framework. So, Is this a LWUIT bug on Image.createImage with byte array..?. Because it works perfectly with LCDUI.
    It could be a bug - I certainly don't see how your code could be wrong, both LWUIT and LCDUI implementations of createImage() have the same method signature. I would suggest that you raise a defect ticket with the LWUIT project at the following location. For now, I would suggest you use the path, I can't imagine that it is much more heavyweight than loading the image into a byte array (if at all).

  3. #18
    Regular Contributor
    Join Date
    Dec 2012
    Location
    Indonesia,DKI Jakarta
    Posts
    87

    Re: Image.createImage(byte[] bytes, int offset, int len) does not works

    Ok, i already put as the defect ticket. For now, i use path for create image while i am trying to fixed the bug or waiting lwuit developers to fixed that bug..?


    Thank You, Grift

  4. #19
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,764

    Re: Image.createImage(byte[] bytes, int offset, int len) does not works

    Could you check if the example https://www.developer.nokia.com/info...IT_RLinks.html produces the same behaviour? Theoretically it uses the same method for decoding images (see line 92 of https://projects.developer.nokia.com...12ad8b60262796).

  5. #20
    Regular Contributor
    Join Date
    Dec 2012
    Location
    Indonesia,DKI Jakarta
    Posts
    87

    Re: Image.createImage(byte[] bytes, int offset, int len) does not works

    Quote Originally Posted by wizard_hu_ View Post
    Could you check if the example https://www.developer.nokia.com/info...IT_RLinks.html produces the same behaviour? Theoretically it uses the same method for decoding images (see line 92 of https://projects.developer.nokia.com...12ad8b60262796).
    Ok, wizard_hu i will check it.

Similar Threads

  1. Converting an image into bytes and writing the bytes into a file in glassfish folders
    By powerohit@gmail.com in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2011-03-06, 12:11
  2. Image.createImage --> one picture works, the other one not?
    By stechbeitel in forum Mobile Java General
    Replies: 5
    Last Post: 2009-04-14, 07:13
  3. Replies: 6
    Last Post: 2008-09-25, 18:09
  4. createImage(byte[],int,int) bug on Nokia 7650
    By bachin in forum Mobile Java General
    Replies: 3
    Last Post: 2005-09-16, 03:49
  5. createImage(byte[] argbData,...)
    By DarthSteff in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-08-19, 10:59

Posting Permissions

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