×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    6

    how to convert ARGB8888 to YUV420

    Hi, everyone!

    how to convert ARGB8888 to YUV420

    Thanks very very very much!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: how to convert ARGB8888 to YUV420

    Have you considered searching for YUV in Wikipedia for example?

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to convert ARGB8888 to YUV420

    there are no inbuilt Symbian APIs that will do this you have to write your own.

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    6

    Re: how to convert ARGB8888 to YUV420

    Quote Originally Posted by wizard_hu_ View Post
    Have you considered searching for YUV in Wikipedia for example?
    I did. But there's examples which are all yuv420->rgb888, not as i said argb8888.

    ARGB8888 is 32bit BMP
    RGB888 is 24bit BMP

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: how to convert ARGB8888 to YUV420


  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how to convert ARGB8888 to YUV420

    Hi,

    You can use exactly the same algorithms for going to ARGB8888. There isn't any alpha information in the YUV, so you just need to set the alpa channel to 0xFF for every single pixel. If you leave it at zero then you will get a blank image because that means 100% transparent.

    Going from ARGB8888 the most obvious option is to ignore the alpha channel.

    The other solution is to pre-multiply all color values by the alpha value and divide by 0xFF. This has the effect of not changing fully opaque pixels, making semi-transparent pixels proportionately less bright and making fully transparent pixels black. This is probably not what you want but works for some odd cases.

    Sorcery
    Last edited by Sorcery-ltd; 2008-11-26 at 10:30.

Posting Permissions

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