Created
November 1, 2011 20:57
-
-
Save mdellabitta/1331881 to your computer and use it in GitHub Desktop.
Using Kakadu to make JPEG2000s out of a folder of images
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
#!/usr/bin/env ruby | |
kdu_compress = ??? | |
Dir.open(in_path).each do |in_file| | |
j_file = ??? | |
success &= system(kdu_compress, "-quiet", "-i", in_file, "-o", j_file, "-jp2_space", "sRGB", "Creversible=yes", "-rate", "-,1,0.84,0.7,0.6,0.5,0.4,0.35,0.3,0.25,0.21,0.18,0.15,0.125,0.1,0.088,0.075,0.0625,0.05,0.04419,0.03716,0.03125,0.025,0.0221,0.01858,0.015625", "Clevels=6", "Stiles={1024,1024}", "Cmodes={BYPASS}", "Corder=RLCP") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment