distortion/blur effect

hi all,

I’m trying to come up with a way to programmatically add an effect to an image that changes over time.

The idea would be that the image starts out distorted or blurry-- think heavy mosaic, pixelation, or camera blur-- then slowly comes into sharp focus.

Any thoughts on how to approach this one?

cheers,
Bill [import]uid: 4157 topic_id: 31705 reply_id: 331705[/import]

just checking with everyone again-- any ideas?
thx! [import]uid: 4157 topic_id: 31705 reply_id: 127140[/import]

The easiest way, but perhaps not the most effective in all cases, would be to use the alpha values of a “before” and “after” image to fade between the two.

I’ve made a little sample project that illustrates this:

http://djmixfix.com/code/ImageFade.zip

I use this technique a lot in my own iOS app, DJ Mix Fix. Check it out on the App Store if you like :slight_smile: [import]uid: 111970 topic_id: 31705 reply_id: 127307[/import]

just checking with everyone again-- any ideas?
thx! [import]uid: 4157 topic_id: 31705 reply_id: 127140[/import]

That’s cool, Tony, thanks. But I was looking for something that would actually process/affect the image itself-- and not just transition between two images. Trying to keep the image payload low…

Perhaps I should look at a particle effect?

cheers,
bill [import]uid: 4157 topic_id: 31705 reply_id: 127322[/import]

Don’t have a solution for you, but I have played with changing resolutions on captured images before saving / sending them to a server…

In doing that, I’m downscaling some pictures, and if you downscale enough, then redisplay it as a full screen image, it would look really pixelly (which is one of the effects you mentioned).

No idea if the technique I’m using can be utilized for your purposes, but a couple lines of code from my picture processing code are below, to show one corona feature that does it… Don’t know if there’s other display. functions that DON’T save to the device, or that can capture the data from the group into another group or image, but maybe… (You’re gonna have to do some homework to see if some variation of this is possible for your purposes). Good Luck!

[code]
– myImage is your already created picture of any size…
myImage.width = 20 – Make it small
myImage.height = 20

local photoGroup = display.newGroup()

photoGroup:insert(myImage)
photoGroup.x = 320 – Place it onscreen somewhere, just for a second for display.save…
photoGroup.y = 480

display.save(photoGroup, imageFilename, baseDir) – This function capture the scaled image
– image has been captured and saved in a file… loading of it loads a 20x20 image…
[/code] [import]uid: 79933 topic_id: 31705 reply_id: 127332[/import]

The easiest way, but perhaps not the most effective in all cases, would be to use the alpha values of a “before” and “after” image to fade between the two.

I’ve made a little sample project that illustrates this:

http://djmixfix.com/code/ImageFade.zip

I use this technique a lot in my own iOS app, DJ Mix Fix. Check it out on the App Store if you like :slight_smile: [import]uid: 111970 topic_id: 31705 reply_id: 127307[/import]

That’s cool, Tony, thanks. But I was looking for something that would actually process/affect the image itself-- and not just transition between two images. Trying to keep the image payload low…

Perhaps I should look at a particle effect?

cheers,
bill [import]uid: 4157 topic_id: 31705 reply_id: 127322[/import]

Don’t have a solution for you, but I have played with changing resolutions on captured images before saving / sending them to a server…

In doing that, I’m downscaling some pictures, and if you downscale enough, then redisplay it as a full screen image, it would look really pixelly (which is one of the effects you mentioned).

No idea if the technique I’m using can be utilized for your purposes, but a couple lines of code from my picture processing code are below, to show one corona feature that does it… Don’t know if there’s other display. functions that DON’T save to the device, or that can capture the data from the group into another group or image, but maybe… (You’re gonna have to do some homework to see if some variation of this is possible for your purposes). Good Luck!

[code]
– myImage is your already created picture of any size…
myImage.width = 20 – Make it small
myImage.height = 20

local photoGroup = display.newGroup()

photoGroup:insert(myImage)
photoGroup.x = 320 – Place it onscreen somewhere, just for a second for display.save…
photoGroup.y = 480

display.save(photoGroup, imageFilename, baseDir) – This function capture the scaled image
– image has been captured and saved in a file… loading of it loads a 20x20 image…
[/code] [import]uid: 79933 topic_id: 31705 reply_id: 127332[/import]