Hello Sajjadul,
Sajjadul Islam wrote:
> Hi Carsten,
>
> thanks for the hint.
>
> But could not manage to identify which is greyscale or not.
>
> I read an greyscale image and then checkig with the following condition
> if it is a grey-scale image or not.
>
> if(tga->getPixelFormat() != Image::OSG_L_PF)
> {
> cout << "not a geryscale image......conversion necessary" << endl;
> }
>
> Even after i am reading a greyscale image the condition becomes true.
What value does tga->getPixelFormat() return ?
> What am i missing?
I suppose it means you actually have an RGB image that just happens to
be in shades of grey, i.e. for every pixel there is a red, green and
blue value, but they are all the same.
The only way I can think of to detect that would be to check all pixels
whether they are a shade of grey.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users