argb

Regex for matching ARGB Color (-44830298)

hey all, i'm trying to get Color information that i've stored in a text file and then use that color as the forecolor for a label. BUT, at run time when i click the button to do it, it doesnt give me any error messages or anything. the code i have is below: MatchCollection lines = Regex.Matches(File.ReadAllText(Path), @"(.+?)\r\n""([^...

convert 24bit RGB to ARGB16

hi, i am reading a 24bpp bitmap , and i need to convert each pixel from RGB24 to ARGB16. i am using this : #define ARGB16(a, r, g, b) ( ((a) << 15) | (r)|((g)<<5)|((b)<<10)) but the output it's not what i need, can someone offer some help ? thank you. ...

Geting a inverted result from using FromArgb R = B? where does this fail?

the R and B gets error when using this logic, i cant seem to find what im doing wrong, my workaround in the end were i flip the r and b is not good at all and im trying to find where the logic breakes. the label1.Text = colorX; shows R=255, G=0, B=0 when it shold be R=0, G=0, B=255, where does this fail? using System; using System.Coll...

Actionscript 3.0 Translating HEX to ARGB

i'm studying getPixel32() and the Bitmap and Bitmap Data classes. Basically, i'd like to know how to output a simple trace of an ARGB from a hexadecimal value. as an aside, i'm under the impression, which i assume/hope is wrong, that hexadecimal values can't produce as many colors as RGBA values. perhaps "web safe" has thrown me off...

Converting uint color to argb hexadecimal for kml color

Good day everyone, I am stuck trying to convert a uint color value into its equivalent argb hexadecimal format. Basically, I am trying to convert a color from Flex(AS3) into its appropriate kml color, which is in the argb hexadecimal format from what I gather. Below is my function as it stands now. Although it does convert into a val...

C++ Converting image to integer array

How would I go about converting the pixels in an image (.png file) to an integer array, where each pixel is converted to its ARGB integer equivalent? Not a 2D integer array by the way, a 1D one (where access is through array[row*width+col]). Thanks. ...

How do I Convert ARGB value from string to colour?

I am trying to use the MakeColor method in the GDIPAPI unit but the conversion from int to byte is not returning me the correct value. Example var argbStr: string; A, R, G, B: Byte; begin argbStr := 'ffffcc88'; A := StrToInt('$' + Copy(AValue, 1, 2)); R := StrToInt('$' + Copy(AValue, 3, 2)); G := StrToInt('$' + ...

Implementing ToArgb()

Hello -- System.Drawing.Color has a ToArgb() method to return the Int representation of the color. In Silverlight, I think we have to use System.Windows.Media.Color. It has A, R, G, B members, but no method to return a single value. How can I implement ToArgb()? In System.Drawing.Color, ToArgb() consists of return (int) this.Value; ...

Android - Read PNG image without alpha and decode as ARGB_8888

I try to read an image from sdcard (in emulator) and then create a Bitmap image with the BitmapFactory.decodeByteArray method. I set the options: options.inPrefferedConfig = Bitmap.Config.ARGB_8888 options.inDither = false Then I extract the pixels into a ByteBuffer. ByteBuffer buffer = ByteBuffer.allocateDirect(width*heigh...

Apply ARGB color to a textview programmatically.

I'm currently using something like: TextView.SetBackgroundColor(Color.WHITE); in my java code. I'd like to be able to add some transparancy to the textview through the java... This is easy to do in the XML via #AARRGGBB format, but I have not found a way to accomplish this programmatically. ...

What does the >> operator do in C#?

Hello, I'm quite new to C# and trying to do a basic image processing software. I understand this snippet extracts A,R,G,B from an ARGB int value of a WriteableBitmap pixel "current" for(int i = 0; i < bitmapArray.Length; i++) { var current = bitmapArray[i]; var alpha = (byte)(current >> 24); var red = (byte)(current >> 16)...

Encode/Decode CMYK Images from Flash Player

I'm currently working on an image editor in Flash Player, and I need to be able to export CMYK images to my server. I'm completely new to color profiles and the like, and I was wondering how I could accomplish this. I am pretty sure all images in Flash Player are ARGB, so is there a way to convert the values properly? ...

How to create a window with a bit depth of 32

Hi, I'm trying to create a X11 window with a bit depth of 32 so that I can use ARGB colors. Here's what I do: XVisualInfo vinfo; int depth = 32; XMatchVisualInfo(dpy, XDefaultScreen(dpy), depth, TrueColor, XCreateWindow(dpy, XDefaultRootWindow(dpy), 0, 0, 150, 100, 0, depth, InputOutput, vinfo.visual, 0, NULL); Here's what happe...

IPhone RGBA to ARGB

Hi, Im using glReadPixels to grab screen shots of my opengl scene and then turning them into a video using AVAssetWriter on IOS 4. My problem is i need to pass the alpha channel to the video which only accepts kCVPixelFormatType_32ARGB and glReadPixels on retrieves RGBA. So basically i need a way to convert my RGBA to ARGB, in other wor...