¡@

Home 

2014/10/16 ¤W¤È 08:10:12

android Programming Glossary: argb

Confusion on YUV NV21 conversion to RGB

http://stackoverflow.com/questions/12469730/confusion-on-yuv-nv21-conversion-to-rgb

most significant position According implementation of int argb in Color.java R suppose to be at the most significant position... is as follow. public static void YUV_NV21_TO_RGB int argb byte yuv int width int height final int frameSize width height.. r 0 0 r 255 255 r g g 0 0 g 255 255 g b b 0 0 b 255 255 b argb a 0xff000000 r 16 g 8 b android share improve this question..

Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable's Hue

http://stackoverflow.com/questions/4354939/understanding-the-use-of-colormatrix-and-colormatrixcolorfilter-to-modify-a-draw

think each pixel would be a 1 x 4 vector containing the argb values e.g. 0.2 0.5 0.8 1 that would be dotted with the transformation..

How to set text color of TextView in code?

http://stackoverflow.com/questions/4602902/how-to-set-text-color-of-textview-in-code

Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor.. #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor Color.rgb 200 0.. Color.rgb 200 0 0 holder.text.setTextColor Color.argb 0 200 0 0 And ofcourse like xbakesx says if you want to define..

Access to raw data in ARGB_8888 Android Bitmap

http://stackoverflow.com/questions/5010545/access-to-raw-data-in-argb-8888-android-bitmap

pixel after 619e9e9e I understand that the order of the argb channels is different that's fine. But I don't want the alpha.. ToBuffer . android bitmap jni alpha transparency argb share improve this question My guess is that this might..

Convert bitmap array to YUV (YCbCr NV21)

http://stackoverflow.com/questions/5960247/convert-bitmap-array-to-yuv-ycbcr-nv21

getNV21 int inputWidth int inputHeight Bitmap scaled int argb new int inputWidth inputHeight scaled.getPixels argb 0 inputWidth.. int argb new int inputWidth inputHeight scaled.getPixels argb 0 inputWidth 0 0 inputWidth inputHeight byte yuv new byte inputWidth.. yuv new byte inputWidth inputHeight 3 2 encodeYUV420SP yuv argb inputWidth inputHeight scaled.recycle return yuv void encodeYUV420SP..

Rotating a bitmap using JNI & NDK

http://stackoverflow.com/questions/14398670/rotating-a-bitmap-using-jni-ndk

graphics Bitmap jstring configName env NewStringUTF ARGB_8888 jclass bitmapConfigClass env FindClass android graphics.. input and output bitmap must be with 8888 config which is ARGB input bitmap will be recycled during the process. the code rotates.. share improve this question Since you're using ARGB_8888 format every pixel is an uint32_t not uint16_t . Try changing..

Android: out of memory exception in Gallery

http://stackoverflow.com/questions/3238388/android-out-of-memory-exception-in-gallery

to calculate width height 4 bytes per image for regular ARGB images. width and height in px . The bitmaps consume native..

How to draw a filled triangle in android canvas?

http://stackoverflow.com/questions/3501126/how-to-draw-a-filled-triangle-in-android-canvas

maps using the code below in my draw method paint.setARGB 255 153 29 29 paint.setStyle Paint.Style.FILL_AND_STROKE paint.setAntiAlias.. And use this color for your path instead of your ARGB. Make sure the last point of your path ends on the first one..

Android Drop Shadow on View

http://stackoverflow.com/questions/3567312/android-drop-shadow-on-view

offsetXY Might need to convert shadowImage from 8 bit to ARGB here can't remember. Canvas c new Canvas shadowImage c.drawBitmap..

Android Edit Bitmap Channels

http://stackoverflow.com/questions/4560265/android-edit-bitmap-channels

possible to re combine separate channels back into an ARGB image. You just need the grayscale channel images and an image..

Extract black and white image from android camera's NV21 format

http://stackoverflow.com/questions/5272388/extract-black-and-white-image-from-android-cameras-nv21-format

a RGB8888 pixels int array. Where each int is a pixels ARGB. public static int convertYUV420_NV21toRGB8888 byte data int.. bm Bitmap.createBitmap pixels width height Bitmap.Config.ARGB_8888 Where pixels is your int array. share improve this answer..

Understanding colors in Android! (6 chars)

http://stackoverflow.com/questions/5445085/understanding-colors-in-android-6-chars

red green and blue . If you provide 8 hex digits it's an ARGB 2 hex digits for each value of alpha red green and blue respectively..

How to get a Bitmap from a raw image

http://stackoverflow.com/questions/5626795/how-to-get-a-bitmap-from-a-raw-image

