Created
January 17, 2013 16:39
-
-
Save teaforthecat/4557365 to your computer and use it in GitHub Desktop.
dragonfly custom processor to create pyramidal tiff images to be used by iipsrv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TileProcessor | |
def tile temp_object,tile_size=256 | |
geom = "#{tile_size}x#{tile_size}" | |
temf = Tempfile.open('o.ptif') | |
`convert #{temp_object.path} -define tiff:tile-geometry=#{geom} -compress jpeg 'ptif:#{temf.path}'` | |
temf | |
end | |
end | |
tiled_images.processor.register(TileProcessor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment