Commit graph

23 commits

Author SHA1 Message Date
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Hermet Park
1ae92daa9d api: enhance Shape::fill() method usage.
Designate a default value for alpha which is mostly optional.
2023-06-07 12:10:31 +09:00
Martin Capitanio
6f715b46a7 Fix clang compiler warnings.
[clang] Warn on unqualified calls to std::move and std::forward
See: https://reviews.llvm.org/D119670
2023-05-20 20:10:56 +09:00
Hermet Park
fe14e4f499 api: rename beta apis.
- SwCanvas::Colorspace::ABGR8888_STRAIGHT -> SwCanvas::Colorspace::ABGR8888S
- SwCanvas::Colorspace::ARGB8888_STRAIGHT -> SwCanvas::Colorspace::ARGB8888S

@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-05-20 13:22:52 +09:00
Mira Grudzinska
2a0a3950e6 svg2png: rounding up svg width and height
The svg width/height values were cast to int,
which could result in cutting off a small part
of the image. Now, in the case of a non-integer
size, it will be rounded up.

@Issue: https://github.com/thorvg/thorvg/issues/1414
2023-05-05 10:58:54 +09:00
Mira Grudzinska
11b36aa4c9 svg2png: changing image size
For resolution > 8k image's width and height are changed,
but the change was not applied to the image itself. Now fixed.
2023-05-04 09:54:43 +09:00
Hermet Park
aa915ee1c4 Make it silent MSVC's trivial compilation warnings.
@Issue: https://github.com/thorvg/thorvg/issues/1381
2023-04-21 08:28:56 +09:00
Hermet Park
9b3c34c3b1 updated copyright. 2023-01-14 13:48:11 +09:00
Mira Grudzinska
a863f29512 [svg2png] size limitation while converting the file
In case the svg file size is too large, a heap overflow occurred
when conversting to png. To prevent this a size limitation
has been added - the resolution of the resulting png file cannot
be higher than 8k (7680 x 4320).
2022-11-22 22:37:00 +01:00
Vincent Torri
e918a8cb5b fix compilation of svg2png on Windows 2022-08-23 22:41:28 +09:00
Vincent Torri
de87cdc717 Windows: use _fullpath() instead of fullpath().
Fix compilation error
2022-08-17 19:44:05 +09:00
JunsuChoi
8ef075eb27 svg2png: Add more error message types
Add a message according to the returned Result type.
2022-05-06 17:13:43 +09:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
Hermet Park
15412907b8 svg2png: update the error messages.
@Issue: https://github.com/Samsung/thorvg/issues/1031
2021-11-12 12:00:01 +09:00
Michal Maciola
479cea74cc common: Unmultiplicated colorspace
This patch introduces _STRAIGHT colorspaces (ABGR8888_STRAIGHT and
ARGB8888_STRAIGHT) whose colors are un-alpha-premultiplied. Unmultiplicated
colors are especially needed for wasm thorvg loader and svg2png / tvg2png.
Only C version now.

@issue: #791
2021-11-01 15:57:13 +09:00
Michal Maciola
bf2e9631bf
svg2png: changed help message (#762) 2021-08-31 11:19:18 +02:00
Mira Grudzinska
a1480bedb1
svg2png: fixing the args interpretation (#760)
The background color was misinterpreted and its value was treated
as an svg file name (warning was returned).
The color format can not be passed in a `#ffffff` format, since
the '#' sign is used in bash to comment a line and nothiing after
it is loaded.
2021-08-31 11:14:16 +02:00
Michal Maciola
78dd50acc0
svg2png: enhance the feature.
Svg2png fully redesigned.
Introduced whole directory parsing. Created flags interface.

Usage:
   svg2png [svgFileName] [-r resolution] [-b bgColor]

Flags:
    -r set output image resolution.
    -b set output image background color.

Examples:
    $ svg2png input.svg
    $ svg2png input.svg -r 200x200
    $ svg2png input.svg -r 200x200 -b ff00ff
    $ svg2png input1.svg input2.svg -r 200x200 -b ff00ff
2021-08-18 20:29:10 +09:00
JunsuChoi
b17f3cc9a4 svg2png: Clean up code
Modify the code to fit coding style
2021-06-24 11:31:15 +09:00
Hermet Park
a459a53bc7 svg2png: revise code to fix memory violation.
previous code didn't take care of multi-threading.

This revise code to avoid changing canvas buffer during multi-tasking.
2021-06-24 10:52:44 +09:00
Hermet Park
1a7d41ce71 updated copyright 2021-03-23 14:31:58 +09:00
Hermet Park
64c958cd2c bin svg2png: revise abe7187f5b
revise previous patch code.

1. turned off it in default.
2. + copyright declaration.
3. fix coding convention.
2020-09-16 11:22:54 +09:00
JunsuChoi
abe7187f5b
ThorVG/Utils: Convert svg to png (#8)
* thorVG/example: added thorVG example app to convert svg to png

Rasterazing the svg file and extracting it as a png file.
The png encoder uses the 'lodepng' library.
(https://lodev.org/lodepng/)

Usage:
   svg2png [svgFileName] [Resolution] [bgColor]

Examples:
    $ svg2png input.svg
    $ svg2png input.svg 200x200
    $ svg2png input.svg 200x200 ff00ff

* ThorVG/Utils: Change examples to utils

* ThorVG/Utils: Move svg2png from util to src/bin

Renamed the build option for svg2png.
2020-09-16 11:11:50 +09:00