]> gitweb.michael.orlitzky.com - libsvgtiny-pixbuf.git/log
libsvgtiny-pixbuf.git
4 weeks agoCOPYING: add one to state the "or later" bit master
Michael Orlitzky [Mon, 6 May 2024 18:36:55 +0000 (14:36 -0400)]
COPYING: add one to state the "or later" bit

9 months agoconfigure.ac: update to v0.0.2. 0.0.2
Michael Orlitzky [Wed, 9 Aug 2023 12:16:36 +0000 (08:16 -0400)]
configure.ac: update to v0.0.2.

9 months agoREADME: we no longer conflict with librsvg
Michael Orlitzky [Wed, 9 Aug 2023 04:05:25 +0000 (00:05 -0400)]
README: we no longer conflict with librsvg

9 months ago.gitignore: update shared library names
Michael Orlitzky [Wed, 9 Aug 2023 04:05:10 +0000 (00:05 -0400)]
.gitignore: update shared library names

9 months agoMakefile.am: update library name to avoid conflict with librsvg
Michael Orlitzky [Wed, 9 Aug 2023 04:03:41 +0000 (00:03 -0400)]
Makefile.am: update library name to avoid conflict with librsvg

With this change, installing libsvgtiny-pixbuf alongside librsvg
should be possible. The mime types still "conflict," but the librsvg
library will come last alphabetically and should take therefore take
precendence (source: I tried it both ways). As for the thumbnailers:
it doesn't matter which gets run. They both literally do the same
thing.

The test suite also continues to exercise the correct library, even
when librsvg is installed. It seems that GDK_PIXBUF_MODULE_FILE takes
precedence over the system loader cache.

9 months agoio-svg.c: improve documentation; drop the unused size_func field.
Michael Orlitzky [Wed, 9 Aug 2023 04:02:32 +0000 (00:02 -0400)]
io-svg.c: improve documentation; drop the unused size_func field.

9 months agoREADME: wording tweaks 0.0.1
Michael Orlitzky [Wed, 9 Aug 2023 00:25:11 +0000 (20:25 -0400)]
README: wording tweaks

9 months agotest-cases: add a few more test cases targeted at certain code paths
Michael Orlitzky [Tue, 8 Aug 2023 14:53:15 +0000 (10:53 -0400)]
test-cases: add a few more test cases targeted at certain code paths

9 months agorun-tests.sh: hack a path to allow ./run-tests.sh outside of automake
Michael Orlitzky [Tue, 8 Aug 2023 14:52:55 +0000 (10:52 -0400)]
run-tests.sh: hack a path to allow ./run-tests.sh outside of automake

9 months agoMakefile.am,run-tests.sh: new bare-bones test suite
Michael Orlitzky [Tue, 8 Aug 2023 14:41:04 +0000 (10:41 -0400)]
Makefile.am,run-tests.sh: new bare-bones test suite

Does it segfault? No? Ship it!

9 months agotest-cases/Ghostscript_Tiger.svg: new file; start adding test cases
Michael Orlitzky [Tue, 8 Aug 2023 14:40:48 +0000 (10:40 -0400)]
test-cases/Ghostscript_Tiger.svg: new file; start adding test cases

9 months agoMakefile.am: include gdk_pixbuf_get_from_surface.h in the tarball
Michael Orlitzky [Tue, 8 Aug 2023 14:06:55 +0000 (10:06 -0400)]
Makefile.am: include gdk_pixbuf_get_from_surface.h in the tarball

10 months agogdk_pixbuf_get_from_surface.h: make gdk_pixbuf_get_from_surface() static
Michael Orlitzky [Tue, 8 Aug 2023 00:16:49 +0000 (20:16 -0400)]
gdk_pixbuf_get_from_surface.h: make gdk_pixbuf_get_from_surface() static

We don't want to clash with the real one.

10 months agoMakefile.am,configure.ac: stop using GTK4
Michael Orlitzky [Tue, 8 Aug 2023 00:14:26 +0000 (20:14 -0400)]
Makefile.am,configure.ac: stop using GTK4

10 months agoio-svg.c: use new gdk_pixbuf_get_from_surface.h; drop gdk/gdk.h
Michael Orlitzky [Tue, 8 Aug 2023 00:13:43 +0000 (20:13 -0400)]
io-svg.c: use new gdk_pixbuf_get_from_surface.h; drop gdk/gdk.h

10 months agogdk_pixbuf_get_from_surface.h: new file copy/pasted from GDK
Michael Orlitzky [Tue, 8 Aug 2023 00:08:59 +0000 (20:08 -0400)]
gdk_pixbuf_get_from_surface.h: new file copy/pasted from GDK

