498 lines
13 KiB
Plaintext
498 lines
13 KiB
Plaintext
- why don't we get gtk-doc expansions in the leading chapters? we turn them on
|
|
|
|
- try:
|
|
|
|
$ cd vips-x.x.x/libvips
|
|
$ g-ir-doc-tool --language=Python -o /tmp/vips-doc Vips-8.0.gir
|
|
$ yelp /tmp/vips-doc
|
|
|
|
shows gir contents
|
|
|
|
- can we generate python docstrings?
|
|
|
|
this works
|
|
|
|
from gi.repository import Vips
|
|
help(Vips.Image.black)
|
|
|
|
but this does not
|
|
|
|
help(Vips.Image.add)
|
|
|
|
since add is an instance method ... this does work
|
|
|
|
a = Vips.Image.black(10, 10)
|
|
help(a.add)
|
|
|
|
this has loads of stuff from gi!!
|
|
|
|
op = Vips.Operation.new("black")
|
|
help(op)
|
|
|
|
- want to get the description for an operation
|
|
|
|
op = Vips.Operation.new("black")
|
|
|
|
can't look at op.description, since that's not set until build(), we need to
|
|
get the class and walk that
|
|
|
|
|
|
try:
|
|
|
|
GType a = Vips.type_find("VipsObject", "black")
|
|
|
|
in C, use this to get the class from a gtype:
|
|
|
|
g_type_class_ref(gtype)
|
|
|
|
from gi.repository import GObject
|
|
dir(GObject.GType)
|
|
['__class__', '__delattr__', '__doc__', '__eq__', '__format__',
|
|
'__ge__', '__getattribute__', '__gt__', '__hash__', '__init__',
|
|
'__le__', '__lt__', '__ne__', '__new__', '__reduce__',
|
|
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
|
|
'__subclasshook__', 'children', 'depth', 'from_name', 'fundamental',
|
|
'has_value_table', 'interfaces', 'is_a', 'is_abstract', 'is_classed',
|
|
'is_deep_derivable', 'is_derivable', 'is_instantiatable',
|
|
'is_interface', 'is_value_abstract', 'is_value_type', 'name',
|
|
'parent', 'pytype']
|
|
|
|
a = Vips.type_find("VipsObject", "black")
|
|
dir(a)
|
|
['__class__', '__delattr__', '__doc__', '__eq__', '__format__',
|
|
'__ge__', '__getattribute__', '__gt__', '__hash__', '__init__',
|
|
'__le__', '__lt__', '__ne__', '__new__', '__reduce__',
|
|
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
|
|
'__subclasshook__', 'children', 'depth', 'from_name', 'fundamental',
|
|
'has_value_table', 'interfaces', 'is_a', 'is_abstract', 'is_classed',
|
|
'is_deep_derivable', 'is_derivable', 'is_instantiatable',
|
|
'is_interface', 'is_value_abstract', 'is_value_type', 'name',
|
|
'parent', 'pytype']
|
|
|
|
>>> op = Vips.Operation.new("black")
|
|
>>> dir(op)
|
|
['__class__', '__copy__', '__deepcopy__', '__delattr__', '__dict__',
|
|
'__doc__', '__eq__', '__format__', '__gdoc__', '__ge__',
|
|
'__getattribute__', '__gpointer__', '__grefcount__', '__gsignals__',
|
|
'__gt__', '__gtype__', '__hash__', '__info__', '__init__', '__le__',
|
|
'__lt__', '__module__', '__ne__', '__new__', '__reduce__',
|
|
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
|
|
'__subclasshook__', '_force_floating', '_ref', '_ref_sink', '_unref',
|
|
'_unsupported_data_method', '_unsupported_method', 'argument_isset',
|
|
'argument_needsstring', 'argument_table', 'bind_property',
|
|
'bind_property_full', 'build', 'chain', 'close', 'compat_control',
|
|
'connect', 'connect_after', 'connect_object', 'connect_object_after',
|
|
'constructed', 'description', 'disconnect', 'disconnect_by_func',
|
|
'do_build', 'do_close', 'do_get_flags', 'do_invalidate',
|
|
'do_output_to_arg', 'do_postbuild', 'do_postclose', 'do_preclose',
|
|
'do_rewind', 'emit', 'emit_stop_by_name', 'force_floating',
|
|
'found_hash', 'freeze_notify', 'g_type_instance',
|
|
'get_argument_flags', 'get_argument_priority',
|
|
'get_argument_to_string', 'get_data', 'get_flags', 'get_properties',
|
|
'get_property', 'get_qdata', 'handler_block', 'handler_block_by_func',
|
|
'handler_disconnect', 'handler_is_connected', 'handler_unblock',
|
|
'handler_unblock_by_func', 'hash', 'interface_find_property',
|
|
'interface_install_property', 'interface_list_properties',
|
|
'invalidate', 'is_floating', 'local_cb', 'local_memory', 'new',
|
|
'new_from_string', 'nickname', 'notify', 'notify_by_pspec',
|
|
'parent_instance', 'parent_object', 'pixels', 'postclose', 'preclose',
|
|
'print_all', 'print_dump', 'print_name', 'print_summary',
|
|
'print_summary_class', 'props', 'qdata', 'ref', 'ref_count',
|
|
'ref_sink', 'replace_data', 'replace_qdata', 'rewind', 'run_dispose',
|
|
'sanity', 'sanity_all', 'set_argument_from_string', 'set_data',
|
|
'set_from_string', 'set_properties', 'set_property', 'set_required',
|
|
'set_static', 'static_object', 'steal_data', 'steal_qdata',
|
|
'stop_emission', 'stop_emission_by_name', 'thaw_notify', 'unref',
|
|
'unref_outputs', 'watch_closure', 'weak_ref']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- test other arg types
|
|
|
|
input int works
|
|
input double
|
|
input enum works
|
|
input image works
|
|
input doublevec
|
|
input imagevec
|
|
input blob
|
|
|
|
output int
|
|
output double works
|
|
output enum
|
|
output image works
|
|
output doublevec
|
|
output imagevec
|
|
output blob
|
|
|
|
- use vips_autorot() in jpegload and vipsthumbnail
|
|
|
|
- fix up aconv
|
|
|
|
- more python tests
|
|
|
|
- can we pick the vipsthumbnail int shrink factor more intelligently?
|
|
|
|
- vips_resize() should use vipsthumbnail's block/cache/affine/sharpen chain
|
|
|
|
- rewrite im_conv() etc. as vips_conv(), also the mosaicing functions
|
|
|
|
finally finish --disable-deprecated option
|
|
|
|
|
|
|
|
- check and fix up docs
|
|
|
|
index items should all be links
|
|
|
|
check each func in each section has a comment doc ... if they don't and
|
|
shouldn't be there, move to internal
|
|
|
|
need better vipsobject docs
|
|
|
|
gtk-doc now uses markdown, phew, use this to expand some sections
|
|
|
|
|
|
|
|
|
|
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.
|
|
|
|
|
|
|
|
- test draw_mask on labq images
|
|
|
|
we probably need to unpack the ink back to double before blending
|
|
|
|
|
|
|
|
- ink to vec etc must have a way to give a complex constant
|
|
|
|
eg. drawink needs a --ink_imag option with the imaginary components of the
|
|
ink
|
|
|
|
look for uses of vips__vector_to_ink() and add extra params to other places
|
|
too, eg. vips_embed(), vips_insert() etc.
|
|
|
|
- vips__ink_to_vector() needs an optional imag return
|
|
|
|
- vips_getpoint() needs an optional imag return
|
|
|
|
- add porter-duff compositing, see
|
|
|
|
https://github.com/jcupitt/ruby-vips/issues/28
|
|
|
|
- now vips_linear() has uchar output, can we do something with orc?
|
|
|
|
- do restrict on some more packages, we've just done arithmetic so far
|
|
|
|
also resample, colour, some of conversion, create,
|
|
|
|
- maybe avg?
|
|
|
|
but avg doesn't subclass arithmetic, so we can't
|
|
|
|
- for interpolate, we'd need to be able to unroll the vector, so the
|
|
interpolator would need to be built for the bands / stride / type of the
|
|
image
|
|
|
|
need new API For this since interpolators currently work for any image
|
|
|
|
- vips_gaussblur() should switch to float prec if given a float image?
|
|
|
|
same for vips_conv()?
|
|
|
|
maybe precision is a dumb thing
|
|
|
|
- support --strip for other writers
|
|
|
|
- vipsthumbnail could shrink-on-load openslide and pyr tiff as well?
|
|
|
|
we have "shrink" for jpegload, move this into the base loader
|
|
|
|
support it for tiff and openslide as well
|
|
|
|
use it from nip2 for zooming? only if the partial flag is set though, we
|
|
don't want to use it on jpg files
|
|
|
|
- use the webp advanced encoding api to set a write function for webp save to
|
|
file
|
|
|
|
- use g_log() instead of vips_info()?
|
|
|
|
|
|
|
|
- quadratic doesn't work for order 3
|
|
|
|
start to get jaggies on lines --- the 3rd differential isn't being
|
|
initialised correctly for the sub-region?
|
|
|
|
seems fine vertically, only get errors on horizontal tile boundaries
|
|
|
|
because we step across tiles left to right: y doesn't change, only x does
|
|
|
|
|
|
mosaic
|
|
======
|
|
|
|
- balance should use new meta stuff
|
|
|
|
- histogram balance option?
|
|
|
|
|
|
resample
|
|
========
|
|
|
|
- check mosaic1, global_balance, similarity etc. use of im__affine
|
|
|
|
how can we move them to im_affinei ?
|
|
|
|
- perspective transform with a matrix ... base it on the Lenz transformer, but
|
|
partial
|
|
|
|
|
|
foreign
|
|
=======
|
|
|
|
- magick2vips should spot ICC profiles and attach them as meta
|
|
|
|
- interlaced jpg needs massive memory, we should have two jpg read modes, like
|
|
png
|
|
|
|
- add more sequential mode readers
|
|
|
|
$ grep -l write_line *.c
|
|
csv.c
|
|
matlab.c
|
|
openexr2vips.c
|
|
ppm.c
|
|
radiance.c
|
|
|
|
- foreign docs come up as "VipsForeignSave", annoying, why?
|
|
|
|
- add nifti support
|
|
|
|
http://niftilib.sourceforge.net/
|
|
|
|
- add matlab write
|
|
|
|
- im_exr2vips can now use c++ api
|
|
|
|
see TODO notes in openexr read (though they all need more openexr C API)
|
|
|
|
consider openexr write
|
|
|
|
- magick should set some header field for n_frames and frame_height? see also
|
|
analyze
|
|
|
|
- im_csv2vips() could use "-" for filename to mean stdin
|
|
|
|
but then we'd have to read to a malloced buffer of some sort rather than an
|
|
image, since we might need to grow it during the read, since we couldn't
|
|
then seek
|
|
|
|
|
|
packaging
|
|
=========
|
|
|
|
- test _O_TEMPORARY thing on Windows
|
|
|
|
|
|
convolution
|
|
===========
|
|
|
|
- revisit orc conv
|
|
|
|
use an 8.8 accumulator ... build the scale into the 8.8 coeffs ... no div at
|
|
the end, just a shift
|
|
|
|
need 8 x 8.8 -> 8.8 for each coeff though
|
|
|
|
- im_conv()/im_morph() could have more than 10 programs? try 20 and see if we
|
|
still have a speedup
|
|
|
|
make a base class for vector area operations with a matrix with three vfuncs
|
|
for init / generate code for one element / end and a gslist of programs, use
|
|
that as the base for morph and conv
|
|
|
|
wait for vipsobject for this
|
|
|
|
- we have aconv and aconvsep
|
|
|
|
test timing, make sure it;s worth having a separate aconvsep version
|
|
|
|
if it is, make im_aconvsep an optimisation: call im_aconvsep_raw() from
|
|
vips_conv() if mask width or height == 1 and prec == APPROX
|
|
|
|
now we can get rid of im_aconvsep() since it's just vips_convsep() with prec
|
|
set to approx
|
|
|
|
aconv needs some more work, get it going at least with gaussian
|
|
|
|
|
|
arithmetic
|
|
==========
|
|
|
|
- HAVE_HYPOT could define a hypot() macro?
|
|
|
|
- fix a better NaN policy
|
|
|
|
should we not generate images containing NaN (eg. divide tries to avoid /0),
|
|
or should vips_max() etc. try to avoid NaN in images (eg. vips_max() takes a
|
|
lot a care to skip NaN, though vips_stats() does not)?
|
|
|
|
|
|
iofuncs
|
|
=======
|
|
|
|
- need vips_image_invalidate_area()
|
|
|
|
- look at libpeas for plugin support
|
|
|
|
http://live.gnome.org/Libpeas
|
|
|
|
- how about
|
|
|
|
vips max add[babe.jpg,babe2.jpg]
|
|
|
|
does that make any sense?
|
|
|
|
vips copy add[babe.jpg,add[babe2.jpg,babe3.jpg]] sum.v
|
|
|
|
perhaps use curly brackets for code?
|
|
|
|
vips max add{babe.jpg,babe2.jpg}
|
|
|
|
no brackets or square brackets for options
|
|
|
|
- transform_g_string_array_image() can't handle quoted strings, so filenames
|
|
with spaces will break
|
|
|
|
is there an easy fix? can we reuse code from the csv parser?
|
|
|
|
the csv parser just parses FILE* streams, we'd need to break it out
|
|
|
|
- note member free stuff in vipsobject docs
|
|
|
|
should boxed get freed in finalise rather than dispose?
|
|
|
|
vipsobject has few docs atm :(
|
|
|
|
- vips_object_set_argument_from_string() needs more arg types
|
|
|
|
must be some way to make this more automatic
|
|
|
|
- generate the code for vips_add() etc. automatically? it might be
|
|
nice to have them all in one place at least
|
|
|
|
- what does G_UNLIKELY() do? can we use it?
|
|
|
|
- look into G_GNUC_DEPRECATED for back compat in vips8
|
|
|
|
- should im_rwcheck() copy to disc?
|
|
|
|
maybe im_rwcheck_disc() copies to im->filename and maps that
|
|
|
|
rather awkward to do atm with the way check.c is structured
|
|
|
|
|
|
swig
|
|
====
|
|
|
|
- swig is not wrapping im_project() correctly ... returns an extra VImage via
|
|
a param
|
|
|
|
- doc strings would be nice, read the SWIG notes on this
|
|
|
|
|
|
new bindings
|
|
============
|
|
|
|
- new binding is still missing constants
|
|
|
|
how do boxed types work? confusing
|
|
|
|
we need to be able to make a VipsArrayDouble
|
|
|
|
- Vips.Image has members like chain, __subclasshook__ etc etc, are we
|
|
really subclassing it correctly?
|
|
|
|
- add __add__ etc overloads
|
|
|
|
|
|
freq_filt
|
|
=========
|
|
|
|
- fft with odd width or height is broken ... DC ends up in the wrong place
|
|
|
|
|
|
libvipsCC
|
|
=========
|
|
|
|
- need new C++ API
|
|
|
|
- need an im_init_world() for C++ which does cmd-line args too, so C++ progs
|
|
can get --vips-progress and stuff automatically
|
|
|
|
|
|
tools
|
|
=====
|
|
|
|
- need a way to make the vips.1 etc. man pages
|
|
|
|
gtk has things like docs/reference/gtk/gtk-update-icon-cache.xml and man
|
|
pages are made from that with xslt
|
|
|
|
- get rid of a lot of the command-line programs, who wants to write a man page
|
|
for batch_image_convert etc yuk
|
|
|
|
- can we make man pages for the API as well? probably not from googling a bit
|
|
|
|
- rename header, edvips as vipsheader, vipsedit
|
|
|
|
maybe have back compat links?
|
|
|
|
|
|
new operations
|
|
==============
|
|
|
|
- bilateral filtering, see:
|
|
|
|
http://en.wikipedia.org/wiki/Bilateral_filter
|
|
http://www.shellandslate.com/fastmedian.html
|
|
http://people.csail.mit.edu/sparis/bf_course/
|
|
|
|
also a mail from Martin Breidt has links to several fast free C
|
|
implementations
|
|
|
|
- http://en.wikipedia.org/wiki/Otsu%27s_method
|
|
|
|
- non-linear sharpen: replace each pixel by the lightest or darkest neighbour
|
|
depending on which is closer in value
|
|
|
|
- look at
|
|
|
|
There is an order 1 algorithm for doing medians over boxes (truly O(1)
|
|
per pixel: I checked it carefully; it's like doing means over boxes in
|
|
order 1 per pixel) in OpenCV since February 2012 I think, due to
|
|
Perreault (and Hebert).
|
|
|
|
It appears to be well respected, at least for 8-bit medians. Very
|
|
memory intensive. Simple and elegant. No clue if it fits VIPS well
|
|
(probably not?).
|
|
|
|
Article: nomis80.org/ctmf.pdf
|
|
|
|
- check CMC equations against web
|
|
|
|
http://en.wikipedia.org/wiki/Color_difference#CMC_l:c_.281984.29
|
|
|
|
- see
|
|
|
|
http://www.dentistry.bham.ac.uk/landinig/software/cdeconv/cdeconv.html
|
|
|
|
sounds useful for BM?
|
|
|