Results 1 to 5 of 5

Thread: Identification of Trasparent color

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Answers
    5

    Identification of Trasparent color

    Hi all,
    Can anybody tell me how to find given color is transparent or not?

    $image=imagecreatefrompng("gans.png"); //transparent png image
    $bcolor_at = ImageColorAt ($image,$i, $j);

    I am using ImageColorAt function to get color at specified point ,now I just want to conform that "$bcolor" is trasparent color or istruecolor?


    Please help me in this situation.
    Thanks in Advance.

    -Gans


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Identification of Trasparent color

    $bcolor is truecolor not a transperant color.

    ----------------
    suresh


  3. #3
    Junior Member
    Join Date
    Mar 2007
    Answers
    5

    Re: Identification of Trasparent color

    But Suresh,at given position pixel may be of transparent color no?
    if we have provided x and y co-ordinates of image where there is transparency
    what "ImageColorAt" function will return?

    Thanks,
    Gans


  4. #4
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Identification of Trasparent color

    If you have provided x and y co-ordinates of image where there is transparency then you got the color code either "Gray" or "White". Because you are using "ImageColorAt" function, it returns only the image colors. Not a Background color.

    ---------------------
    suresh


  5. #5
    Junior Member
    Join Date
    Mar 2007
    Answers
    5

    Re: Identification of Trasparent color

    ok..thank you very much..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact