Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Dec 2007

    Exclamation get rgb values from getSnapshot()


    i have this code snippet:

    byte snap[] = videoControl.getSnapshot("encoding=png");
    Image img = Image.createImage(snap, 0, snap.length);
    int pixelValues[] = new int[img.getWidth * img.getHeight);
    img.getRGB(pixelValues, ...);
    in which the array pixelValues[] will have the RGB data of each pixel in the image. the problem is that my application slows down at createImage(), considering that this snippet loops. i don't really need to display the image.

    i know that snap[] contains the data of the image encoded in png format.

    my question is, is there a way to obtain the RGB pixel values straight from snap[] without using createImage()? code would be very much appreciated.

    advance thanks!
    Last edited by arnoldcruz; 2008-01-21 at 06:41.

Similar Threads

  1. How to get RGB values from PNG Data byte[]
    By allypone in forum Mobile Java Media (Graphics & Sounds)
    Replies: 11
    Last Post: 2009-09-09, 17:37
  2. How to draw RGB arrays to screen(after YUV to RGB)
    By kdwx in forum Symbian Media (Closed)
    Replies: 19
    Last Post: 2009-01-05, 13:06
  3. Incorrect rgb values for jpg images on S40 3rd ed
    By bjudfar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-05-29, 16:34
  4. Replies: 0
    Last Post: 2006-02-22, 10:01
  5. display of RGB Data
    By amrutz in forum Symbian
    Replies: 1
    Last Post: 2003-02-09, 15:25

Posting Permissions

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