Open xbelanch opened 10 years ago
Working directly with BitmapData isn't too hard, but the JPEG glitch effect can be easily achieved by inserting a few zeroes in the JPEG-encoded ByteArray. You could do a different style of glitch effect without JPEG encoding, certainly.
Yep, you right. I'm working on a video game which glitches are a visual important point of the gameplay. I achieved this:
but I'd like to add some jpeg style glitches, but I don't know how to do it working directly with BitmapData and Flash platform supported. Something like this to blend with the other kind of glitch effects:
Thank you for your time :)
PS: I found this interesting article about a Bitmapdata Glitch Generator http://blog.soulwire.co.uk/laboratory/flash/as3-bitmapdata-glitch-generator
Hm, if you want something synchronous you'd probably have to write your own JPEG encoding and decoding class, which isn't impossible, but is quite complicated. Someone on github might have done that already, though! I think I saw a while ago that someone had ported some ActionScript JPEG code of Adobe's to Haxe...
I'm wondering if there is another way to achieve the same glitch effects but avoiding the encoding jpeg part. I assume that working with jpeg encoding allows to easily deal with pixels rather than work directly with the raw Bitmapdata, isn't?