alpha

Can the transparency of the link be specified in the list?

Can the transparency of the link be specified in the list? Question: Abstract I am trying to find a way to make the nodes transparent. In the simple case, the transparency of a node is simply specified by the "alpha" option of "nx.draw". However, I thought I could specify the transparency with a list, just …

Total answers: 2

how can i remove the black bg color of an image with no alpha layer

how can i remove the black bg color of an image with no alpha layer Question: So i started doing a game to pass the time and i don’t know how to solve this issue: my player is a part of a sprite sheet, the sprite sheet has a alpha layer so its transparent but …

Total answers: 1

saving an image with a transparent background

saving an image with a transparent background Question: i’ve got some issues with my program: minimap = pygame.Surface((100, 100)) background = pygame.Surface((minimap.get_width(), minimap.get_height())) background.fill((0, 0, 0)) background.set_alpha(0) minimap.blit(background, (0, 0, minimap.get_width(), minimap.get_height())) pygame.image.save(minimap, "minimap.png") the thing is, I want the background to be transparent because I display it on something else later on and i …

Total answers: 1

Pygame image transparency confusion

Pygame image transparency confusion Question: I have read the top 20 posts relating to this issue here, read many examples on Google, tried using .convert(), .convert_alpha(), tried with neither, tried with .png, .gif, tried with the top 5 different images on google. Please someone help me figure out how to make the pieces show with …

Total answers: 1

OpenCV imread transparency gone

OpenCV imread transparency gone Question: I have an image (a captcha) that I download from the web. When I loaded to opencv it seems to loose its properties or simply mixes the transparent background with the dark/black colors: Currently the code does nothing but loading a writing again: captchaImg = cv2.imread(‘captcha1.png’) cv2.imwrite("captcha2.png", captchaImg) I have …

Total answers: 2

Matplotlib: plotting transparent histogram with non transparent edge

Matplotlib: plotting transparent histogram with non transparent edge Question: I am plotting a histogram, and I have three datasets which I want to plot together, each one with different colours and linetype (dashed, dotted, etc). I am also giving some transparency, in order to see the overlapping bars. The point is that I would like …

Total answers: 3

Individual alpha values in scatter plot

Individual alpha values in scatter plot Question: I’m wondering if it is possible to have individual alpha values for each point to be plotted using the scatter function of Matplotlib. I need to plot a set of points, each one with its alpha value. For example, I have this code to plot some points def …

Total answers: 2

How to set opacity of background colour of graph with Matplotlib

How to set opacity of background colour of graph with Matplotlib Question: I’ve been playing around with Matplotlib and I can’t figure out how to change the background colour of the graph, or how to make the background completely transparent. Asked By: user179169 || Source Answers: If you just want the entire background for both …

Total answers: 2

PIL: Thumbnail and end up with a square image

PIL: Thumbnail and end up with a square image Question: Calling image = Image.open(data) image.thumbnail((36,36), Image.NEAREST) will maintain the aspect ratio. But I need to end up displaying the image like this: <img src=”/media/image.png” style=”height:36px; width:36px” /> Can I have a letterbox style with either transparent or white around the image? Asked By: Paul Tarjan …

Total answers: 7