Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-05-2018, 02:44 PM   #1
domenan
Junior Member
domenan began at the beginning.
 
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).
domenan is offline   Reply With Quote
Old 09-05-2018, 03:47 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
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).
NiLuJe is offline   Reply With Quote
Old 09-05-2018, 03:50 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
You best self-contained bet is probably nanosvg + stb_iw, roughly like this nanosvg example
NiLuJe is offline   Reply With Quote
Old 09-06-2018, 07:30 AM   #4
domenan
Junior Member
domenan began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
Quote:
Originally Posted by NiLuJe View Post
You best self-contained bet is probably nanosvg + stb_iw, roughly like this nanosvg example
Thanks for the suggestion.
I never compiled on a kindle. Do you know where I can find a guide?
domenan is offline   Reply With Quote
Old 09-06-2018, 12:01 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@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.
NiLuJe is offline   Reply With Quote
Old 09-07-2018, 11:11 AM   #6
domenan
Junior Member
domenan began at the beginning.
 
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.
domenan is offline   Reply With Quote
Old 09-07-2018, 12:18 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
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).
Attached Files
File Type: gz svg2png-k3.tar.gz (64.6 KB, 6 views)

Last edited by NiLuJe; 09-08-2018 at 11:16 AM. Reason: Fixed build
NiLuJe is offline   Reply With Quote
Old 09-08-2018, 03:21 AM   #8
domenan
Junior Member
domenan began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2018
Device: kindle
Quote:
Originally Posted by NiLuJe View Post
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).
Thanks for your time NiLuJe.

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?
domenan is offline   Reply With Quote
Old 09-08-2018, 11:16 AM   #9
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Oops, my bad, forgot CPPFLAGS when building.

The updated package should work .
NiLuJe is offline   Reply With Quote
Old 09-09-2018, 06:04 AM   #10
domenan
Junior Member
domenan began at the beginning.
 
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
domenan is offline   Reply With Quote
Old 09-12-2018, 12:23 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,536
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@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.
NiLuJe is offline   Reply With Quote
Reply

Tags
convert, kindle 3, python, svg

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
[Tutorial] Convert TEXT to SVG IMAGE with Inkscape GrannyGrump Workshop 3 04-22-2014 05:38 AM
iBooks: No Support for Selection & Copy/Paste Operations of SVG Texts on EPUB reuben ePub 2 09-22-2010 08:06 AM


All times are GMT -4. The time now is 02:21 PM.


MobileRead.com is a privately owned, operated and funded community.