Changing Qr Code tint color and background color in android - google-contacts-api

I am an Android Developer. I need to create Qr Code with tint color : green, and background color : black. However without going through two nested loops because it's taking lots of time to create depending on the device's CPU. Any other solution?

Related

How does iOS get the background to seemingly change brightness over time?

I've noticed that my background on my MacBook Air seems to adjust to the time outside, growing darker as it gets darker.
Can I emulate this effect using CSS on my website.
What parameter are they varying and can I use a css filter to do similar?
It's not a parameter or filter, but multiple actual photographs.
https://www.idownloadblog.com/2018/06/06/macos-mojave-dynamic-wallpaper-desktop/
Apple took multiple photographs of the same spot at various intervals between sunrise and dusk to achieve the incredibly smooth transition between day and night. Thanks to enthusiasts, we know that Mojave’s dynamic wallpaper includes 16 layers in one HEIC file.
You can do the same yourself - just show a different background image at different times of day.
You can add images on top of a black background and depending on the time change the image's opacity.

Interpretation of "background colour index" in GIF specification

If you look in the GIF specification and search for "Background Color Index", you see the following description:
vii) Background Color Index - Index into the Global Color Table for
the Background Color. The Background Color is the color used for those
pixels on the screen that are not covered by an image. If the Global
Color Table Flag is set to (zero), this field should be zero and
should be ignored.
There is an ambiguity here, which is that if the "Global Color Table Flag" is set to zero and this field is ignored, then it is undefined what background colour of a GIF actually should be if the image data itself does not cover the entire image area. This possible because every image data block specifies left/right/width/height independently and there is no requirement that every pixel must be encoded by the image data.
Am I misinterpreting this? If not, then in the presence of this ambiguity, what is the de facto behaviour of GIF implementations today?
The background color index is often ignored by decoders (including some modern browsers), whereas GDI+ (eg. Windows Paint or .NET WinForms controls) respect it. GDI+ handles it like this:
If there is no global palette, OR the first frame has transparency (the Transparent Color Flag is set in the Graphic Control Extension), then the background is transparent
If there is a global palette AND the first frame has no transparency (there is no Graphic Control Extension for the first frame, or the Transparent Color Flag is not set for it), then it means a color index from the global palette and is significant only if not the whole virtual screen area is covered by the first image, or when the "Restore to background color" disposal method is set for a frame. In latter case it does not matter if a possibly existing local palette does not contain the background color.
To demonstrate its effect I created a simple animation of two frames with my encoder, and then played with some settings (feel free to download the images and see their content in a file viewer because I added some textual hint in the files). You can use this app to see the animations in a Win32 app using GDI+ rendering.
Common properties:
All images have a global palette so the the background color can be set.
The background color is set to green.
The Virtual Screen Size is 64x64 pixels
The first frame is 48x48 pixels
The second frame is 32x32 pixels
The animation rendered by your browser
The 2nd frame by GDI+
Description
None of the frames are transparent, there is no clear.
Both frames are transparent, there is no clear.
Only the 2nd frame is transparent, there is a clear after the first frame.
For the example, Safari uses black as the background. With Win10 photo viewer it's hard to tell, as it uses a black background anyway. Chrome, IE and Edge use white.
The spec doesn't define the behaviour when there's no background colour and you need one, so I guess arbitrary choices is what you'll get, though I vote for transparent being the most sensible.
Yes, the ambiguity is indeed present. Background color is largely a derelict of GIF87a, currently only necessary for 'Restore Background' frame blending mode.
By now, all decoders I have seen treat pixels not belonging to any frame as transparent even if transparency flags in all of the frames are zeroed.
Consider this GIF, for example:
See how your browser interprets it? The whole background is transparent.
P.S.: in case it does not loop, reload the page using Ctrl+F5.

How to do WhiteBalance (or levels correction) using AS3?

I’ve working in an app system that take the ID Photos, but the webcam whitebalance ajust isn’t perfect.
In the background we put an white fabric but it still look other color (kind of yellow, gray, blue, depending of the light at the moment of the snapshot).
I’m trying to work with the blend mode “hardlight” in the webcam, plus magicWand to remove the background and turn it completely white, but the skin tone doen’t look natural.
Using the levels correction in photoshop, I can define the right point of White and then use the MagicWand to clean the image.
How can I do the same using AS3?
I would look into using the paletteMap functionality built into bitmapData. It allows you to replace colour values on a per colour index basis.
You could, in theory, use a picker to choose the White balance point, and then use that as an offset for the palletteMap values.
Read more about palletteMap here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#paletteMap()

Custom icon color in ApplicationBar for Windows Phone 8

I have used the ApplicationBar's Background and Foreground colors respectively, and can see that it changes appearance accordingly. So if I want my icons to turn up green, I just set the Foreground property. So far so good.
My question is how do I change just one icon, not all? Assuming I want them all standard black/white (depending on the light/dark theme setting), but one should be green. I tried playing with the png file that represents the icon, changing that to green (the colored parts of it, most of it is transparent of course), but it still shows up as white. Can it be done with an Opacity Mask? Or is there another way?
You can't change the color of a single App Bar icon like this.
Effectively the SDK only reads the transparency (alpha) channel of your icon PNG and converts that to black or white with the required transparency.
If your phone is in light theme it will use black pixels, in dark theme white pixels.

How do you ensure that a body background hex color overrides the color management values in webkit?

I'm trying to implement a color scheme I got from Kuler by using the hex RGB values, and I'm getting some interesting measurements, depending on the monitor I'm using and its calibration.
In Firefox, the color always measures correctly - #e9e8e1 (I'm using Pixelstick for the Mac to eyedrop the color in the app).
In Chrome and Safari, the color measures off by a hair: #e9e8e0 and sometimes #e9e8df, but to me, it's quite noticeable that there's a color difference.
The bizarre thing is that eyedropping the color in the Kuler app in Safari/Chrome is always correct no matter what screen it is on.
I suspect that has something to do with Kuler's Flash app overriding the color management calibrations for the monitor.
Is there a way to force the browser to ignore the color calibration via HTML or CSS code for Safari so that the color specified in the CSS is rendered?
I thought of using a tiled PNG but I'm getting similar measurement variations when I manually select a color in Pixelmator (my graphics editing tool) even though I'm entering the color values manually.