MotionBlur icon indicating copy to clipboard operation
MotionBlur copied to clipboard

Able to motion blur images that have transparency?

Open supfunc opened this issue 11 years ago • 8 comments

img_3968

I'm using a PNG with transparent and semi-transparent parts. These non-opaque parts become darkened when the motion blur is applied.

I hope this can be solved - it's very useful.

Best wishes, Dene

supfunc avatar Dec 14 '14 04:12 supfunc

I think the issue may lie in the PNG image. Could you try drawing the same letter in code, using Core Graphics?

fastred avatar Apr 19 '15 17:04 fastred

Closing because of lack of response.

fastred avatar Aug 10 '15 16:08 fastred

Hey @dene22 and @fastred, have you found any solution to this?

sarperdag avatar Aug 23 '15 10:08 sarperdag

@sarperdag No, I didn't. Can you provide a sample project showing this error?

fastred avatar Aug 23 '15 11:08 fastred

@fastred @dene22

Here's a sample project showing the problem

https://dl.dropboxusercontent.com/u/1124427/TransparentMotionBlur.zip

sarperdag avatar Aug 23 '15 11:08 sarperdag

It looks like the issue lies in the filter: https://github.com/fastred/MotionBlur/blob/master/Classes/MotionBlurFilter.m

I don't have any quick ideas how to fix it, so I'll appreciate any help from you!

fastred avatar Aug 23 '15 16:08 fastred

@fastred Did you write the motion blur code yourself or got it from somewhere else?

sarperdag avatar Aug 24 '15 16:08 sarperdag

The answer is on my blog:

WWDC videos are always a good way to learn the basics of frameworks, so I started by watching sessions 514 – Advances in Core Image and 515 – Developing Core Image Filters for iOS from WWDC 2014. To my surprise, one of the presenters of session 515 showed how to write a motion blur filter. Let's see how it works.

http://holko.pl/2014/07/21/motion-blur/

fastred avatar Aug 24 '15 20:08 fastred