#
#		Python GUI - Images - Cocoa
#

from AppKit import NSImage
from GImages import Image as GImage
from ImageBases import ImageBase

class Image(GImage):

    def _init_from_file(self, file):
        ns_image = NSImage.alloc().initWithContentsOfFile_(file)
        if not ns_image:
            raise ValueError("Unrecognised image file type: %s" % file)
        self._init_with_ns_image(ns_image, flipped = True)
