Over a million developers have joined DZone.

Imagemagic Quadruplicator

//basic usage example
#1:makes a copy of the image
convert $1 -negate -flop "1-"$1 
#2: appends the copy to the original
convert $1 "1-"$1 +append out.jpg 
#3 copies the new double image, flips it 
convert out.jpg -flip -flop out1.jpg && convert out.jpg out1.jpg -append out2.jpg
#clean up
rm 1-*
rm {out1,out}.png
mv out2 $1-out.png
#clean way to get filename and extension in bash?

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}