Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/divers.c
| Context not available. | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "imbuf.h" | #include "imbuf.h" | ||||
| #include "IMB_imbuf_types.h" | #include "DNA_imbuf_types.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_filter.h" | #include "IMB_filter.h" | ||||
| Context not available. | |||||
| if (rct_fl) { | if (rct_fl) { | ||||
| for (i = ibuf->x * ibuf->y; i > 0; i--, rct_fl += 4) | for (i = ibuf->x * ibuf->y; i > 0; i--, rct_fl += 4) | ||||
| rct_fl[0] = rct_fl[1] = rct_fl[2] = rgb_to_grayscale(rct_fl); | if (rct_fl[3] != 0.0f) { | ||||
| rct_fl[0] = rct_fl[1] = rct_fl[2] = rgb_to_grayscale(rct_fl); | |||||
| } | |||||
| } | } | ||||
| if (rct) { | if (rct) { | ||||
| for (i = ibuf->x * ibuf->y; i > 0; i--, rct += 4) | for (i = ibuf->x * ibuf->y; i > 0; i--, rct += 4) | ||||
| rct[0] = rct[1] = rct[2] = rgb_to_grayscale_byte(rct); | if (rct[3] != 0) { | ||||
| rct[0] = rct[1] = rct[2] = rgb_to_grayscale_byte(rct); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||