`UIVisualEffectView` with blur alters hue and makes image darker or lighter - how to fix? - uikit

I would like UIVisualEffectView to just give me gaussian blur without any lightening or darkening. But UIBlurEffect.Style only has styles that alter the image in some way.
How can I achieve that without using CIImageFilter, vImageBoxConvolve_ARGB8888 and raw CoreGraphics whatsoever, just purely with UIVisualEffectView?

There is no way to achieve this using CoreAnimation.

Related

How to make CGWindowListCreateImage render correct background color?

Capturing an image of an off-screen window with CGWindowListCreateImage is a common way to create QuickLook style zoom-in animations, but this seems create an image with the wrong background colour, slightly lighter than the real window.
This causes a flash at the end of the animation which kind of ruins the effect.
Does anyone have any idea why this happens and what can be done about it?
EDIT: I created a demonstration app for this problem. It is a bit large and complex for a Stack Overflow question, but the relevant code is probably in the ZoomingWindow.m methods takeSnapshot and makeAndPrepareSnapshotWindow.
Setting the window appearance to textured in Interface Builder fixed this. Of course that also changes the color of the window, but that is acceptable in this particular case.

Direct2D: smooth image movement?

Im using direct2d to draw a bitmap to the window, and thats working fine, but when I move the image (continually, with joystick, key input, or just by itself), it doesn't move smoothly. It look's like the image pixels are not spread to surrounded pixels, It looks like the most dominant colors remain, and the others are discarded. I create the bitmap using WIC (windows imaging component).
I didn't want to post code cause it's just the most basic stuff, window creation, direct2d initialization, bitmap creation and drawing, all taken from msdn, most of it is just copy-paste. If you think you need any code to help me, ask, then I'll post it.
What I want:
Smooth image movement on picture.
What I've tried:
-void SetAntialiasMode(D2D1_ANTIALIAS_MODE antialiasMode); (tried all options)
-setting D2D1_BITMAP_INTERPOLATION_MODE in draw bitmap method to different modes.
Thanks in advance!

About the translucent effect of three.js

I have a need. I need to make a window. The glass on the window is transparent. I have found some examples:
https://threejs.org/examples/#webgl_materials_shaders_fresnel
https://threejs.org/examples/#webgl_materials_cubemap_refraction
The background of these examples is static pictures.
My background is dynamic. How can I do it?
Maybe you can use THREE.Refractor like shown in this example. It allows you to create a refractive see-through surface. You might have to adjust the respective shader program in order to achieve your intended visual result (the default shader of THREE.Refractor does not perform any distortions).

UE4 How do I achieve neonish effect in the UI?

I am trying to achieve a glow effect in the UI, but I can't figure out how to do it. Even after setting the color parameters to a high value (like (30,0,0) as I do normally to achieve this effect in the world), it stays the same. The effect I'd like to achieve: https://ray3k.files.wordpress.com/2016/08/preview1.gif?w=840
The UI elements in your example image are most likely just texture files and the glow effect is already in the texture. The glow effect that you achieved with setting the emission value above 1 is caused by bloom, but that does not work in UI so you have to bake the glow into the texture itself in a image editing software.

How to make animated NSCursor?

Is there a way to make animated NSCursor with my custom gif image?
Unfortunately, no--your best bet is to create an array of NSCursors, one for each frame of your image, and set them yourself using whatever animation strategy you'd like (perhaps an NSTimer?).

Resources