Results 1 to 3 of 3

Thread: how to make a specific image color transparent?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    how to make a specific image color transparent?

    hi,

    im a little bit confused about blending images at ovg.

    I have to do something like this:

    if ( imagepixel == RGB(A) ) set alpha of imagepixel = 0 ( transparent )

    I have implement this with GDI. How to do this ovg?

    Is there a way to do this without modify the image buffer of vgimage ?

    thanks.

  2. #2
    Senior Member
    Join Date
    Feb 2006
    Posts
    115

    Re: how to make a specific image color transparent?

    Well, you will need to tell OVG which pixels are transparent. This means that you will need to set the alpha value (aka transparency) in the image. You can either do this yourself by modifying the image buffer before you give OVG the image. It should be possible to come up with some way of using vgLookUp, vgLookUpSingle, vgColorMatrix, and/or VG_COLOR_TRANSFORM to accomplish the same effect, but honestly... why?

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    Re: how to make a specific image color transparent?

    well i have a UI Controls library witch have an DeviceContext that use GDI to render the controls and to be compatiblee with it i have to implement this functionality.
    Under wince there is a function called TransparentBLT wich have the same functionality.

    i have played a litte bit with color transform etc. but at the moment i am only able to give the hole image a alpha/ transparency.

    Can you give me an example how to do it to make a specific color transparent?

Similar Threads

  1. How to make eyes and mouth in a image animated and display
    By mathewi9 in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 03-29-2013, 06:09 PM
  2. how to make background of opengl window transparent
    By aditya.sen in forum OpenGL ES 2X - for programmable 3D graphics pipelines
    Replies: 3
    Last Post: 11-30-2009, 02:55 AM

Posting Permissions

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