lunasvg is a standalone SVG rendering library in C++

Overview

LunaSVG

lunasvg is a standalone SVG rendering library in C++

svg2png generated PNG

Example

#include <lunasvg/document.h>

using namespace lunasvg;

int main()
{
    auto document = Document::loadFromFile("tiger.svg");
    auto bitmap = document->renderToBitmap();

    // do something useful with the bitmap here.

    return 0;
}

Features

  • Basic Shapes
  • Document Structures
  • Coordinate Systems, Transformations and Units
  • SolidColors
  • Gradients
  • Patterns
  • Masks
  • ClipPaths
  • Markers

TODO

  • Texts
  • Filters
  • Images
  • StyleSheet

Build

git clone https://github.com/sammycage/lunasvg.git
cd lunasvg
mkdir build
cd build
cmake ..
make -j 2

To install lunasvg library.

make install

Demo

While building lunasvg example it generates a simple SVG to PNG converter which can be used to convert SVG file to PNG file.

Run Demo.

svg2png [filename] [resolution] [bgColor]

Support

If you like the work lunasvg is doing please consider a small donation:

Issues
  • Sliding over SVG?

    Sliding over SVG?

    Currently I am using nanosvg on some project and I want to change it with lunasvg because of performance issues. However when I try to render some SVG string I get whole SVG rendered like this (btw I am using translate method to shift the svg.): luna_out

    However I want to process this normally big (7k x 7k) image tile by tile. With nanosvg I could do this with no overhead. Is there any way to achieve this in lunasvg? Currently my code is like this:

    	svgImage = lunasvg::Document::loadFromData(svgStr);
    	svgImage->translate(-x, -y) ;
    	lunasvg::Bitmap bitmap = svgImage->renderToBitmap(width, height);
            
            // opencv section
            auto res = cv::Mat(height, width, CV_8UC4);
    	res.data = bitmap.data();
    	cv::cvtColor(res, res, CV_RGBA2GRAY);
    	res = res > 0;
    
    enhancement 
    opened by erentknn 18
  • SVG image rotation

    SVG image rotation

    How to rotate a final SVG image so that it would be rendered correctly without cropping? It would be nice to have a method to render a rotated and scaled SVG image, like this:

    Bitmap Document::renderToBitmapRotated(double angle, double scale, std::uint32_t backgroundColor) const;

    enhancement 
    opened by viktoras-pal 10
  • How to add this library as external using git submodule?

    How to add this library as external using git submodule?

    I cannot find variables like LUNASVG_INCLUDE_DIRS and LUNASVG_LIBRARIES to use.

    add_subdirectory(${EXTERNAL_DIR}/lunasvg)
    target_include_directories(main PRIVATE ${LUNASVG_INCLUDE_DIRS})
    target_link_libraries(main ${LUNASVG_LIBRARIES})
    
    enhancement question 
    opened by lwyj123 9
  • API for background image

    API for background image

    Using Bitmap(std::uint8_t* data, std::uint32_t width, std::uint32_t height, std::uint32_t stride); one can supply a custom buffer with a background image.

    However, both render and renderToBitmap have a background color. Does this mean that lunasvg will always overwrite the custom background?

    enhancement question 
    opened by zcream 7
  • Text anchor is not working properly

    Text anchor is not working properly

    I'm trying to draw text based off this svg string:

    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" width="341.33333333333326" height="176" viewBox="-33.33333333333333 1 341.3333333333333 176"></path></g><text x="5" y="160" te
    xt-anchor="end" font-size="40" font-family="Arial" stroke-width="4" stroke="none" fill="black" >A</text><text x="195" y="160" text-anchor="start" font-size="40" font-family="Arial" stroke-width="4" stroke="none" fill="black" >1-327</text></svg>
    

    I tested it online and it works, I'm guessing however some setting inside this svg isn't supported yet? My question is what can I remove or change about this svg while keeping the basic text and text location and have it show up using lunasvg?

    Tested using built 1.4.2 version of the library, or should I be just using master?

    Any help is appreciated, thank you.

    bug question 
    opened by JackGit3 7
  • Shape is unexpectedly asymmetric

    Shape is unexpectedly asymmetric

    https://github.com/lichess-org/lila/blob/master/public/piece/cburnett/bK.svg

    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="http://www.w3.org/2000/svg" width="45" height="45">
       <g fill="none" fill-rule="evenodd" stroke="#000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
          <path d="M22.5 11.63V6" stroke-linejoin="miter" />
          <path d="M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5" fill="#000" stroke-linecap="butt" stroke-linejoin="miter" />
          <path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V27v-3.5c-3.5-7.5-13-10.5-16-4-3 6 5 10 5 10V37z" fill="#000" />
          <path d="M20 8h5" stroke-linejoin="miter" />
          <path d="M32 29.5s8.5-4 6.03-9.65C34.15 14 25 18 22.5 24.5l.01 2.1-.01-2.1C20 18 9.906 14 6.997 19.85c-2.497 5.65 4.853 9 4.853 9" stroke="#ececec" />
          <path d="M11.5 30c5.5-3 15.5-3 21 0m-21 3.5c5.5-3 15.5-3 21 0m-21 3.5c5.5-3 15.5-3 21 0" stroke="#ececec" />
       </g>
    </svg>
    

    Expected: image Actual: image

    bug 
    opened by Pospelove 6
  • The order of multiplication of the document matrix is ​​not clearly indicated

    The order of multiplication of the document matrix is ​​not clearly indicated

    By doing

    document
        ->scale(0.5, 0.5)
        ->translate(0, 25)
    

    I would expect the document to be scaled, then translated by the appropriate amounts

    But since the translate function is implemented as

    Document* Document::translate(double tx, double ty)
    {
        root->transform.translate(tx, ty);
        return this;
    }
    

    which in turn

    Transform& Transform::translate(double tx, double ty)
    {
        *this = translated(tx, ty) * *this;
        return *this;
    }
    

    which is actually a pre-multiply as indicated by:

    Transform& Transform::premultiply(const Transform& transform)
    {
        *this = transform * *this;
        return *this;
    }
    
    Transform& Transform::postmultiply(const Transform& transform)
    {
        *this = *this * transform;
        return *this;
    }
    

    by doing

    document
        ->scale(0.5, 0.5)
        ->translate(0, 25)
    

    you first translate, then scale the document instead of the (expected) other way around.

    I believe Document::translate and consorts (Document::scale, Document::rotate and Document::shear) should be implemented with an explicit post-mutiply

    Document* Document::translate(double tx, double ty)
    {
        root->transform.postMultiply(Transform::translated(tx, ty));
        return this;
    }
    
    documentation question 
    opened by FlorianDenis 6
  • Issues linking, compiler statement fine

    Issues linking, compiler statement fine

    I built the library from source via cmake .. inside my build folder, then used the generated Visual Studio project to build all files. In Debug, I copied the newly-generated library file into my MinGW's library path. After, I created the following example project:

    #include <lunasvg.h>
    
    int main () {
    	using namespace lunasvg;
    
    	auto doc = Document::loadFromFile ("svgtest.svg");
    	if (doc == nullptr)
    		return 1;
    
    	doc->rotate (45);
    	Bitmap bitmap = doc->renderToBitmap ();
    
    	return 0;
    }
    

    then compiled with g++ test.cpp -o b.exe -llunasvg:

    C:\Users\james\AppData\Local\Temp\ccr7qqTq.o:test.cpp:(.text+0xc0): undefined reference to `lunasvg::Document::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
    > const&)'
    C:\Users\james\AppData\Local\Temp\ccr7qqTq.o:test.cpp:(.text+0x10c): undefined reference to `lunasvg::Document::rotate(double)'
    C:\Users\james\AppData\Local\Temp\ccr7qqTq.o:test.cpp:(.text+0x140): undefined reference to `lunasvg::Document::renderToBitmap(unsigned int, unsigned int, unsigned int) const'
    C:\Users\james\AppData\Local\Temp\ccr7qqTq.o:test.cpp:(.text$_ZNKSt14default_deleteIN7lunasvg8DocumentEEclEPS1_[__ZNKSt14default_deleteIN7lunasvg8DocumentEEclEPS1_]+0x14): undefined reference to `lunasv
    g::Document::~Document()'
    collect2.exe: error: ld returned 1 exit status
    

    No errors had shown up in my IDE, and had the library not existed, MinGW would have told me. Have I missed a step?

    question cmake 
    opened by Jamesthe1 6
  • Read text from svg file

    Read text from svg file

    I have seen the previous issues about reading text from svg file. Can I get more detailed about it? Or another example of the improvement you made? If I use the loadfromdata() function, what kind of string can be inserted into the function for reading text from svg?I tried to use the text tag but it was not so successful.

    question 
    opened by OriBibi 6
  • Consistency in Scaling

    Consistency in Scaling

    Hi, @sammycage.

    When I changed documentWidth and documentHeight in the svg2png example as follows, the image content was cropped in some cases.

            double documentWidth = document.documentWidth() * 0.5;
            double documentHeight = document.documentHeight() * 0.5;
    

    scaled:

    image

    cropped:

    image

    Is there a consistent way to scale the content to fit the lunasvg::Bitmap size without cropping?

    svgren has a option to request a size, and it works as I expect. https://github.com/igagis/svgren/blob/ca45437ab6b89430c8336404889b00bc5f0147ef/src/svgren/render.hpp#L12-L27

    Here are the test files.

    enhancement 
    opened by Reputeless 6
  • Add the ability to replace colors

    Add the ability to replace colors

    void set_convert_colors(Dictionary *p_replace_color) {
    	if (p_replace_color) {
    		Dictionary replace_color = *p_replace_color;
    		for (int i = 0; i < replace_color.keys().size(); i++) {
    			Variant o_c = replace_color.keys()[i];
    			Variant n_c = replace_color[replace_color.keys()[i]];
    			if (o_c.get_type() == Variant::COLOR && n_c.get_type() == Variant::COLOR) {
    				Color old_color = o_c;
    				Color new_color = n_c;
    				replace_colors.old_colors.push_back(old_color.to_abgr32());
    				replace_colors.new_colors.push_back(new_color.to_abgr32());
    			}
    		}
    	} else {
    		replace_colors.old_colors.clear();
    		replace_colors.new_colors.clear();
    	}
    }
    

    Use to make light and dark theme variations of svg icons.

    enhancement question 
    opened by fire 5
  • Add soversion

    Add soversion

    Also, a soversion must be added to a shared library in order to be packaged. This would do a soversion of 2, because the major version of the project release is 2.

    opened by gombosg 0
  • Make library output variable settable in CMakeLists

    Make library output variable settable in CMakeLists

    Hey, I'm trying to package moneymanagerex in Fedora and also packaging this as a dependency. LUNASVG_LIBDIR needs to be settable from the command line because lib64 is needed as an output directory. I created a patch in the specfile but I should also get the patch merged upstream if possible. 🙂 Thanks!

    opened by gombosg 0
  • Case where gradient is lost

    Case where gradient is lost

    Hi,

    I found an issue where a gradient isn't loaded or rendered correctly, see attached repro case.

    <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
    <rect width="40" height="40" rx="6" fill="#18181B"/>
    <rect width="40" height="40" rx="6" fill="#9F81DD"/>
    <rect width="40" height="40" rx="6" fill="url(#paint0_radial_1325_17657)"/>
    <rect width="40" height="40" rx="6" fill="url(#paint1_radial_1325_17657)"/>
    <rect width="40" height="40" rx="6" fill="url(#paint2_radial_1325_17657)"/>
    <path d="M14 19.25C13.5858 19.25 13.25 19.5858 13.25 20C13.25 20.4142 13.5858 20.75 14 20.75H19.25V26C19.25 26.4142 19.5858 26.75 20 26.75C20.4142 26.75 20.75 26.4142 20.75 26V20.75H26C26.4142 20.75 26.75 20.4142 26.75 20C26.75 19.5858 26.4142 19.25 26 19.25H20.75V14C20.75 13.5858 20.4142 13.25 20 13.25C19.5858 13.25 19.25 13.5858 19.25 14V19.25H14Z" fill="white"/>
    <defs>
    <radialGradient id="paint0_radial_1325_17657" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31.8667 33.9535) rotate(-161.408) scale(19.6945 15.4579)">
    <stop stop-color="#CE5ACE"/>
    <stop offset="1" stop-color="#B139B1" stop-opacity="0"/>
    </radialGradient>
    <radialGradient id="paint1_radial_1325_17657" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(40 8.60465) rotate(156.196) scale(43.7191 35.479)">
    <stop stop-color="#FF075A"/>
    <stop offset="1" stop-color="#FC407F" stop-opacity="0"/>
    </radialGradient>
    <radialGradient id="paint2_radial_1325_17657" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(-2.5133e-07 18.1395) rotate(5.4116) scale(41.9202 87.8269)">
    <stop stop-color="#23C9FF"/>
    <stop offset="1" stop-color="#60D4FA" stop-opacity="0"/>
    </radialGradient>
    </defs>
    </svg>
    

    add_button

    bug 
    opened by ifiddynine 1
  • Build error on Win 10 VS 2019

    Build error on Win 10 VS 2019

    Build error: Error (active) E0042 operand types are incompatible ("const char *" and "char") lunasvg D:\GitHub\lunasvg\source\parser.cpp 774

    Repro:

    1. Open a VS command prompt and execute following commands: git clone https://github.com/sammycage/lunasvg.git cd lunasvg mkdir build cd build cmake ..
    2. Load resultant VS solution and build, will get build errors
    opened by TechArtistG 2
  • gradientUnits with objectBoundingBox misaligned on cubic bezier extents

    gradientUnits with objectBoundingBox misaligned on cubic bezier extents

    The following reduced SVG does not show the red and tips of the gradient because the path bounds computation in LayoutObject::strokeBoundingBox just calls Path::box which computes the loose bounding box purely based on the points without regards to m_commands. That works great for clip regions of subcanvases in RenderState::beginGroup (because it's fast and light, and a few extra pixels of slack is no big deal), but it returns inaccurate extents for gradients because the bezier curve does not actually extend out as far as its control points.

    image

    <svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 48 48" width="48px" height="48px">
    
    <linearGradient id="someGradient" x1="0" x2="1" y1="0" y2="0" gradientUnits="objectBoundingBox">
      <stop offset="0" stop-color="#FF0000"/>
      <stop offset="0.05" stop-color="#FF0000"/>
      <stop offset="0.05" stop-color="#FFFF00"/>
      <stop offset="0.95" stop-color="#FFFF00"/>
      <stop offset="0.95" stop-color="#0000FF"/>
      <stop offset="1" stop-color="#0000FF"/>
    </linearGradient>
    
    <path fill="url(#someGradient)" d="M12,12 C18,6,30,6,36,12 C48,18,48,30,36,36 C30,42,18,42,12,36 C0,30,0,18,12,12 Z"/>
    
    </svg>
    

    I'm in no hurry for a fix - just bringing it to your attention. I'll likely have to compute accurate bounds anyway for correct grid fitting / pixel snapping of shape bounding boxes because I've found icons where the anchors are not at the left/right/top/bottom extents (e.g. see below the icons8.com fluency set forward button) which would be several pixels off otherwise. That will require me to read more though :b (https://floris.briolas.nl/floris/2009/10/bounding-box-of-cubic-bezier/), and then I can try applying it to gradients too...

    image

    opened by fdwr 0
  • SVG Image Different from Google Chrome

    SVG Image Different from Google Chrome

    <svg width="56" height="52" viewBox="0 0 56 52" fill="none" xmlns="http://www.w3.org/2000/svg">
    <g id="&#228;&#188;&#154;&#229;&#145;&#152;&#230;&#161;&#134;" clip-path="url(#clip0_405_3950)">
    <path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M56 0.0958252H0V47.1937H56V0.0958252ZM50 24.1458C50 36.3214 40.1503 46.1917 28 46.1917C15.8497 46.1917 6 36.3214 6 24.1458C6 11.9703 15.8497 2.09999 28 2.09999C40.1503 2.09999 50 11.9703 50 24.1458Z" fill="#0C0C12"/>
    <g id="&#233;&#161;&#181;&#233;&#157;&#162;-1">
    <g id="&#228;&#184;&#170;&#228;&#186;&#186;&#229;&#136;&#135;&#229;&#155;&#190;">
    <g id="&#231;&#188;&#150;&#231;&#187;&#132;-18">
    <g id="&#229;&#164;&#180;&#229;&#131;&#143;&#230;&#161;&#134;">
    <g id="wing-left">
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;" d="M11.0126 44.1555C10.9373 43.8779 11.1419 43.6045 11.4221 43.608L24.6795 44.1892C24.9043 44.1921 25.0878 44.3761 25.0961 44.6071L25.2377 48.6142C25.2464 48.8613 25.052 49.065 24.8115 49.0611L12.4884 48.4407C12.3015 48.4377 12.1387 48.3084 12.0885 48.1233L11.0126 44.1555Z" fill="#785EF7"/>
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;_2" d="M5.54415 39.7202C5.53191 39.4331 5.7921 39.2142 6.06502 39.2819L23.4091 43.2097C23.6281 43.264 23.7667 43.485 23.7237 43.7114L22.9774 47.6388C22.9314 47.8809 22.6967 48.0344 22.4626 47.9755L6.64559 44.2237C6.4637 44.178 6.3331 44.015 6.32493 43.8235L5.54415 39.7202Z" fill="#9582DC"/>
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;_3" d="M2.10626 32.7058C2.14778 32.4216 2.44404 32.2575 2.6993 32.3772C8.01295 34.8296 11.4736 36.4268 13.0814 37.1689C13.0836 37.1699 14.5455 39.6167 17.467 44.5091C17.3767 44.7378 17.1177 44.8427 16.8988 44.7392L2.96415 38.1467C2.79416 38.0662 2.69636 37.8807 2.72405 37.6912L2.10626 32.7058Z" fill="#D3C3FF"/>
    </g>
    <g id="wing-left_2">
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;_4" d="M44.4013 44.1534C44.4764 43.8757 44.2722 43.602 43.9924 43.6056L30.7543 44.1871C30.5297 44.19 30.3465 44.3742 30.3383 44.6053L30.1969 48.6151C30.1882 48.8623 30.3822 49.0662 30.6225 49.0623L42.9276 48.4414C43.1142 48.4384 43.2768 48.3091 43.327 48.1238L44.4013 44.1534Z" fill="#785EF7"/>
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;_5" d="M49.7448 39.7204C49.757 39.4332 49.4972 39.2141 49.2247 39.2819L31.9058 43.2122C31.6871 43.2666 31.5487 43.4877 31.5917 43.7143L32.3369 47.6443C32.3829 47.8866 32.6172 48.0402 32.851 47.9812L48.645 44.227C48.8266 44.1812 48.957 44.0181 48.9652 43.8265L49.7448 39.7204Z" fill="#9582DC"/>
    <path id="&#232;&#183;&#175;&#229;&#190;&#132;_6" d="M53.6606 32.7058C53.6191 32.4214 53.3233 32.2572 53.0684 32.377C48.2141 34.6222 44.5733 36.3061 42.1461 37.4287C42.1415 37.4308 40.8668 39.7936 38.3222 44.517C38.4124 44.7459 38.671 44.8508 38.8896 44.7472L52.804 38.1503C52.9737 38.0698 53.0714 37.8842 53.0437 37.6945L53.6606 32.7058Z" fill="#D3C3FF"/>
    </g>
    <g id="Star_bage">
    <path id="&#229;&#189;&#162;&#231;&#138;&#182;" d="M27.7274 0C14.6297 0 4 10.6136 4 23.7112C4 36.8088 14.6136 47.4386 27.7274 47.4386C40.825 47.4386 51.4386 36.825 51.4386 23.7112C51.4386 10.5975 40.825 0 27.7274 0ZM27.7193 44.7018C16.125 44.7018 6.73684 35.3012 6.73684 23.7274C6.73684 12.1536 16.125 2.73684 27.7193 2.73684C39.2975 2.73684 48.7018 12.1375 48.7018 23.7274C48.7018 35.3171 39.2975 44.7018 27.7193 44.7018Z" fill="url(#paint0_linear_405_3950)"/>
    <path id="&#229;&#189;&#162;&#231;&#138;&#182;_2" d="M27.6888 2.43274C15.9265 2.43274 6.38599 11.9696 6.38599 23.7274C6.38599 35.4852 15.9265 45.0058 27.6725 45.0058C39.4348 45.0058 48.9591 35.4689 48.9591 23.7274C48.9754 11.9696 39.4348 2.43274 27.6888 2.43274ZM27.8339 43.4744C17.0049 43.4744 8.22367 34.7059 8.22367 23.8724C8.22367 13.0389 17.0049 4.27043 27.8339 4.27043C38.6629 4.27043 47.4277 13.0552 47.4277 23.8724C47.4277 34.7059 38.6466 43.4744 27.8339 43.4744Z" fill="url(#paint1_linear_405_3950)"/>
    </g>
    </g>
    <g id="&#233;&#157;&#162;&#230;&#128;&#167;&#232;&#143;&#177;&#229;&#189;&#162;&#230;&#173;&#163;&#229;&#133;&#173;&#232;&#190;&#185;&#229;&#189;&#162;&#233;&#146;&#187;&#231;&#159;&#179;&#230;&#176;&#180;&#230;&#153;&#182;-1">
    <g id="&#233;&#157;&#162;&#230;&#128;&#167;&#229;&#155;&#155;&#232;&#190;&#185;&#229;&#156;&#134;&#233;&#148;&#165;&#228;&#189;&#147;&#233;&#146;&#187;&#231;&#159;&#179;&#230;&#176;&#180;&#230;&#153;&#182; 1">
    <path id="Vector" d="M28 43V51.1527L26.8609 47.2574L25.7236 43H28Z" fill="#CB9AFF"/>
    <path id="Vector_2" d="M22.8606 43L26.8614 47.2574L25.7241 43H22.8606Z" fill="#B68DFF"/>
    <path id="Vector_3" d="M24.001 47.1713L22.8602 43H20.2656L24.001 47.1713Z" fill="#8A73FF"/>
    <path id="Vector_4" d="M24.0014 47.1713L22.8606 43L26.8614 47.2574L28.0004 51.1527L24.0014 47.1713Z" fill="#A180FF"/>
    <path id="Vector_5" d="M30.2764 43L29.1391 47.2574L28 51.1527V43H30.2764Z" fill="#B68DFF"/>
    <path id="Vector_6" d="M33.139 43L29.1382 47.2574L30.2755 43H33.139Z" fill="#A180FF"/>
    <path id="Vector_7" d="M31.999 47.1713L33.1398 43H35.7344L31.999 47.1713Z" fill="#785EF7"/>
    <path id="Vector_8" d="M31.999 47.1713L33.1398 43L29.1391 47.2574L28 51.1527L31.999 47.1713Z" fill="#8A73FF"/>
    <path id="Vector_9" d="M28 42.9998V34.847L26.8609 38.7424L25.7236 42.9998H28Z" fill="#F0D1FF"/>
    <path id="Vector_10" d="M25.7241 43.0002L26.8614 38.7428L22.8606 43.0002H25.7241Z" fill="#CB9AFF"/>
    <path id="Vector_11" d="M20.2656 42.9998H22.8602L24.001 38.8285L20.2656 42.9998Z" fill="#A180FF"/>
    <path id="Vector_12" d="M28.0004 34.847L26.8614 38.7424L22.8606 42.9998L24.0014 38.8285L28.0004 34.847Z" fill="#B68DFF"/>
    <path id="Vector_13" d="M30.2764 42.9998L29.1391 38.7424L28 34.847V42.9998H30.2764Z" fill="#D3AAFF"/>
    <path id="Vector_14" d="M30.2755 43.0002L29.1382 38.7428L33.139 43.0002H30.2755Z" fill="#B68DFF"/>
    <path id="Vector_15" d="M35.7344 42.9998H33.1398L31.999 38.8285L35.7344 42.9998Z" fill="#8A73FF"/>
    <path id="Vector_16" d="M28 34.847L29.1391 38.7424L33.1398 42.9998L31.999 38.8285L28 34.847Z" fill="#A180FF"/>
    </g>
    <path id="6" d="M30.08 44.75C30.08 43.33 29.15 42.54 28.1 42.54C27.78 42.54 27.56 42.58 27.34 42.69L29.04 39.72H27.65L26.1 42.51C25.64 43.34 25.41 43.95 25.41 44.78C25.41 46.25 26.43 47.06 27.75 47.06C29.07 47.06 30.08 46.22 30.08 44.75ZM28.78 44.77C28.78 45.5 28.34 45.94 27.74 45.94C27.14 45.94 26.71 45.5 26.71 44.77C26.71 44.04 27.14 43.6 27.74 43.6C28.36 43.6 28.78 44.07 28.78 44.77Z" fill="#7240B7"/>
    </g>
    </g>
    </g>
    </g>
    </g>
    <defs>
    <linearGradient id="paint0_linear_405_3950" x1="27.7193" y1="0" x2="27.7193" y2="47.4386" gradientUnits="userSpaceOnUse">
    <stop stop-color="#C9BFFB"/>
    <stop offset="0.141965" stop-color="#D8CCFC"/>
    <stop offset="0.283691" stop-color="white"/>
    <stop offset="0.592153" stop-color="#AA96DC"/>
    <stop offset="1" stop-color="#6150DA"/>
    </linearGradient>
    <linearGradient id="paint1_linear_405_3950" x1="27.6809" y1="2.20503" x2="27.6809" y2="44.8561" gradientUnits="userSpaceOnUse">
    <stop offset="0.0226131" stop-color="#8763B1"/>
    <stop offset="0.383802" stop-color="#A88AD2"/>
    <stop offset="1" stop-color="#E6E8FF"/>
    </linearGradient>
    <clipPath id="clip0_405_3950">
    <rect width="55.9532" height="52" fill="white"/>
    </clipPath>
    </defs>
    </svg>
    

    Chrome: google chrome

    lunasvg: test svg

    Please fix it! Thanks.

    bug 
    opened by luleiray 1
Releases(v2.3.1)
Owner
Nwutobo Samuel Ugochukwu
Nwutobo Samuel Ugochukwu
NanoSVG is a simple stupid single-header-file SVG parse

This project is not actively maintained. Nano SVG Parser NanoSVG is a simple stupid single-header-file SVG parse.

Mikko Mononen 1.3k Jun 27, 2022
a Vulkan real-time rendering engine (Windows and Linux).

Luz Engine A Vulkan engine that I'm developing to study and implement modern rendering techniques used by AAA games. Videos on Youtube Features How to

Hadryan Salles 46 Jun 3, 2022
This library provides a cross-platform image loading library in C11 for projects based on our foundation library

Image Library - Public Domain This library provides a cross-platform image loading library in C11 for projects based on our foundation library.

Mattias Jansson 1 Jan 29, 2022
PillowResize library is a C++ porting of the resize method from the Pillow python library.

Pillow Resize Table of Contents Description Compilation Installation Usage Description PillowResize library is a C++ porting of the resize method from

Zuru Tech 28 May 14, 2022
GD Graphics Library

GD Graphics (Draw) Library GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are

GD Graphics Library 738 Jun 21, 2022
An open source library for face detection in images. The face detection speed can reach 1000FPS.

libfacedetection This is an open source library for CNN-based face detection in images. The CNN model has been converted to static variables in C sour

Shiqi Yu 11.1k Jun 28, 2022
A fast image processing library with low memory needs.

libvips : an image processing library Introduction libvips is a demand-driven, horizontally threaded image processing library. Compared to similar lib

libvips 16 Jun 19, 2022
C++ image processing and machine learning library with using of SIMD: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX-512, VMX(Altivec) and VSX(Power7), NEON for ARM.

Introduction The Simd Library is a free open source image processing and machine learning library, designed for C and C++ programmers. It provides man

Ihar Yermalayeu 1.6k Jun 24, 2022
Tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG.

TinyEXIF: Tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG Introduction TinyEXIF is a tiny, lightweight C++ library for parsing the metada

cDc 76 May 27, 2022
Video++, a C++14 high performance video and image processing library.

Video++ Video++ is a video and image processing library taking advantage of the C++14 standard to ease the writing of fast video and image processing

Matthieu Garrigues 681 Jun 14, 2022
a generic C++ library for image analysis

VIGRA Computer Vision Library Copyright 1998-2013 by Ullrich Koethe This file is part of the VIGRA computer vision library. You may use,

Ullrich Koethe 368 Jun 25, 2022
A C++ library for Background Matting

libovmatting A C++ library for Background Matting using openvino and deep learning models. Now support models such as BackgroundMattingV2, MODNet. App

null 41 May 26, 2022
A file dialog library for Dear ImGui

ImFileDialog A simple file dialog library for Dear ImGui. This library supports favorites, actual Windows icons, image previews, zooming in, etc... DI

dfranx 341 Jun 21, 2022
Intel® Open Image Denoise library

Intel Open Image Denoise is an open source library of high-performance, high-quality denoising filters for images rendered with ray tracing

Intel® Open Image Denoise 1.3k Jun 19, 2022
Arduino PNG image decoder library

An 'embedded-friendly' (aka Arduino) PNG image decoding library

Larry Bank 91 Jun 24, 2022
ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages.

ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages. By zig contained I mean that ZT is intend

null 80 Jun 18, 2022
libvot - A C++11 multi-thread library for image retrieval

libvot is a fast implementation of vocabulary tree, which is an algorithm widely used in image retrieval and computer vision. It usually comprises three components to build a image retrieval system using vocabulary tree: build a k-means tree using sift descriptors from images, register images into the database, query images against the database. I

Tianwei Shen 166 Apr 8, 2022
ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

null 318 Jun 10, 2022