alpha

Android bitmap mask color, remove color

主宰稳场 提交于 2019-11-27 20:17:44
I am creating bitmap, next i am drawing second solid color bitmap on top of it. And now i want to change first bitmap, so solid color that i drawed on it will be transparent. Or simply, i want to remove all pixels of one color from bitmap. I havie tried every colorfilter, and xfermode with no luck, is there any other possibility to remove color other that doing it pixel by pixel? This works for removing a certain color from a bitmap. The main part is the use of AvoidXfermode. It should also work if trying to change one color to another color. I should add that this answers the question title

Any way to make plot points in scatterplot more transparent in R?

*爱你&永不变心* 提交于 2019-11-27 17:35:21
I have a 3 column matrix; plots are made by points based on column 1 and column 2 values, but colored based on column 2 (6 different groups). I can successfully plot all points, however, the last plot group (group 6) which was assigned the color purple, masks the plots of the other groups. Is there a way to make the plot points more transparent? s <- read.table("/.../parse-output.txt", sep="\t") dim(s) [1] 67124 3 x <- s[,1] y <- s[,2] z <- s[,3] cols <- cut(z, 6, labels = c("pink", "red", "yellow", "blue", "green", "purple")) plot(x, y, main= "Fragment recruitment plot - FR-HIT", ylab =

what's the difference between view's hidden = yes and alpha = 0.0f

北战南征 提交于 2019-11-27 17:20:05
问题 I have a question about UIView , what's the difference between views hidden, alpha and opaque? The effect of setting view: hidden = yes and view.alpha = 0.0f is the same. 回答1: The differences are subtle. According to the UIView class reference: opaque tells the system that the view has no transparency and is thus faster to render because calculations for blending can be skipped hidden is boolean property that changes only the visibility of the current view and hides it from ui events. alpha

SVG fill color transparency / alpha?

核能气质少年 提交于 2019-11-27 16:46:06
Is it possible to set a transparency or alpha level on SVG fill colours? I've tried adding two values to the fill tag (changing it from fill="#044B94" to fill="#044B9466"), but this doesn't work. Williham Totland You use an addtional attribute; fill-opacity : This attribute takes a decimal number between 0.0 and 1.0, inclusive; where 0.0 is completely transparent. For example: <rect ... fill="#044B94" fill-opacity="0.4"/> Additionally you have the following: stroke-opacity attribute for the stroke opacity for the entire object As a not yet fully standardized solution (though in alignment with

iOS controlling UIView alpha behaviour for subviews

。_饼干妹妹 提交于 2019-11-27 12:06:18
In my example, I have 3 views: one red view containing two white views. I change the red container view's alpha to 0.3 and this happens (look at the image, the current result). By seeing this, I can only assume (tell me if I'm wrong) that setting a view's alpha will also set all of its subviews' alphas. My question is : is there a way to simply tell the red view to act as a whole so that setting its alpha would give something that looks like the wanted result (in the image)? This is what it looks like without any alpha : Check out the possible UIKit keys for Info.plist, specifically

How to use alpha transparency in OpenGL?

懵懂的女人 提交于 2019-11-27 11:36:16
问题 Here's my code: void display(void); int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable( GL_BLEND ); glutInitWindowSize(600,600); glutInitWindowPosition(200,50); glutCreateWindow("glut test"); glutDisplayFunc(display); glutMainLoop(); return 0; } void display() { glClear(GL_COLOR_BUFFER_BIT); glPointSize(8); glBegin(GL_POINTS); glColor4f(.23,.78,.32,1.0); glVertex2f(0,0); glColor4f(.23

iPhone: Changing CGImageAlphaInfo of CGImage

﹥>﹥吖頭↗ 提交于 2019-11-27 10:21:43
问题 I have a PNG image that has an unsupported bitmap graphics context pixel format. Whenever I attempt to resize the image, CGBitmapContextCreate() chokes on the unsupported format I receive the following error (error formatted for easy reading): CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component colorspace; kCGImageAlphaLast; 1344 bytes/row. The list of supported pixel formats definitely does not support this combination. It appears I

Remove alpha channel in an image

陌路散爱 提交于 2019-11-27 09:55:15
问题 I have an app icon for iOS but Apple doesn't allow alpha to be in the image. How to remove this alpha channel? I only have the png image with me I don't have the source file as my friend did the image for me. 回答1: Assuming you don't have another image editor, then you can open it in Preview on your Mac, and use the Export option to resave it in a different format- to ensure you get rid of the alpha channel, it might be best to export to JPG (best quality), then open that and export it as a

JPEG image with alpha channel on website [closed]

和自甴很熟 提交于 2019-11-27 05:42:13
问题 I would like to make a JPEG image file with some pixels that are partially transparent or fully transparent, similar to a PNG file with an alpha channel. Is this possible? If so, how would I go about doing this? I would like to use the image on a website. If I try to do this, would it work in any or all of the popular browsers (IE 7+, Firefox, Safari)? Assuming it is possible, will it just work, or are there any tricks or hacks required to make it work? EDIT: Some of the replies say I can't

ios overlaying alpha channel video on another video

蓝咒 提交于 2019-11-27 05:39:45
I have been trying to create a video template which uses alpha channel video overlayed on the mp4 videos and images. This is how I need to create a video http://viewptch.ptchcdn.com/rendered/52b28a9f8d4f980f3a3f99c3_cb44bf2b/52b28a9f8d4f980f3a3f99c3_lrg_main_main.mov For overlaying alpha video on another videos, I have used AVAnimator, I was succeeded for playing a preview using AVFoundation, AVSynchronizedLayer and AVAnimator. When rendering video from composition, frames of alpha channel videos renders very slowly. I need to create a video with alpha channel video on top of another video.