-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]SVG support for Logo #383
Comments
Ok I found this commit 1dea397 and will test to scale my logo. |
So I could not work out how the scaling is working correctly. Which logo is used in default? |
Hi @N0cynym !
What do you expect using a negative scale? But note that (as documented) not all spreadsheet software applies the scale. Also note that the size you get is dependent on the spreadsheet. So you must experiment it for the software you use.
The KiBot logo, a 370x200 PNG embedded in the code. About adding support for SVG: This can be done, but for this KiBot must convert the image to PNG, I don't see any advantage of doing this inside KiBot. |
If I use the scale >1 the logo is to big. A negative scale will remove the logo. Trying a positive scale <1 and >0 give me:
|
Are you using # Example KiBot config file
kibot:
version: 1
outputs:
- name: 'bom_internal'
comment: "Bill of Materials in HTML format"
type: bom
dir: BoM
options:
format: XLSX
xlsx:
logo: docs/images/bot.png
logo_scale: 0.1
col_colors: false And worked perfectly, I got it scaled to a good size, the original PNG looks huge. |
Thanks for your look into it. It's working and my fault was Could you make a note into the README.md what the default size/resolution is of the used logo? This will help if you want to use your own logo. Question: So it's impossible to embed a svg vector graphics in html and xlsx formats? |
Hi @N0cynym ! YAML numbers use a point as decimal separator, like in most programming languages this isn't affected by the user locale. Also note that using quotes you are converting it to a string. About the default: is already documented:
Here the docs says the value must be a number, and its default is 2. About SVG: For the HTML could be possible, but not for the XLSX. I don't see much advantage in doing it for the HTML, in particular knowing that SVGs are problematic. What KiBot could do is convert the SVG to PNG, but this is really low priority. I always wanted to create an output to convert image formats, so it could help in the future |
Ok thank you very much! 👍 I'll have a look into it if I see that a new feature is availible. |
Ok, the above patch adds support for SVGs. Is a good starting point, please report any issue. |
Is your feature request related to a problem? Please describe.
ERROR:In section 'bom_html' (bom): Only PNG images are supported for the logo (kibot - error.py:40)
Describe the solution you'd like
Supporting vector graphics as logo in bill of materials.
Describe alternatives you've considered
Automatic sizing of high resolution png.
I have a 1043x919 px png and use
convert
to resize it.The problem here is that it looks bad after resize.
Additional context
I do currently create one PCB documentation with
pdfunite
and export my generated xlsx spreadsheet withsoffice
.Unfortunately just png is supported which is let the logo look not so nice compared to the rest of the
bom
.It's just a request if this is possible.
The text was updated successfully, but these errors were encountered: