×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    18

    how to get red() green() and blue() values from TRgb

    Hi

    I have a bitmap and I want to get an array with the colors.
    But my code does not work:+ TRgb* rgbtmp;
    for(TInt x = 0; x < width; x++) {
    for(TInt y = 0; y < height; y++) {
    image->GetPixel(*rgbtmp, TPoint(x,y));
    imageBuffer[x * y + 0] = (unsigned char)rgbtmp->Red();
    [...]

    How can I successfully call GetPixel() ? How do I have to declare my TRgb value rgbtmp?
    How do I call Red() to get the red value?
    Could someone enlighten me by changing my code?

    Thanks
    PengoX

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    18

    found out by myself

    I found it out by myself. It is rgbtmp.red() and not tmprgb->red();


    Thanks
    PengoX

Posting Permissions

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