0 Replies Latest reply on Oct 16, 2007 12:07 PM by obouillaud

    CF8 cfimage : color of a pixel ?

    obouillaud Level 1

      I'm looking for a way to remove useless whitespace around an image to make the smallest image as possible. The solution I was thinking about was to check the color of the first pixel (upper left) then loop and check the color of each pixel on the first line. If they are all white, I can go to the second line and so on. Same thing for left, right and bottom.
      At the end I would have 4 coord. of the 4 corners so I can crop my image.

      The problem I face is how to get the color of a x,y pixel ?

      Maybe I'm doing something very complicated and you have better suggestions...

      Here is a sample image of what I need to do :