# The Colourized Zebra Effect

Adding Moving Horizontal Stripes to an Image

## Let's Learn How to Make This EffectShall We?

Being a Conceptual Walk Through
Opposed to a How To.

All images from my
front page
just in case you want to check out the originals.

## Black and White Stripes

Extreme Black OR White
```img[img>0.50] = 1 img[img<=0.50] = 0 ```
working with Python Numpy arrays

Greyscale with void in the center
``` img[img>0.50] += 0.25 img[img<=0.50] -= 0.25 img[img>1.0] = 1.0 img[img<0.0] = 0.0 ```

Striped
``` for i in range(img.shape[0]): if stripe: for j in range(img.shape[1]): img[i,j] = abs(img[i,j] -1) ``` with `stripe` toggled every 50 lines (i.e. i)

To get moving stripes,
the toggle point is sequentially incremented
throughout the entire range
(e.g. instead of toggling at [0,10,20...]
it's toggled at [1,11,21...];
and then, more so on the next line)

Greyscale Striped

Tighter Stripes

With Greyscale

Ever Smaller Stripes
simply toggling the switch more often

Black OR White
Toggled Every Line

Greyscale
Constant Toggle

It's a subtle effect,
sort of like embossing,
(the effect being more pronounced on full size images).

Colorized Version
utilizing the above effects
independently on the R,G,B color bands

``` eList = [(w,e) for w in [1,10,25,50]   for e in [black_white,grey_shift]]```
i.e. I tried a lot of combinations.
It's hit or miss with image effects.

## Final GiFs

I looked at 256 image combinations
for each of these pictures,
chose the ones I liked best,
and for the best,

Plug and Chug is the rule of the day.

Two images, toggle starts on in one, off in the other

Camp Crud
Four images, cycling between the colour band layers

Alcatraz
Same as above, but with thicker lines and more colour band layers

Hardly Working
Sequential images,
which differ from one another only in the offset of the initial stripe
are stacked together in a GiF.

It might seem like I skipped ahead a bunch at the end.
And I probably did.
But it's really just incremental addition,
gaining inspiration from the previous,
to make the next step.

And seriously, you can't expect me to just give ALL my secrets away.

Brett Stuff
For More Like This
(and like nothing else)

www.paufler.net