alpha

Loading image onto MenuItem is losing transparency on pre-multiplied alpha image

这一生的挚爱 提交于 2019-12-10 12:17:37
问题 I am really in need of some help here. I am trying to load an image which I believe to be 32bpp with pre-multiplied alpha onto a MenuItem (I followed this guide to make the image in GIMP). I am aware of the ContextMenuStrip class and do not want to use it. The following is the code I am using to set the image onto the MenuItem: // apis [DllImport("user32.dll", SetLastError = true)] static extern bool SetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition, [In] ref MENUITEMINFO lpmii);

Android 2.2 - how do i set an spinner's alpha property?

删除回忆录丶 提交于 2019-12-10 10:54:20
问题 I'm trying to make a spinner totally transparent. In Android 4.0 I can do this setting the alpha property to 0 in the xml layout designer. But when I work with Android 2.2 i can't use that property, Eclipse mark it as an error and tell me that i can't use it. I tried to make it transparent writting this java code: final Spinner cmbCategorias = (Spinner) findViewById(R.id.cmbCategorias); cmbCategorias.getBackground().setAlpha(0); and it works, but the text in the spinner keeps visible. Someone

Android Custom View doesn't handle transparency/alpha the right way

荒凉一梦 提交于 2019-12-10 03:21:21
问题 I'm drawing a custom view. In this view I use two different paint and path objects to paint to the canvas. I'm basically drawing two shapes that overlap. After I add alpha, the part of the view that is overlapped is darker than the rest of the image. This is undesired, but I'm not sure how to fix it. This is a clipping of my code to show how I'm using alpha in my NewButtonView.java Paint paint = new Paint(); int color = 0x33ffffff; int borderColor = 0xFF000000; paint.setColor(color); paint

Alpha blending a red, blue, and green image to produce an image tinted to any rgb value?

坚强是说给别人听的谎言 提交于 2019-12-10 00:03:21
问题 Basically, I have a context where I can't programatically tint an image, though I can change it's alpha value. With some experimentation, I've found that I can layer a red, blue, and green version of the image, with specific alpha values, to produce a wide range of colors. However, I am wondering if it's possible to achieve a true RGB representation through this method? If so, what is the formula for converting an RGB value into different alpha values for the red, blue, and green layers. 回答1:

How to handle alpha compositing correctly with OpenGL

五迷三道 提交于 2019-12-09 17:46:27
问题 I was using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) for alpha composing as the document said (and actually same thing was said in the Direct3D document). Everything was fine at first, until I downloaded the result from GPU and made it a PNG image. The result alpha component is wrong. Before drawing, I had cleared the frame buffer with opaque black colour. And after I drew something semi-transparent, the frame buffer became semi-transparent. 回答1: Well the reason is obvious. With

ggplot2: different alpha values for border and filling of geom_point

﹥>﹥吖頭↗ 提交于 2019-12-09 16:42:48
问题 I want to plot my data as a dotplot using geom_point. My datapoints are overlapping, so I want to use jitter and transparency to increase visibility. Now I would also like to add a border to every datapoint to make it even more easier for the reader to see each datapoint. However, due to the alpha, it looks like my datapoints have halos around them. That's why I would like to use alpha only for the filling and alpha=0 for the border. But so far I haven't found a solution. I could plot two

Scale a Bitmap and preserve alpha, on BlackBerry

▼魔方 西西 提交于 2019-12-09 03:46:05
问题 I am trying to scale down a Bitmap that contains transparency. Unfortunately, all three methods I've tried result in white where there should be full transparency. I would like to maintain the transparency. The bitmap I am scaling is always square, so my functions assume that: private static Bitmap scale1(int edge, final Bitmap res) { int factor = edge == 0 ? Fixed32.ONE : Fixed32.div(res.getHeight(), edge); Bitmap scaled = PNGEncodedImage.encode(res). scaleImage32(factor, factor).getBitmap()

Can I delete published app in alpha testing from google play?

99封情书 提交于 2019-12-09 02:32:42
问题 I have published my application in alpha testing for testing purpose. Now I want delete it permanently from listing. So, Is it possible to delete published application in alpha mode? 回答1: If your app is in Alpha and no one has downloaded it. You have to unpublished your app first and then contact Google. They will delete your app for you. I had them delete 1 app for me. 回答2: If you has not published your application yet you can delete it. Once you publish it you can only unpublish it. So you

Transparent PNG in a div tag, not using alpha?

烈酒焚心 提交于 2019-12-09 01:29:28
I have an odd issue while beginning to learn CSS. This is a test page. It has a large transparent PNG covering the background color of solid blue. Typically the black image (which has transparent holes in it) completely blacks out my background color. In this example page I made the image's div transparent just to see if the background was still working. Any ideas why my alpha is getting completely ignored? Thanks all. It's because on .backgrounddiv you have background-color set to #000 . Instead use transparent to fix: .backgrounddiv { position:absolute; background-color: transparent;

How to clear pixel of BufferedImage in java?

六眼飞鱼酱① 提交于 2019-12-08 12:00:52
问题 In java, I read an image and then go through the pixels and if its color distance is < 30, then I want to clear the image by changing its alpha to 0. This is my code: But this is not working. It is having no effect... Does anyone see the problem? Thanks import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import javax.imageio