Crete SWT image from byte array

Discussion in 'Java' started by kfranic@gmail.com, Apr 22, 2006.

  1. Guest

    Hi all,
    I'm starting with SWT (I like it so far) but I have most stupid
    question that I can't find simple answer to...

    If I want to create AWT Image from byte array I use:
    byte[] buff =...;
    Image img = Toolkit.getDefaultToolkit().createImage(buff);

    How do I do same thing with org.eclipse.swt.graphics.Image?

    I have PNG image within one jar file from which I want to create SWT
    image object.

    I see that there are complex conversions available and this is not the
    approach I'd like to take...

    Regards,
    FrenKy
     
    , Apr 22, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Hammond
    Replies:
    1
    Views:
    3,912
    bruce barker
    Nov 26, 2003
  2. =?Utf-8?B?RGVhc3Vu?=

    Conversion issue: Image>Byte array>Image

    =?Utf-8?B?RGVhc3Vu?=, Jul 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,068
    =?Utf-8?B?RGVhc3Vu?=
    Jul 14, 2005
  3. Bharat Bhushan

    Appending byte[] to another byte[] array

    Bharat Bhushan, Aug 5, 2003, in forum: Java
    Replies:
    15
    Views:
    41,406
    Roedy Green
    Aug 5, 2003
  4. Kirby
    Replies:
    3
    Views:
    954
    Kirby
    Oct 8, 2004
  5. Replies:
    20
    Views:
    10,572
    licebmi
    Sep 7, 2009
  6. Ramon F Herrera

    Where can I download SWT? (SWT homepage)

    Ramon F Herrera, Dec 5, 2007, in forum: Java
    Replies:
    11
    Views:
    4,355
    Ramon F Herrera
    Dec 6, 2007
  7. Tom McGlynn
    Replies:
    4
    Views:
    1,082
    Mark Space
    Apr 19, 2008
  8. Tom McGlynn
    Replies:
    2
    Views:
    524
    Andreas Leitgeb
    Apr 18, 2008
Loading...