libvips/python/example/try6.py

17 lines
281 B
Python
Raw Normal View History

#!/usr/bin/python
import sys
2014-09-03 22:34:26 +02:00
#import logging
#logging.basicConfig(level = logging.DEBUG)
import gi
gi.require_version('Vips', '8.0')
from gi.repository import Vips
a = Vips.Image.new_from_file(sys.argv[1])
2014-09-02 15:57:37 +02:00
b = a.write_to_buffer(".jpg")
2014-09-03 22:34:26 +02:00
c = Vips.Image.new_from_buffer(b, "")