| Article: |
Bitmap Image Filters | |
| Subject: | handle alpha channel? | |
| Date: | 2002-08-09 17:19:22 | |
| From: | mikebeam | |
|
Response to: handle alpha channel?
|
||
|
That's part of the solution. The other part has to do with the alpha channel occupying the first 8 bits of a pixel, so you have to offset your red, green, and blue indices by 1. So i had something like the following in the inner for-loop:
|
||
Showing messages 1 through 2 of 2.
-
ah you had given me support by giving me a problem to solve
2002-08-10 10:16:59 psheldon [View]
-
friend Dan Van Bose in Fort Worth explained syntax
2002-08-11 14:40:41 psheldon [View]
c = boolean ? a : b
c evaluates to first symbol after ? if boolean true and second expression if false.
So, this sentence commands skipping by an offset if Alpha is there and mixing 3 colors only.
I understand now.



I don't get the syntax on right hand side of :
int ao = [srcImageRep hasAlpha] ? 1 : 0;
supposedly setting a0 to 1.
Are ? and : c operators and is this rhs c syntax?
My c pdf file from an old codewarrior has awful hypertexting.