previously an image file would be opened but only ffread when advancing to
the slide, but when the slide was not used it gave an error:
/usr/local/bin/2ff: failed to convert image/png
this changes it to load the image on-demand once and "cache" it.
The child thread was created because execlp will not return if successful.
The eprintf was placed after the call to execlp to catch any error, but the
child continued to return a (closed) fds[0], resulting in a second slideshow
being run by the child.
This commit fixes the issue by killing the child.
Sent now uses farbfeld[0] as an intermediate format. A series of
filters is specified in config.h that matches file extensions to
filter programs. The programs will convert between formats such as
png to farbfeld. Internally in sent we do not need to worry on how
to parse png or any other format.
This also works with jpg and gif and others. The 2ff wrapper will
use imagemagick conversion tools. This is temporary as jpg2ff and
gif2ff will also be implemented.
To make this work, you will have to clone[0] and put png2ff and 2ff
in your PATH.
[0] http://git.2f30.org/farbfeld/
In load() we allocated slides before checking if we actually read
anything from the FILE fp and then continue with an allocated but
“empty” space wich would lead to errors.
When the window background is left at WhitePixel (from initialization) and the
user has set a dark background color in config.h, the window shortly displays
the white default background when clearing after advancing to another slide.
This was very disturbing and is fixed now by setting the default window
background color to the bgcol chosen in config.h.
If the window manager maps our window at the requested size, we may not get a
ConfigureNotify event. This happens e.g. under ratpoison.
The result is that xw.uw and xw.uh are never set, so text is too small and
pngscale() tries to divide by 0.