Trying to think of a way to create color aberration (also known as color fringing) effect in black and white images on iOS but i can't figure out how. I want to create the Before effect .
Images will be passed through a filter chain with CIMaximumComponent or CIMinimumComponent for the black and white effect.
Is color aberration doable with Core Image filters? Any ideas?
Related
I have a image processing in my uwp app where i read the colors of the image and display the results based on the matching colors.
To read the colors i use Color theif and get the color palette.
The problem is at times the background color is considered as the primary color since it is dominent
In the above image the second color must be the primary color of the image which i need. But the gray is obtained as primary color.
Since image background could be of any color, I think the best bet is to pick colors from the corners of an image (which more likely to be of background color) and compare them against the colors of the palette returned by ColorThief using the Color difference formula.
You could then use color differences and the amounts of times the color from ColorThief palette was a match to corner pixel color as weight coefficients to decide which one of the ColorThief palette colors is more likely to be the background color of the image.
I'm trying to get the same color/transparent effect as Apple has used on the bottom borders of table view cells in the today view. How can I also use this effect on for example a UILabel?
How do you get the white transparent effect on a UILabel in a today view widget?
I've wondered the same myself. I think They're setting a color of white with 0.4 alpha on the font and a color of black with 0.4 alpha on the background. They overlay the whole thing over a gaussian-blurred and saturated image of what was previously behind the today view.
So the required steps to produce the same effect would be something like the following:
1. Grab background image
2. Blur and saturate image
3. Add below the current view
4. Set black background of 0.4 alpha and white font of 0.4 alpha on the current view.
If you can think of a way to make the background translucent right behind the font that would make the color show more.
Here's an image of what that would look like (including the translucent background behind the text). I did this real quick in photoshop, don't mind the font.
Hope this helps!
Because the UIImageView in the background is very light, you can't see the text in the foreground on top of the UIVisualEffectView. I want to detect whether the background is light or not and if so, change the text colour to something darker. How can I do this?
To detect the dominant color of a UIView it takes two steps. First is to capture the image data of the view as described here: How to capture UIView to UIImage without loss of quality on retina display
Second is to determine what the dominant color of the view is as described here:
How does the algorithm to color the song list in iTunes 11 work?
And then make your adjustments based on the result.
Personally, I would simply use a dark text color for the light blur. Or continue with the light text and use the dark blur effect. Or set a tint color on a navigation bar.
I am working on a app in which user captures some images. and than he will change the background color to white. Its same as how FotoFuze.org does. I want to know how to change the background color to white without losing the object data.
For this i go through some of the things like detecting the background color. and editing the pixels whose color is background color to transparent.
But this causing problems if the image itself has some part colored as the background color.
So please suggest me the right way to accomplish this.
I have an old app (Delphi 5) which I want to give it some changes.
I have set a Glyph.Data for a speedbutton, but some colors are transparent and in some places I see small white dots on my image, I do not want to set transparency for the image, How to remove it (transparency)?
Any help is really appreciated.
Thanks :)
The transparency is a color that is not drawn.
You just have to change the image or set another color as the transparent one.
From Delphi 6 Help
Transparent color
Use the Transparent color drop-down to
specify which color is used to create
a mask for drawing the image
transparently. The default transparent
color is the color of the bitmap's
left-most pixel in the bottom line.
You can also change the transparent
color by clicking directly on a pixel
in the selected image.
When an image has a transparent color,
any pixels in the image of that color
are not rendered in that color, but
instead appear transparent, allowing
whatever is behind the image to show
through.
If the image is an icon, Transparent
color appears grayed and the
transparent color is set to clNone.
This is because icons are already
masked.
Set TSpeedButton.Transparent to False.
I have found the answer, Delphi thinks the transparent color is the color of most left - bottom pixel of this image. So If I set a color which is not used in my image in the most left-bottom of my image, then Delphi only will make that small pixel transparent and other parts of my image will be OK without transparency, So this post is completed by myself :))