Is there a size limit for SVG to BASE64 files?
-
-
@Mighty23 I'm just curious to what the benefit of using an svg would be here for your use case? The hollow mooon svg holds an image element inside it with png data. Hise's converter tool only supports path data (that I know of), hence why its not working.
-
@Casmat Yeah that's probably the issue
-
@Casmat said in Is there a size limit for SVG to BASE64 files?:
I'm just curious to what the benefit of using an svg would be here for your use case?
Have a background that fits into a UI that the user can zoom in/out?
@Casmat said in Is there a size limit for SVG to BASE64 files?:
svg holds an image element inside it with png data
probably because in Illustrator the layers are not converted into shapes, many thanks!
-
@Mighty23 said in Is there a size limit for SVG to BASE64 files?:
Have a background that fits into a UI that the user can zoom in/out?
Is it not possible to do that with just an image?
-
@d-healey said in Is there a size limit for SVG to BASE64 files?:
Is it not possible to do that with just an image?
Yes I can do that but wouldn't that lead to blur/pixelated images for "extreme" values?
-
@Mighty23 Yes, but that's no different to an image within an SVG. You only get the advantage with an SVG for vector graphics, as soon as you include a bitmap you will run into issues.
-
@Mighty23 you can export the image at 2x the size and scale it down so when the user scales the interfaces it stays relatively sharp
-
@d-healey thanks, I understand; either I find a way to have the SVG file without PNG inside or I limit the use of Zoom In/Out.
-
@oskarsh said in Is there a size limit for SVG to BASE64 files?:
@Mighty23 you can export the image at 2x the size and scale it down so when the user scales the interfaces it stays relatively sharp
Building on this idea you can include multiple images at different resolutions and load the closest match to the user's screen size. Or in your case the zoom amount.
I did this with Sordina https://codeberg.org/LibreWave/Sordina/src/branch/main/Scripts/Container.js#L27