po [[NSImage class] imageFileTypes]
irb(main):005:0> framework 'AppKit'
irb(main):006:0> NSImage.imageFileTypes
=> ["'PDF '", "PDF", "pdf", "'PICT'", "PIC", "pic", "PCT", "pct", "PICT", "pict", "'EPSF'", "PS", "ps", "EPSI", "epsi", "EPSF", "epsf", "EPI", "epi", "EPS", "eps", "'BMPf'", "'PNTG'", "'TPIC'", "'BMP '", "'8BPS'", "'icns'", "'TIFF'", "'jp2 '", "'GIFf'", "'JPEG'", "'PNGf'", "HDR", "hdr", "EXR", "exr", "MAC", "mac", "PNT", "pnt", "PNTG", "pntg", "TARGA", "targa", "TGA", "tga", "CUR", "cur", "XBM", "xbm", "BMP", "bmp", "ICO", "ico", "PSD", "psd", "ORF", "orf", "MRW", "mrw", "RWL", "rwl", "RAW", "raw", "RW2", "rw2", "RAF", "raf", "CRW", "crw", "ICNS", "icns", "EFX", "efx", "JFAX", "jfax", "JFX", "jfx", "G3", "g3", "FAX", "fax", "TIF", "tif", "TIFF", "tiff", "DCR", "dcr", "ERF", "erf", "ARW", "arw", "SR2", "sr2", "SRF", "srf", "SRW", "srw", "PEF", "pef", "NRW", "nrw", "NEF", "nef", "3FR", "3fr", "FFF", "fff", "MOS", "mos", "CR2", "cr2", "DNG", "dng", "JPF", "jpf", "JP2", "jp2", "GIF", "gif", "JPE", "jpe", "JPEG", "jpeg", "JPG", "jpg", "PNG", "png"]
irb(main):012:0> NSImage.alloc.initWithContentsOfFile("/Library/Ruby/Gems/1.8/gems/gosu-0.7.31-universal-darwin/examples/media/Space.png")
=> #<NSImage:0x2005a4b00>
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi
irb(main):005:0> NSData.dataWithContentsOfFile('.profile')
=> #<NSConcreteData:0x2000f45a0>
>> File.read('.profile')
=> "...file contents here..."
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill