I checked one of my svg files: width="388.347px" height="220.833px"

So I have to find out where these values come from.

Thank you for your help!



-----Ursprüngliche Nachricht-----
Von: Hussein Shafie [mailto:[email protected]] 
Gesendet: Freitag, 1. Juli 2011 17:58
An: Thomas Dumm
Cc: '[email protected]'
Betreff: Re: [XXE] how to generate ePub files with svg-images inside

On 07/01/2011 02:37 PM, Thomas Dumm wrote:
> 
> I have one followup question:
> 
> How do I increase the resolution oft he generated png-file in my epub-file if 
> i stick with the svg to png conversion. 
> I tried the following in the file 
> install_dir/addon/config/docbook5/xslMenu.incl with no effect as far as I can 
> see:
> 
> <convertImage from="raw" to="images" format="png" >
>   <parameter name="dpi">132</parameter>
> </convertImage>
> 

The conversion of SVG to PNG is performed by the Batik plug-in.

* I don't think that parameter dpi may be used to control the size of
the PNG file generated out of the SVG file.

See http://www.xmlmind.com/xmleditor/addons_doc.html#batik_imagetoolkit

* It seems that an SVG file has dimensions in *pixels* and that these
dimensions in pixels are used when creating the PNG file.

Example: XXE_install_dir/demo/graphics/tux.svg:

---
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Sodipodi ("http://www.sodipodi.com/";) -->
<svg
...
   version="1.0"
   x="0"
   y="0"
   width="744.094"
   height="744.094"
...
---

Batik indeed converts tux.svg to a .png file which is 744x744pixels.
I've checked this.

I think your problem comes from the fact that either your SVG files have
no width and height attributes (Batik uses 400x400 as a default) or the
values of these attributes are very small.

If I use Inkscape to change the dimensions of my SVG file (without
changing the graphics) to say, width="30" and height="30", I get a very
low quality image in the EPUB file.



 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to