![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
|
Looking for convert bin with svg support
Hello,
I'm trying to convert a svg file to png withing the kindle 3, but to do that I need a version of convert witch has been compiled with support for svg files. Currently I'm using the bin which comes with linkss package which I found on this forum. Can anybody help me? I also tried to find a module that allows me to do the same in python but no luck. I tried with cairosvg and wand but both modules need libs that are not in the kindle (wand) or are not meant to run on python 2.7 (cairosvg). |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I don't build IM with SVG support because that'd require another dependency (in IM's case, librsvg, which depends on a crapload of stuff, so, nooooope).
|
![]() |
![]() |
Advert | |
|
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@domenan: All the gory details you could ever want to know about my cross toolchains are in the x-tc package in the Snapshots thread, but for a first foray into the abyss, the KOReader frontend to that might be more approachable
![]() EDIT: Possibly hard-dep on a Linux box/VM. macOS *might* work, but is not guaranteed to and may require some manual fiddling, and Win32 is... hellish, so, going with nope on that one. Last edited by NiLuJe; 09-06-2018 at 12:04 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
|
It's more complicated than I hoped. Possibly because I didn't compile in C for almost 15 years and also because I don't have a clue how to use a cross toolchain.
Looks like I'm stuck for now. |
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Here's a very simple/naive binary, built out of that example (albeit slightly tweaked to use the first argument as the input filename, and with an updated stb_iw lib).
Last edited by NiLuJe; 09-08-2018 at 11:16 AM. Reason: Fixed build |
![]() |
![]() |
![]() |
#8 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
|
Quote:
The binary is giving me this error "/lib/libc.so.6: version `GLIBC_2.7' not found". I believe that kindle use libc 2.5. How can I solve it? |
|
![]() |
![]() |
![]() |
#9 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oops, my bad, forgot CPPFLAGS when building.
The updated package should work ![]() |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
|
Unfortunately the binary render only lines but ignore text and images.
I found a workaround. Instead of using svg files, I'm using only png files which make the script a bit slower but it works. This is the final image : ![]() And here is the link to the GIT |
![]() |
![]() |
![]() |
#11 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@domenan: It seems to behave as expected on my end (with relatively simple images/icons), bearing in mind the known restrictions of NanoSVG's simple rasterizer :?.
As for text, IM has a FreeType module that can do the job. It's far from efficient, but it works, I'm using it in the ScreenSavers hack ![]() Last edited by NiLuJe; 09-12-2018 at 12:28 PM. |
![]() |
![]() |
![]() |
Tags |
convert, kindle 3, python, svg |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Tutorial] Convert TEXT to SVG IMAGE with Inkscape | GrannyGrump | Workshop | 13 | 04-29-2024 07:17 AM |
Convert SVG to PNG/JPEG in ePUB files | bunglegrind | Conversion | 2 | 04-24-2016 05:01 PM |
convert ODT with multiples svg to epub double the images | reup | Conversion | 8 | 01-27-2016 03:39 AM |
ebook-convert cuts svg styles: what can I do? | iliakan | Conversion | 10 | 01-24-2015 05:16 AM |
iBooks: No Support for Selection & Copy/Paste Operations of SVG Texts on EPUB | reuben | ePub | 2 | 09-22-2010 08:06 AM |