(filename)
return Target(pointer)
Make a new target to write to a file.

        Make a new target that will write to the named file. For example::

            target = pyvips.Target.new_to_file("myfile.jpg")

        You can pass this target to (for example) :meth:`write_to_target`.
Make a new target to write to a file.
Make a new target to write to a file .
def new_to_file(filename):
        """Make a new target to write to a file.

        Make a new target that will write to the named file. For example::

            target = pyvips.Target.new_to_file("myfile.jpg")

        You can pass this target to (for example) :meth:`write_to_target`.

        """

        # logger.debug('VipsTarget.new_to_file: filename = %s', filename)

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

        return Target(pointer)
def new_to_file ( filename ) : # logger.debug('VipsTarget.new_to_file: filename = %s', filename) pointer = vips_lib . vips_target_new_to_file ( _to_bytes ( filename ) ) if pointer == ffi . NULL : raise Error ( "can't create output target from filename {0}" . format ( filename ) ) return Target ( pointer )