Android :: Replace Any Colour In Bitmap Possible?
Oct 28, 2010Is there an easy way to replace a colour in a bitmap?

Is there an easy way to replace a colour in a bitmap?
I have a very large image and I only want to display a section the size of the display (no scaling), and the section should just be the center of the image. Because the image is very large I cannot read the entire image into memory and then crop it. This is what I have so far but it will give OutOfMemory for large images. Also I don't think inSampleSize applies because I want to crop the image, not lower the resolution.
Uri data = getIntent().getData();
Input Stream is = getContentResolver().openInputStream(data);
Bitmap bitmap = BitmapFactory.decodeStream(is, null, null);
Any help would be great?
I am 1) taking a picture and 2) then draw another Bitmap on top of it 3) then I store it
I am doing it as follows and it works on the emulator.
On the device I get a OutOfMemoryError: bitmap size exceeds VM budget android.graphics.Bitmap.nativeCopy(Native Method) android.graphics.Bitmap.copy(Bitmap.java:199) in the line copy the Bitmap to get a mutable Bitmap.
CODE:...........
What I am asking:
a) Is there a better way to do what I am doing? 1) take a picture 2) draw another Bitmap on top of it 3) then I store it
b) What is the best way to create a mutable Bitmap from the picture I just took with the camera?
In my app, resolution is not an issue. If it works better for small photos that would be fine.
I have two questions actually:
Is it better to draw an image on a bitmap or create a bitmap as resource and then draw it over a bitmap? Performance wise... which one is better?
If I want to draw something transparent over a bitmap, how would I go about doing it?
If I want to overlay one transparent bitmap over another, how would I do it?
My goal is the draw a bitmap onto another bitmap but rotated 90 degress. whats the most efficient way to do that. My current method is as follows which is horribly bad because it creates a new bitmap every time.
CODE:.....................
I want to draw a shape(many circles particularly) into a Specific Bitmap. I have never used canvas / 2D graphs etc. As i see it i create a Drawable put the bitmap in it then "canvas-it" to the shapes i want etc.
View 1 Replies View RelatedAnyone on the hero been able to get the LED to flash another colour other than green for notifications?, lots of market programs have the option to change colour for different events mine only ever flashes green. I assume this isn't a feature available on hero at moment, maybe it will be enabled in new version, I really could do with it.
View 1 Replies View RelatedI am finally about to pull the trigger on a SIM free Hero. I have an Orange contract, but I have read bad things about not being able to root the Orange phones due to changed unlock keys. I am also only halfway through my contract so SIM free is the only way to go for now. This brings me to a tough decision... which colour should I go for ?
White - does it really not get dirty ?
Mocha Brown
Black
Pink - no thanks, not for me
Graphite - not seen SIM free anywhere
I think I like the brown, but haven't seen one in the flesh. I am worried that the white one looks a bit too, Apple. Which did you go for, and why?
I'm trying to find the colour codes (ie hex, RGB(A) etc) for the Holo themes in Ice Cream Sandwich. I see that from the Android Developers website that they are defined in constants, but I need to get the actual values for use elsewhere. I've been searching like crazy for hours and the best I can do is a page that I can't even show you because I'm still a noob on the forum!
I have some values, but I wanted to match them up to the R.color documentation.
I want to change the background color but i'm having image in that activity too.. i tried several times but couldn't able to do so..how can i change background color if i'm already having an image in that activity..
View 3 Replies View RelatedIs there a definitive answer as to why the Desire's notification LED won't change colour? I've tried Handcent and got a blue light for SMS delivery, so clearly it is possible, so why can't any other notification app make use of the other colours? (Is there one out there that I've overlooked?) It seems odd that this simple bit of functionality is disabled on a phone that can do so much!
View 10 Replies View RelatedIs Desire available only in Graphite? There was news about silver and black. Graphite seems a bit dull in appearance.
View 15 Replies View RelatedThe HTC Desire has been the first phone in a pretty long time to get me excited and make me think "I want one!" Doing research just adds to that statement! But I still have one dilemma preventing me from buying currently: what colour to get?! I know, it's something completely basic and non-technical, but could mean a great deal. The main colour is named 'Graphite', known as brown/bronze and many more variations! What exactly is this colour? It intrigues me, looking on the internet, it can look purple, brown, grey, black! This is obviously the most common of the Desires and can be picked up unbranded, with original firmware, etc.
Another option is a black HTC Desire. I gather the black, which I feel I like best, is an Orange-exclusive. Over-branding on their part, but I see black non-branded HTC battery covers are coming out soon, so not a biggie. Further, their over-excessive branded firmware can removed and have it clean clean. Finally is the recently-released Silver variation, 'limited-edition' as they said on eXpansys, but I believe this is a common colour in Holland. Looks nice, but the extra price tag seems a sort of over-kill - probably not worth it. Let me know your opinions on any of this and help me decide. Particularly your thoughts on the standard HTC Desire 'graphite' colour! And I have seen some people switch from the graphite to the black versions - again, let me know which one you like best!
What is the nicest colour for Hero in your opinion.
View 49 Replies View RelatedI finally managed to get my phone rooted and onto 2.2 a while ago, but today I went to use the camera (don't use it that often)and noticed the colour balance was really messed up, it made everything really red. I assume this is a 2.2 issue.
View 3 Replies View Relatedi have one question ,how to remove the grey colour area?
View 2 Replies View RelatedIf it is possible to change the trackball light colour, i read about a guy who swears he had blue the first time he turned his hero on, and after resetting it went back to white,im sure its only white we will be able to achieve.
View 4 Replies View RelatedI've had a look around the forums but I'm struggling to find out how to change the colour of my active exchange calendar. I use Jorte on top of the stock calendar but it doesn't let me change the font colour as this is decided by the stock one.
My synced google calendars all appear in their relevant colours and if I change them online they will update accordingly. However everytime I create the active exchange its always orange and its not the easiest colour to read.
Is it possible to change the colour of the menu bar to dark instead of the silver it currently is?
View 2 Replies View Related"Better" includes, but is not limited to:
- pure aesthetics
- timelessness
- desirable after it gets older/dirtier/worn
It's possible to personalize the colour of a notification on status bar? When i get a notification, I see the black and white icon of the app on the status bar. It's possible to have a coloured icon instead of the black and white one? (For example the blu icon for the Facebook app, the green icon for whatsapp...)
View 5 Replies View RelatedI have a Galaxy Nexus running JB 4.2 and I've started playing around with (basic) customisation. Is it possible to change the colour of the Status and System Icons at the top of the screen from the default blue? Preferably to white. I have a nice dark look going courtesy of sammyycakes and others, the blue spoils it a bit.
View 6 Replies View Relatedi am creating a cm7 theme....... how to make it blue colour....
View 3 Replies View RelatedCan we get this done? It doesn't do any justice when we change the wallpaper and the colour of this Widget is always blue and boring to see the same colour quite often.
View 6 Replies View RelatedHow do you change the font style and colour of the words / letters when using SMS?
View 1 Replies View RelatedCan any one tell me is X8 going 2 come in black color? There r some websites which says its gonna come in black color. I know that it may be rumors that is why I am asking it on this Forum. May be some official word.I want this phone but only in black.
View 9 Replies View RelatedIs this correct? Will the new 2.1 update this month bring 16 million colour support to the x10?
View 7 Replies View RelatedI am using handcent for my sms. i think it is great, i can customize it heaps how i want it. however there is an option for changing the colour/rate of the LED blink light for when i get a text, however no matter what i pick it never changes. the little light at the top always blinks every 4-5 seconds in a green colour when i have a new message, however i would love for it to blink blue every second (as i have tried to set it) so that i can differentiate the notifications from reminders and other notifications. is this a problem with the phone not doing wat it is supposed to, or the application isnt working? or a combination, maybe the desire doesnt have any other colours for its LED light?
View 1 Replies View RelatedIs there anyway that I could change the colour of the weather icon in Statusbar using Beautiful Widgets? All icons In Statusbar are white and the weather one is grey... It might sound stupid and it probably is but it would be nice if I could change it, I haven't found any options about it in the settings except for the drop down menu weather text color. I'm talking about this:
View 1 Replies View RelatedI was wondering if anyone knows if there's an app to replace the ID Caller. I would love something similar to the iPhone, where the Picture when someone calls is huge. Just seems that so much screen space is lost on the Android.
View 2 Replies View Related