libvips/python/try2.py

32 lines
556 B
Python
Raw Normal View History

#!/usr/bin/python
import logging
logging.basicConfig(level = logging.DEBUG)
from vips8 import vips
from gi.repository import Vips
Vips.cache_set_trace(True)
try:
2014-08-29 18:33:14 +02:00
a = Vips.Image.new_from_file("/home/john/pics/babe.poop")
except Vips.Error, e:
print e
2014-08-29 18:33:14 +02:00
a = Vips.Image.new_from_file("/home/john/pics/babe.jpg")
b = Vips.Image.new_from_file("/home/john/pics/k2.jpg")
print 'a =', a
print 'b =', b
2014-08-29 18:33:14 +02:00
out = Vips.call("add", a, b)
print 'out =', out
out = a.add(b)
print 'out =', out
2014-08-29 18:33:14 +02:00
# we need to get GBoxed working for this
#out = a.linear(1, 2)