summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2004-07-12 14:09:14 +0000
committerDom Lachowicz <doml@src.gnome.org>2004-07-12 14:09:14 +0000
commita6d164bd863190ec0e67c11828a60684db384376 (patch)
tree97397677bbf4baf703beedf4c6af7ce52d5fffa3
parent281107985c51ba70d1e2529c3438721c28dda66a (diff)
downloadlibrsvg-a6d164bd863190ec0e67c11828a60684db384376.tar.gz
Update documentation Fix build Refactor a bit - allow for saving to ICO or
* rsvg.1: Update documentation * configure.in: Fix build * test-rsvg.c: Refactor a bit - allow for saving to ICO or anything else that GdkPixbuf supports
-rw-r--r--ChangeLog7
-rw-r--r--configure.in2
-rw-r--r--rsvg.15
-rw-r--r--test-rsvg.c23
4 files changed, 26 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index b31ee717..26e10b02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-12 Dom Lachowicz <cinamod@hotmail.com>
+
+ * rsvg.1: Update documentation
+ * configure.in: Fix build
+ * test-rsvg.c: Refactor a bit - allow for saving to ICO or anything
+ else that GdkPixbuf supports
+
2004-07-10 Dom Lachowicz <cinamod@hotmail.com>
* *.c: Allow for different X & Y resolutions (DPI). This needs more work;
diff --git a/configure.in b/configure.in
index 6452054e..2e8f01a4 100644
--- a/configure.in
+++ b/configure.in
@@ -316,7 +316,7 @@ if test "x$MOZILLA_CONFIG" != "xno"; then
MOZILLA_CFLAGS="-I$_mozilla_include_dir/plugin -I$_mozilla_include_dir/java -I$_mozilla_include_dir/nspr"
else
PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, build_mozilla_plugin=yes,
- [AC_MSG_WARN([mozilla-config not found. Mozilla/Netscape plugin will not be built])]
+ [AC_MSG_WARN([mozilla-config not found. Mozilla/Netscape plugin will not be built])])
fi
build_mozilla_plugin=no
if test "x$MOZILLA_CFLAGS" != "x"; then
diff --git a/rsvg.1 b/rsvg.1
index 1812468b..978d2771 100644
--- a/rsvg.1
+++ b/rsvg.1
@@ -9,7 +9,10 @@ rsvg \- Turn SVG files into raster images
RSVG coverts SVG images into PNG and JPEG raster images.
.SS OPTIONS
.TP
-.I "\-d \-\-dpi number"
+.I "\-d \-\-dpi-x number"
+Set the resolution of the image in pixels per inch. RSVG's current default is 90dpi
+.TP
+.I "\-p \-\-dpi-y number"
Set the resolution of the image in pixels per inch. RSVG's current default is 90dpi
.TP
.I "\-x \-\-x\-zoom number"
diff --git a/test-rsvg.c b/test-rsvg.c
index 3c76394f..0266cfd3 100644
--- a/test-rsvg.c
+++ b/test-rsvg.c
@@ -44,7 +44,7 @@ main (int argc, const char **argv)
int bVersion = 0;
int quality = 100;
char * quality_str = NULL;
- char * format = "png";
+ char * format = NULL;
struct poptOption options_table[] = {
{ "dpi-x", 'd', POPT_ARG_DOUBLE, &dpi_x, 0, "pixels per inch", "<float>"},
@@ -87,10 +87,10 @@ main (int argc, const char **argv)
return 1;
}
- if (strstr (format, "jpeg") != NULL || strstr (format, "jpg") != NULL)
- format = "jpeg";
- else
+ if(format == NULL)
format = "png";
+ else if (strstr (format, "jpg") != NULL) /* backward compatibility */
+ format = "jpeg";
g_type_init ();
@@ -108,12 +108,17 @@ main (int argc, const char **argv)
width, height, NULL);
if (pixbuf)
- if (strcmp (format, "jpeg") != 0 || (quality < 1 || quality > 100)) /* is a png or is an invalid quality */
- gdk_pixbuf_save (pixbuf, args[1], format, NULL, NULL);
+ if (strcmp (format, "jpeg") == 0) {
+ if (quality < 1 || quality > 100) /* is an invalid quality */
+ gdk_pixbuf_save (pixbuf, args[1], format, NULL, NULL);
+ else {
+ quality_str = g_strdup_printf ("%d", quality);
+ gdk_pixbuf_save (pixbuf, args[1], format, NULL, "quality", quality_str, NULL);
+ g_free (quality_str);
+ }
+ }
else {
- quality_str = g_strdup_printf ("%d", quality);
- gdk_pixbuf_save (pixbuf, args[1], format, NULL, "quality", quality_str, NULL);
- g_free (quality_str);
+ gdk_pixbuf_save (pixbuf, args[1], format, NULL, NULL);
}
else {
poptFreeContext (popt_context);