Page 1 of 2

How to convert image to an icon?

PostPosted: January 10th, 2017, 9:30 pm
by j_dean80
Can someone explain in layman's terms how I can convert an image into a HeroScribe icon? The tutorial is a bit over my head.

Re: How to convert image to an icon?

PostPosted: January 12th, 2017, 4:33 pm
by StratosVX
I tried this, but it relied on old files that never worked for me. I believe it was Whitebeard that was able to get his icons to convert though, so you might want to shoot him a message. At some point I'd like to rewrite HeroScribe so that this is a function it can do, but that will likely be a while with my school schedule.

Re: How to convert image to an icon?

PostPosted: January 12th, 2017, 5:19 pm
by j_dean80
StratosVX wrote:At some point I'd like to rewrite HeroScribe so that this is a function it can do, but that will likely be a while with my school schedule.


This is apparently something in the works for the new version, but it has no deadline for coming out.

Re: How to convert image to an icon?

PostPosted: January 14th, 2017, 2:07 pm
by whitebeard
There are actually two topics here:

(1) How do I convert an arbitrary image (bmp, jpg, gif, ect) to a Scalable Vector Graphic (svg, pdf, eps)?

(2) Why is it that my exported PDF file does not display in the correct position in HeroScribe?

Stratos mentioned that I figured out a method for handling (2).

In general I do not do (1). I draw my own SVG in InkScape and export it as an EPS (or look for SVG images directly in Google). This brings up issue (2). And if you get to that point and this problem appears in your tool chain, then I may write a conversion routine to automate the necessary repair for you. Because HeroScribe relies on a slightly older version of Ghostscript, a newly exported file does not appear with the correct offset. EPS files are just text code for how to draw stuff, so I just grab a valid header from a working file and replace the header in the newer file. It is careful work, but a python script or C program could get it done quite easily for maybe 95% of files.

good luck

Re: How to convert image to an icon?

PostPosted: January 14th, 2017, 6:10 pm
by j_dean80
Thanks for the info. I think I understand it a little more and will try and give it a go.

Re: How to convert image to an icon?

PostPosted: January 15th, 2017, 8:38 am
by Anderas
To convert a random image to vector, prepare it in three colors:
The dark main color, which is black or green dependent on your country version.
A not quite white light grey for the interior "white" color.
A full white background.

Care that you have a good resolution.

Go to this website.
http://www.autotracer.org

Convert.

Re: How to convert image to an icon?

PostPosted: January 15th, 2017, 9:49 am
by j_dean80
I found this free site that can convert about any type of file to any other.

https://convertio.co/png-eps/

Re: How to convert image to an icon?

PostPosted: January 15th, 2017, 7:00 pm
by StratosVX
j_dean80 wrote:
StratosVX wrote:At some point I'd like to rewrite HeroScribe so that this is a function it can do, but that will likely be a while with my school schedule.


This is apparently something in the works for the new version, but it has no deadline for coming out.

This has been in the works since I first started using HS. I don't know if Derfel is still around or working on it any longer. I sent him a message about a year and a half ago about the issues I had importing icons but I never heard back from him.

Re: How to convert image to an icon?

PostPosted: January 17th, 2017, 12:15 pm
by j_dean80
Well I figured out InkScape and got all my Icons made. Now I have to tackle getting them into HeroScribe.

Re: How to convert image to an icon?

PostPosted: January 17th, 2017, 1:15 pm
by whitebeard
Good job.

I would recommend testing by replacing one of the existing icons with your icons. If you won't be using these, then you are "done". But editing the XML (text) to add your own is prety easy.

If you used an existing icon as a template, then the scale should be perfect. The final issue being the alignment/centering of you new icons. If everything else is good and this is your problem, send it to me and I will work out what I did last time.