This contains the implementation of the (deprecated) function
gdk_pixbuf_get_from_surface(). The main reason we want it inline is to
avoid the need to link with GTK/GDK itself in our pixbuf loader, on
which GDK and GTK should depend. Specifically we don't want to have to
worry about mismatched major versions of GTK.

10 months agoio-svg.c: add a mutex around svgtiny_parse()
Michael Orlitzky [Mon, 7 Aug 2023 23:31:08 +0000 (19:31 -0400)]
io-svg.c: add a mutex around svgtiny_parse()

This works around (what appears to be) a thread-safety issue in
libwapcaplet:

  https://bugs.netsurf-browser.org/mantis/view.php?id=2857

10 months agoio-svg.c: use libxml2 to implement the <xi:include> parser
Michael Orlitzky [Mon, 7 Aug 2023 22:48:06 +0000 (18:48 -0400)]
io-svg.c: use libxml2 to implement the <xi:include> parser

10 months agoMakefile.am,configure.ac: prepare for libxml2
Michael Orlitzky [Mon, 7 Aug 2023 21:50:07 +0000 (17:50 -0400)]
Makefile.am,configure.ac: prepare for libxml2

I'm going to write my awful strstr-based XML parser with libxml2
soon. Have ./configure look for it and "make" use it.

10 months agoio-svg.c: first attempt at handling content after an XInclude
Michael Orlitzky [Mon, 7 Aug 2023 02:36:47 +0000 (22:36 -0400)]
io-svg.c: first attempt at handling content after an XInclude

It turns out that gtk3 (but not gtk4) will sometimes wrap its
<xi:include> tag with a <g> tag that specifies some opacity; see
gtk/gtkicontheme.c in the gtk+-3.0 sources. Currently we are keeping
everything before the <xi:include> tag and dropping everything after
it, which results in mismatched tags because we keep the <g> and then
chop off the </g>. I've hacked something together that looks like it
works but it needs a post-sleep reread.

10 months agoio-svg.c: constify some arguments.
Michael Orlitzky [Mon, 7 Aug 2023 02:01:59 +0000 (22:01 -0400)]
io-svg.c: constify some arguments.

10 months agoio-svg.c: defend against things that shouldn't happen
Michael Orlitzky [Mon, 7 Aug 2023 00:49:59 +0000 (20:49 -0400)]
io-svg.c: defend against things that shouldn't happen

10 months agoio-svg.c: do nothing if we're handed an increment of size zero
Michael Orlitzky [Mon, 7 Aug 2023 00:44:29 +0000 (20:44 -0400)]
io-svg.c: do nothing if we're handed an increment of size zero

10 months agoREADME: mention the symbolic SVG problem
Michael Orlitzky [Sun, 6 Aug 2023 17:39:36 +0000 (13:39 -0400)]
README: mention the symbolic SVG problem

10 months agoio-svg.c: make two comments more informative
Michael Orlitzky [Sun, 6 Aug 2023 17:28:43 +0000 (13:28 -0400)]
io-svg.c: make two comments more informative

10 months agoio-svg.c: try to use stupid gtypes consistently.
Michael Orlitzky [Sun, 6 Aug 2023 17:27:07 +0000 (13:27 -0400)]
io-svg.c: try to use stupid gtypes consistently.

10 months agoio-svg.c: clean up compiler warnings
Michael Orlitzky [Sun, 6 Aug 2023 17:13:39 +0000 (13:13 -0400)]
io-svg.c: clean up compiler warnings

10 months agoio-svg.c: initial support for gtk-encode-symbolic-svg
Michael Orlitzky [Sun, 6 Aug 2023 14:38:32 +0000 (10:38 -0400)]
io-svg.c: initial support for gtk-encode-symbolic-svg

There's some extra librsvg-specific magic we need to be able to handle
to support the gtk-encode-symbolic-svg utility. The result is still
incorrect (I don't think libsvgtiny supports <style> elements in an
SVG), but at least it's no longer outputting blank PNGs.

10 months agoio-svg.c: simplify memory management for context->svg_data
Michael Orlitzky [Sun, 6 Aug 2023 06:05:38 +0000 (02:05 -0400)]
io-svg.c: simplify memory management for context->svg_data

Match up the malloc/free for this buffer rather than freeing it as
soon as possible in some helper function three levels down.

10 months agoio-svg.c: drop some commented example code that was never used
Michael Orlitzky [Sun, 6 Aug 2023 04:34:06 +0000 (00:34 -0400)]
io-svg.c: drop some commented example code that was never used

