|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
pil and alpha
hi, ive got a string in "L" i convert to RGB, how do i add an alpha channel with an alpha based on the L value
|
|
#2
|
|||
|
|||
|
Trivial:
PHP Code:
|
|
#3
|
|||
|
|||
|
thanks, how do i display it now? im still getting the same alpha over the whole image. should i be using glBlendFunc(GL_SRC_ALPHA,GL_DST_ALPHA)
|
|
#4
|
|||
|
|||
|
also, should the alpha mask be from 0-255 ot 0.0-1.0?
|
|
#5
|
||||
|
||||
|
Quote:
Quote:
|
|
#6
|
|||
|
|||
|
sorry about the confusion, im having troubles varying the alpha in OpenGL. I can change the overall Alpha value using glColor4f but I see no varying alpha on the texture.
im assuming the alpha channel is int's 0-255 since the RGB channels are. the putalpha method comes up with no errors but i cant get getpixel(xy) to work. ive tried im.getpixel([x,y]) im.getpixel(x,y) temp=x*y im.getpixel(temp) |
|
#7
|
|||
|
|||
|
you've almost caught it
![]() Code:
im.getpixel((x, y)) Code:
(106, 106, 106, 196) |
|
#8
|
|||
|
|||
|
thanks man
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > pil and alpha |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|