[dpdk-dev] docs: convert from using inkscape to ImageMagick tools

Message ID 1429881789-16060-1-git-send-email-nhorman@tuxdriver.com (mailing list archive)
State Rejected, archived
Headers

Commit Message

Neil Horman April 24, 2015, 1:23 p.m. UTC
Requiring inkscape to convert svg files to png/pdf files, while functional is
difficult for ephemeral build environments (i.e. build systems in which a new
build root is setup for each build), as inkscape and its dependencies typically
totals over 128Mb of code.  Instead, lets use ImageMagick tools.  It gives you
the same output in a much more compact tool suite (512k).

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
---
 mk/rte.sdkdoc.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Mcnamara, John April 27, 2015, 11:01 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman
> Sent: Friday, April 24, 2015 2:23 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] docs: convert from using inkscape to
> ImageMagick tools
> 
> Requiring inkscape to convert svg files to png/pdf files, while functional
> is difficult for ephemeral build environments (i.e. build systems in which
> a new build root is setup for each build), as inkscape and its
> dependencies typically totals over 128Mb of code.  Instead, lets use
> ImageMagick tools.  It gives you the same output in a much more compact
> tool suite (512k).

Hi Neil,

The patch works but the pdf output is different. See the following images for before and after the patch:

    http://imgur.com/GgdXSnF
    http://imgur.com/e9AvTza

It looks like a dpi issue but I'm not sure what exactly. Omitting the -units/-density options renders the images at the right size but the resolution looks slightly worse.

John
--
  

Patch

diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk
index 9952f25..b03bca5 100644
--- a/mk/rte.sdkdoc.mk
+++ b/mk/rte.sdkdoc.mk
@@ -47,7 +47,7 @@  endif
 ifeq '$V' '0'
 RTE_SPHINX_VERBOSE := -q
 RTE_PDFLATEX_VERBOSE := --interaction=batchmode
-RTE_INKSCAPE_VERBOSE := >/dev/null 2>&1
+RTE_CONVERT_VERBOSE := >/dev/null 2>&1
 endif
 
 RTE_PDF_DPI ?= 300
@@ -116,4 +116,5 @@  guides-%:
 $(foreach guide, $(RTE_GUIDES), $(foreach img, $(wildcard $(guide)img/*.svg), \
 	$(eval guides-pdf-$(notdir $(guide:/=)): $(img:svg=pdf))))
 %.pdf: %.svg
-	$(Q)inkscape -d $(RTE_PDF_DPI) -D -f $< -A $@ $(RTE_INKSCAPE_VERBOSE)
+	$(Q)convert -units PixelsPerInch $< -density 300 $@ $(RTE_CONVERT_VERBOSE)
+#	$(Q)inkscape -d $(RTE_PDF_DPI) -D -f $< -A $@ $(RTE_INKSCAPE_VERBOSE)