10 months agoio-svg.c: update libsvgtiny error descriptions.
Michael Orlitzky [Sat, 5 Aug 2023 21:59:45 +0000 (17:59 -0400)]
io-svg.c: update libsvgtiny error descriptions.

The libsvgtiny README gives you some idea of what they mean.

10 months agoio-svg.c: whitespace cleanup.
Michael Orlitzky [Sat, 5 Aug 2023 17:48:59 +0000 (13:48 -0400)]
io-svg.c: whitespace cleanup.

10 months agoio-svg.c: realloc() on each incremental load.
Michael Orlitzky [Sat, 5 Aug 2023 17:40:28 +0000 (13:40 -0400)]
io-svg.c: realloc() on each incremental load.

This will reallocate more often -- once per increment, rather than
during only those increments where we run out of space -- but it
simplifies the logic. And I actually suspect that my computer might be
smart sometimes and can avoid some of these reallocations on its own.

10 months agoconfigure.ac: hack around "make distcheck" failure.
Michael Orlitzky [Sat, 5 Aug 2023 16:10:11 +0000 (12:10 -0400)]
configure.ac: hack around "make distcheck" failure.

10 months ago.gitignore,m4/.gitignore: add gitignore files.
Michael Orlitzky [Sat, 5 Aug 2023 15:14:53 +0000 (11:14 -0400)]
.gitignore,m4/.gitignore: add gitignore files.

We do the m4 one separately to ensure that the m4 directory
exists. Otherwise autoreconf -fi complains.

10 months agoREADME: add one.
Michael Orlitzky [Sat, 5 Aug 2023 15:07:49 +0000 (11:07 -0400)]
README: add one.

10 months agoconfigure.ac,Makefile.am: build and install the new thumbnailer.
Michael Orlitzky [Sat, 5 Aug 2023 14:10:46 +0000 (10:10 -0400)]
configure.ac,Makefile.am: build and install the new thumbnailer.

10 months agolibsvgtiny.thumbnailer.in: new thumbnailer template
Michael Orlitzky [Sat, 5 Aug 2023 14:10:33 +0000 (10:10 -0400)]
libsvgtiny.thumbnailer.in: new thumbnailer template

10 months agoio-svg.c: back to diagram width and height once again.
Michael Orlitzky [Sat, 5 Aug 2023 02:51:12 +0000 (22:51 -0400)]
io-svg.c: back to diagram width and height once again.

10 months agoio-svg.c: remove code for non-incremental loading.
Michael Orlitzky [Sat, 5 Aug 2023 02:13:06 +0000 (22:13 -0400)]
io-svg.c: remove code for non-incremental loading.

This requires you to completely install the module before testing with
svg2png, but it makes sure that we test the real (incremental) code
path that gets used.

10 months agoio-svg.c: miscellaneous documentation and error-handling improvements.
Michael Orlitzky [Sat, 5 Aug 2023 01:27:31 +0000 (21:27 -0400)]
io-svg.c: miscellaneous documentation and error-handling improvements.

10 months agoio-svg.c: more work towards incremental loading (not functional yet).
Michael Orlitzky [Fri, 4 Aug 2023 23:34:53 +0000 (19:34 -0400)]
io-svg.c: more work towards incremental loading (not functional yet).

10 months agoio-svg.c: add "incremental load" scaffolding.
Michael Orlitzky [Fri, 4 Aug 2023 22:33:48 +0000 (18:33 -0400)]
io-svg.c: add "incremental load" scaffolding.

10 months agoMakefile.am: don't version the shared library.
Michael Orlitzky [Fri, 4 Aug 2023 20:52:40 +0000 (16:52 -0400)]
Makefile.am: don't version the shared library.

10 months agoMakefile.am: don't install the svg2png test program.
Michael Orlitzky [Fri, 4 Aug 2023 20:11:02 +0000 (16:11 -0400)]
Makefile.am: don't install the svg2png test program.

10 months agoconfigure.ac,Makefile.am: build both a library and an executable.
Michael Orlitzky [Fri, 4 Aug 2023 20:00:08 +0000 (16:00 -0400)]
configure.ac,Makefile.am: build both a library and an executable.

10 months agoexample.c: rename to io-svg.c (standard upstream pixbuf loader filename).
Michael Orlitzky [Fri, 4 Aug 2023 19:59:35 +0000 (15:59 -0400)]
example.c: rename to io-svg.c (standard upstream pixbuf loader filename).

