2012-01-05 14:26:25 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import logging
|
|
|
|
logging.basicConfig(level = logging.DEBUG)
|
|
|
|
|
|
|
|
from vips8 import vips
|
|
|
|
|
2012-01-06 15:56:24 +01:00
|
|
|
from gi.repository import Vips
|
|
|
|
Vips.cache_set_trace(True)
|
|
|
|
|
2012-01-05 14:26:25 +01:00
|
|
|
try:
|
2014-08-29 18:33:14 +02:00
|
|
|
a = Vips.Image.new_from_file("/home/john/pics/babe.poop")
|
|
|
|
except Vips.Error, e:
|
2012-01-05 14:26:25 +01:00
|
|
|
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")
|
2012-01-05 14:26:25 +01:00
|
|
|
|
|
|
|
print 'a =', a
|
|
|
|
print 'b =', b
|
|
|
|
|
2014-08-29 18:33:14 +02:00
|
|
|
out = Vips.call("add", a, b)
|
2012-01-05 14:26:25 +01:00
|
|
|
|
|
|
|
print 'out =', out
|
|
|
|
|
|
|
|
out = a.add(b)
|
|
|
|
|
|
|
|
print 'out =', out
|
2012-01-06 15:56:24 +01:00
|
|
|
|
2014-08-29 18:33:14 +02:00
|
|
|
# we need to get GBoxed working for this
|
|
|
|
#out = a.linear(1, 2)
|