2014-09-05 13:54:07 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
#import logging
|
|
|
|
#logging.basicConfig(level = logging.DEBUG)
|
|
|
|
|
2016-05-18 14:41:41 +02:00
|
|
|
import gi
|
|
|
|
gi.require_version('Vips', '8.0')
|
2014-09-05 13:54:07 +02:00
|
|
|
from gi.repository import Vips
|
|
|
|
|
|
|
|
a = Vips.Image.new_from_file(sys.argv[1])
|
|
|
|
|
|
|
|
b = a.write_to_memory()
|
|
|
|
|
|
|
|
c = Vips.Image.new_from_memory(b, a.width, a.height, a.bands, a.bandfmt)
|
|
|
|
|
|
|
|
c.write_to_file("x.v")
|