Created
August 9, 2014 10:13
-
-
Save tsuyukimakoto/40dc7b960cafb9bf5af4 to your computer and use it in GitHub Desktop.
Convert raw, or any image, to tiff format image file.
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
import Foundation | |
import Cocoa | |
for arg in Process.arguments[1...Process.arguments.count - 1] { | |
let fpath = arg.stringByExpandingTildeInPath | |
let outpath = fpath.stringByDeletingPathExtension + ".tiff" | |
let im:NSImage = NSImage(contentsOfFile: fpath) | |
let imageData = im.TIFFRepresentation | |
imageData!.writeToFile(outpath, atomically:true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment