draw and hough working in Python

This commit is contained in:
John Cupitt 2014-09-09 13:19:44 +01:00
parent cb9360dac9
commit 4c51e6aa0b
3 changed files with 20 additions and 3 deletions

2
TODO
View File

@ -1,8 +1,6 @@
- python:
- how about the in-place things? draw a circle?
- try getting / setting / deleting metadata such as an ICC profile or
an exif tag

18
python/try10.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/python
import sys
import logging
logging.basicConfig(level = logging.DEBUG)
from gi.repository import Vips
from vips8 import vips
a = Vips.Image.black(100, 100)
a.draw_circle(128, 50, 50, 20)
b = a.hough_circle(scale = 1, min_radius = 15, max_radius = 25)
b.write_to_file("x.v")

View File

@ -1,6 +1,7 @@
#!/usr/bin/python
import sys
import re
import logging
@ -44,7 +45,7 @@ class Argument:
def __init__(self, op, prop):
self.op = op;
self.prop = prop;
self.name = prop.name;
self.name = re.sub("-", "_", prop.name);
self.flags = op.get_argument_flags(self.name)
self.priority = op.get_argument_priority(self.name)
self.isset = op.argument_isset(self.name)