2014-09-01 18:44:33 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
2014-09-03 22:34:26 +02:00
|
|
|
#import logging
|
|
|
|
#logging.basicConfig(level = logging.DEBUG)
|
2014-09-01 18:44:33 +02:00
|
|
|
|
2016-05-18 14:41:41 +02:00
|
|
|
import gi
|
|
|
|
gi.require_version('Vips', '8.0')
|
2014-09-01 18:44:33 +02:00
|
|
|
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, "")
|