So first thing you have to extend every byte to an 32 bit ARGB int. Alpha is 0xff and R G and B are copies of the source image's.. Bitmap bm Bitmap.createBitmap Width Height Bitmap.Config.ARGB_8888 bm.copyPixelsFromBuffer ByteBuffer.wrap Bits share improve..

Android bitmap mask color, remove color

http://stackoverflow.com/questions/6432965/android-bitmap-mask-color-remove-color

from this mutable bitmap Bitmap mb bmp.copy Bitmap.Config.ARGB_8888 true Canvas c new Canvas mb get the int for the colour.. colour which needs to be removed Paint p new Paint p.setARGB 255 255 0 0 ARGB for the color in this case red int removeColor.. to be removed Paint p new Paint p.setARGB 255 255 0 0 ARGB for the color in this case red int removeColor p.getColor store..

Causing OutOfMemoryError in Frame by Frame Animation in Android

http://stackoverflow.com/questions/8692328/causing-outofmemoryerror-in-frame-by-frame-animation-in-android

in a more memory efficient format like RGB 565 rather than ARGB 8888 . This would save some space but it still might not be..

Confusion on YUV NV21 conversion to RGB

http://stackoverflow.com/questions/12469730/confusion-on-yuv-nv21-conversion-to-rgb

a 10125048 72437 It assmes U comes first too R should be the most significant position According implementation of int argb in Color.java R suppose to be at the most significant position. However I went through the following code implementation.. or I have overlooked something Currently my implementation is as follow. public static void YUV_NV21_TO_RGB int argb byte yuv int width int height final int frameSize width height final int ii 0 final int ij 0 final int di 1 final int dj.. v 128 0.391f u 128 int b int 1.164f y 16 2.018f u 128 r r 0 0 r 255 255 r g g 0 0 g 255 255 g b b 0 0 b 255 255 b argb a 0xff000000 r 16 g 8 b android share improve this question First of all I am not super experienced with image encoding..

Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable's Hue

http://stackoverflow.com/questions/4354939/understanding-the-use-of-colormatrix-and-colormatrixcolorfilter-to-modify-a-draw

So this is where it starts to get fuzzy for me. So I would think each pixel would be a 1 x 4 vector containing the argb values e.g. 0.2 0.5 0.8 1 that would be dotted with the transformation matrix. So to double the red intensity of an image..

How to set text color of TextView in code?

http://stackoverflow.com/questions/4602902/how-to-set-text-color-of-textview-in-code

effect of course. Color.parseColor Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor Color.rgb 200 0 0 holder.text.setTextColor Color.argb.. Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor Color.rgb 200 0 0 holder.text.setTextColor Color.argb 0 200 0 0 And ofcourse.. Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor Color.rgb 200 0 0 holder.text.setTextColor Color.argb 0 200 0 0 And ofcourse like xbakesx says if you want to define your color in an XML file you can do this color name errorColor..

Access to raw data in ARGB_8888 Android Bitmap

http://stackoverflow.com/questions/5010545/access-to-raw-data-in-argb-8888-android-bitmap

before ef234567 value before 214161ef value after ffffff61 pixel after 619e9e9e I understand that the order of the argb channels is different that's fine. But I don't want the alpha channel to be applied upon every copy which is what it seems.. the same problem alpha being applied upon each copyPixelsFrom ToBuffer . android bitmap jni alpha transparency argb share improve this question My guess is that this might have to do with the byte order of the ByteBuffer you are using...

Convert bitmap array to YUV (YCbCr NV21)

http://stackoverflow.com/questions/5960247/convert-bitmap-array-to-yuv-ycbcr-nv21

Here is some code that actually works untested function byte getNV21 int inputWidth int inputHeight Bitmap scaled int argb new int inputWidth inputHeight scaled.getPixels argb 0 inputWidth 0 0 inputWidth inputHeight byte yuv new byte inputWidth.. byte getNV21 int inputWidth int inputHeight Bitmap scaled int argb new int inputWidth inputHeight scaled.getPixels argb 0 inputWidth 0 0 inputWidth inputHeight byte yuv new byte inputWidth inputHeight 3 2 encodeYUV420SP yuv argb inputWidth.. argb 0 inputWidth 0 0 inputWidth inputHeight byte yuv new byte inputWidth inputHeight 3 2 encodeYUV420SP yuv argb inputWidth inputHeight scaled.recycle return yuv void encodeYUV420SP byte yuv420sp int argb int width int height final int..

Rotating a bitmap using JNI & NDK

http://stackoverflow.com/questions/14398670/rotating-a-bitmap-using-jni-ndk

