Skip to content

Instantly share code, notes, and snippets.

View miyanda2's full-sized avatar

Micheal Iyanda miyanda2

  • uplift nigeria
  • Bauchi, Nigeria
View GitHub Profile
@miyanda2
miyanda2 / process.py
Created May 21, 2018 12:32 — forked from dellsystem/process.py
Converting and resizing images (pyramidal tiff)
#!/usr/bin/env python
import sys, os
from PIL import Image
import math
# Does all the image processing
# Just give it a directory of images in .tif/.tiff format that are not processed
# It will find the lowest max zoom, and resize all larger images to that zoom level
# Then it will convert all the images to pyramidal tiff format, and put them into a subdirectory
# Then it will copy everything from that subdirectory to /mnt/images/dir