10 months agoexample.c: improve GError handling.
Michael Orlitzky [Fri, 4 Aug 2023 18:43:15 +0000 (14:43 -0400)]
example.c: improve GError handling.

10 months agoexample.c: refactor to eliminate copy/pasted code.
Michael Orlitzky [Fri, 4 Aug 2023 17:59:57 +0000 (13:59 -0400)]
example.c: refactor to eliminate copy/pasted code.

10 months agoexample.c: use transparent background.
Michael Orlitzky [Fri, 4 Aug 2023 13:19:51 +0000 (09:19 -0400)]
example.c: use transparent background.

10 months agoexample.c: go back to viewport width/height.
Michael Orlitzky [Fri, 4 Aug 2023 13:12:00 +0000 (09:12 -0400)]
example.c: go back to viewport width/height.

10 months agoexample.c,Makefile.am: begin adding GdkPixbufModule parts.
Michael Orlitzky [Fri, 4 Aug 2023 13:05:00 +0000 (09:05 -0400)]
example.c,Makefile.am: begin adding GdkPixbufModule parts.

10 months agoexample.c: render to diagram width/height instead of the viewport's.
Michael Orlitzky [Fri, 4 Aug 2023 12:21:01 +0000 (08:21 -0400)]
example.c: render to diagram width/height instead of the viewport's.

10 months agoLICENSE: add AGPLv3.
Michael Orlitzky [Fri, 4 Aug 2023 11:39:39 +0000 (07:39 -0400)]
LICENSE: add AGPLv3.

10 months agoexample.c: switch back to the stream-based file API.
Michael Orlitzky [Fri, 4 Aug 2023 02:14:45 +0000 (22:14 -0400)]
example.c: switch back to the stream-based file API.

GdkPixbuf's module->load function takes a FILE* and not a path (or
descriptor), so let's go back to that.

10 months agoexample.c: use GdkPixbuf instead of Cairo for SVG -> PNG conversion.
Michael Orlitzky [Fri, 4 Aug 2023 01:58:15 +0000 (21:58 -0400)]
example.c: use GdkPixbuf instead of Cairo for SVG -> PNG conversion.

10 months agoMakefile.am,configure.ac: pull in gtk4 and gdk-pixbuf-2.0.
Michael Orlitzky [Fri, 4 Aug 2023 01:57:54 +0000 (21:57 -0400)]
Makefile.am,configure.ac: pull in gtk4 and gdk-pixbuf-2.0.

10 months agoexample.c: factor out cairo_context_from_diagram().
Michael Orlitzky [Fri, 4 Aug 2023 01:20:25 +0000 (21:20 -0400)]
example.c: factor out cairo_context_from_diagram().

10 months agoexample.c: factor out svgtiny_diagram_from_path().
Michael Orlitzky [Fri, 4 Aug 2023 00:45:41 +0000 (20:45 -0400)]
example.c: factor out svgtiny_diagram_from_path().

10 months agoGhostscript_Tiger.svg: drop from repository; no longer hard-coded.
Michael Orlitzky [Fri, 4 Aug 2023 00:13:33 +0000 (20:13 -0400)]
Ghostscript_Tiger.svg: drop from repository; no longer hard-coded.

10 months agoexample.c: take INPUT/OUTPUT filenames as arguments.
Michael Orlitzky [Fri, 4 Aug 2023 00:13:13 +0000 (20:13 -0400)]
example.c: take INPUT/OUTPUT filenames as arguments.

10 months agoexample.c: get SVG -> PNG conversion via libsvgtiny/cairo working.
Michael Orlitzky [Thu, 3 Aug 2023 20:56:06 +0000 (16:56 -0400)]
example.c: get SVG -> PNG conversion via libsvgtiny/cairo working.

10 months agoGhostscript_Tiger.svg: add the example file that everyone uses.
Michael Orlitzky [Thu, 3 Aug 2023 20:55:47 +0000 (16:55 -0400)]
Ghostscript_Tiger.svg: add the example file that everyone uses.

10 months agoMakefile.am: use "CFLAGS" from pkg-config.
Michael Orlitzky [Thu, 3 Aug 2023 20:55:31 +0000 (16:55 -0400)]
Makefile.am: use "CFLAGS" from pkg-config.

10 months agoAdd autotools build system and rename some things.
Michael Orlitzky [Thu, 3 Aug 2023 19:13:00 +0000 (15:13 -0400)]
Add autotools build system and rename some things.

10 months agoInitial commit of Hello, world!
Michael Orlitzky [Thu, 3 Aug 2023 18:48:58 +0000 (14:48 -0400)]
Initial commit of Hello, world!