(filename)
return Source(pointer)
Make a new source from a filename.

        Make a new source that is attached to the named file. For example::

            source = pyvips.Source.new_from_file("myfile.jpg")

        You can pass this source to (for example) :meth:`new_from_source`.
Make a new source from a filename.
Make a new source from a filename .
def new_from_file(filename):
        """Make a new source from a filename.

        Make a new source that is attached to the named file. For example::

            source = pyvips.Source.new_from_file("myfile.jpg")

        You can pass this source to (for example) :meth:`new_from_source`.

        """

        # logger.debug('VipsSource.new_from_file: filename = %s',
        #              filename)

        pointer = vips_lib.vips_source_new_from_file(_to_bytes(filename))
        if pointer == ffi.NULL:
            raise Error("can't create source from filename {0}"
                        .format(filename))

        return Source(pointer)
def new_from_file ( filename ) : # logger.debug('VipsSource.new_from_file: filename = %s', #              filename) pointer = vips_lib . vips_source_new_from_file ( _to_bytes ( filename ) ) if pointer == ffi . NULL : raise Error ( "can't create source from filename {0}" . format ( filename ) ) return Source ( pointer )