bitmapCls createBitmap IILandroid graphics Bitmap Config Landroid graphics Bitmap jstring configName env NewStringUTF ARGB_8888 jclass bitmapConfigClass env FindClass android graphics Bitmap Config jmethodID valueOfBitmapConfigFunction env GetStaticMethodID.. with uint32_t that's the bug on my code I've asked about . input and output bitmap must be with 8888 config which is ARGB input bitmap will be recycled during the process. the code rotates the image 90 degrees counter clock wise. Of course you.. and others here . android bitmap android ndk jni image rotation share improve this question Since you're using ARGB_8888 format every pixel is an uint32_t not uint16_t . Try changing your rotated Bitmap creation to use uint32_t for source..

Android: out of memory exception in Gallery

http://stackoverflow.com/questions/3238388/android-out-of-memory-exception-in-gallery

relevant. Since they're converted into bitmaps you need to calculate width height 4 bytes per image for regular ARGB images. width and height in px . The bitmaps consume native heap which usually doesn't show in a hprof. The hprof should..

How to draw a filled triangle in android canvas?

http://stackoverflow.com/questions/3501126/how-to-draw-a-filled-triangle-in-android-canvas

in android canvas So I'm drawing this triangle in android maps using the code below in my draw method paint.setARGB 255 153 29 29 paint.setStyle Paint.Style.FILL_AND_STROKE paint.setAntiAlias true Path path new Path path.moveTo point1_returned.x.. red.setColor android.graphics.Color.RED red.setStyle Paint.Style.FILL And use this color for your path instead of your ARGB. Make sure the last point of your path ends on the first one it makes sense also. Tell me if it works please share improve..

Android Drop Shadow on View

http://stackoverflow.com/questions/3567312/android-drop-shadow-on-view

2 Bitmap shadowImage originalBitmap.extractAlpha shadowPaint offsetXY Might need to convert shadowImage from 8 bit to ARGB here can't remember. Canvas c new Canvas shadowImage c.drawBitmap originalBitmap offsetXY 0 offsetXY 1 null Then put shadowImage..

Android Edit Bitmap Channels

http://stackoverflow.com/questions/4560265/android-edit-bitmap-channels

paint color channel share improve this question It is quite possible to re combine separate channels back into an ARGB image. You just need the grayscale channel images and an image with the alpha channel you want note that this is not an..

Extract black and white image from android camera's NV21 format

http://stackoverflow.com/questions/5272388/extract-black-and-white-image-from-android-cameras-nv21-format

@param width pixels width @param height pixels height @return a RGB8888 pixels int array. Where each int is a pixels ARGB. public static int convertYUV420_NV21toRGB8888 byte data int width int height int size width height int offset size int..

Understanding colors in Android! (6 chars)

http://stackoverflow.com/questions/5445085/understanding-colors-in-android-6-chars

6 hex digits that means RGB 2 hex digits for each value of red green and blue . If you provide 8 hex digits it's an ARGB 2 hex digits for each value of alpha red green and blue respectively . So actually you're changing from R B4 G 55 B 55 to..

How to get a Bitmap from a raw image

http://stackoverflow.com/questions/5626795/how-to-get-a-bitmap-from-a-raw-image

this question Android does not support grayscale bitmaps. So first thing you have to extend every byte to an 32 bit ARGB int. Alpha is 0xff and R G and B are copies of the source image's byte pixel value. Then create the bitmap on top of that..

Android bitmap mask color, remove color

http://stackoverflow.com/questions/6432965/android-bitmap-mask-color-remove-color

start with a Bitmap bmp make a mutable copy and a canvas from this mutable bitmap Bitmap mb bmp.copy Bitmap.Config.ARGB_8888 true Canvas c new Canvas mb get the int for the colour which needs to be removed Paint p new Paint p.setARGB 255 255.. true Canvas c new Canvas mb get the int for the colour which needs to be removed Paint p new Paint p.setARGB 255 255 0 0 ARGB for the color in this case red int removeColor p.getColor store this color's int for later use Next set.. Canvas c new Canvas mb get the int for the colour which needs to be removed Paint p new Paint p.setARGB 255 255 0 0 ARGB for the color in this case red int removeColor p.getColor store this color's int for later use Next set the alpha of the..

Causing OutOfMemoryError in Frame by Frame Animation in Android

http://stackoverflow.com/questions/8692328/causing-outofmemoryerror-in-frame-by-frame-animation-in-android

ways to use BitmapFactory.inPreferredConfig to load bitmaps in a more memory efficient format like RGB 565 rather than ARGB 8888 . This would save some space but it still might not be enough. If you can't allocate that much memory at once you have..