Skip to content

Instantly share code, notes, and snippets.

@seanwittmeyer
Created September 12, 2017 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanwittmeyer/778b8e2a01baeee2274426850bfa08e5 to your computer and use it in GitHub Desktop.
Save seanwittmeyer/778b8e2a01baeee2274426850bfa08e5 to your computer and use it in GitHub Desktop.
cut autodesk pano into cube tiles for gear vr and panolens
# create 12 tiles
convert -crop 1536x1536 imageL.jpg L.png
convert -crop 1536x1536 imageR.jpg R.png
convert R-2.png R-0.png R-5.png R-4.png R-1.png R-3.png L-2.png L-0.png L-5.png L-4.png L-1.png L-3.png +append result.png
echo ‘{ "title": “result.png”, "author": “anon”}’ > result.json
convert -crop 1536x1536 imageL.jpg L.png
convert -crop 1536x1536 imageR.jpg R.png
convert -flop R-0.png R-0.png
convert -flop R-1.png R-1.png
convert -flop R-2.png R-2.png
convert -flop R-3.png R-3.png
convert -flop R-4.png R-4.png
convert -rotate 180 R-4.png R-4.png
convert -flop R-5.png R-5.png
convert -rotate 180 R-5.png R-5.png
convert -flop L-0.png L-0.png
convert -flop L-1.png L-1.png
convert -flop L-2.png L-2.png
convert -flop L-3.png L-3.png
convert -flop L-4.png L-4.png
convert -rotate 180 L-4.png L-4.png
convert -flop L-5.png L-5.png
convert -rotate 180 L-5.png L-5.png
convert L-2.png L-0.png L-5.png L-4.png L-3.png L-1.png R-2.png R-0.png R-5.png R-4.png R-3.png R-1.png +append "result.png"
echo ‘{ "title": “result.png”, "author": “anon”}’ > result.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment