├── .gitignore ├── .ncurc.json ├── .prettierignore ├── .prettierrc ├── .stylelintignore ├── .stylelintrc.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── .nojekyll ├── .well-known │ └── assetlinks.json ├── CNAME ├── assets │ ├── ar-TN-hXpJlHQz.js │ ├── be-BY-CNG3QvRr.js │ ├── ca-ES-DaFbzlsN.js │ ├── colorworker-CnMNwOdv.js │ ├── da-DK-BOlqBLAC.js │ ├── de-DE-D8j2hVsF.js │ ├── el-GR-CPghj_w6.js │ ├── en-GB-C7JHOrHG.js │ ├── en-US-B0s0BWzt.js │ ├── es-ES-DBc5Zs2w.js │ ├── filehandling-ppwoROA8.js │ ├── fr-FR-B9l2OUfe.js │ ├── he-IL-eg_IqJCK.js │ ├── id-ID-B0V93tcH.js │ ├── index-aEZOVBVk.js │ ├── install-DX-WpHQu.js │ ├── it-IT-CT3hgywc.js │ ├── ja-JP-9Mx_HtSv.js │ ├── ko-KR-CxGXyVbz.js │ ├── languages-BtQEISXM.js │ ├── module-workers-polyfill.min-B4htaMKj.js │ ├── monochromeworker-CYWnkG-H.js │ ├── nl-NL-BPPnxxwY.js │ ├── no-NO-DiHwyl5f.js │ ├── pl-PL-C9v2eRNf.js │ ├── preprocessworker-BsUKOZia.js │ ├── preprocessworker-CehXHJLM.js │ ├── pt-BR-Dd28HDO_.js │ ├── ru-RU-ClHujSzv.js │ ├── share-BJnRZ6E5.js │ ├── style-CEQ7ztD7.css │ ├── svgoworker-DfXCDkWJ.js │ ├── uk-UA-BbOKxyWq.js │ ├── windowcontrols-B6bju7oe.js │ ├── workbox-window.prod.es5-DFjpnwFp.js │ └── zh-CN-Ce7uxnjN.js ├── badges │ ├── microsoft-store.svg │ ├── play-store.svg │ └── web-browser.svg ├── copyicon.svg ├── favicon-bw.svg ├── favicon.png ├── favicon.svg ├── filtericon.svg ├── index.html ├── installicon.svg ├── manifest.webmanifest ├── moon.svg ├── openicon.svg ├── optionsicon.svg ├── paletteicon.svg ├── pasteicon.svg ├── potraced-color.svg ├── potraced-monochrome.svg ├── privacy_policy.txt ├── saveicon.svg ├── scaleicon.svg ├── screenshots │ ├── desktop-dark.png │ ├── desktop-light.png │ ├── mobile-dark.png │ └── mobile-light.png ├── shareicon.svg ├── shareiconmac.svg ├── sharetargetsw.js ├── spinner.svg ├── sun.svg ├── sw.js ├── tuneicon.svg └── workbox-3e911b1d.js ├── index.html ├── package-lock.json ├── package.json ├── public ├── .well-known │ └── assetlinks.json ├── badges │ ├── microsoft-store.svg │ ├── play-store.svg │ └── web-browser.svg ├── copyicon.svg ├── favicon-bw.svg ├── favicon.png ├── favicon.svg ├── filtericon.svg ├── installicon.svg ├── moon.svg ├── openicon.svg ├── optionsicon.svg ├── paletteicon.svg ├── pasteicon.svg ├── potraced-color.svg ├── potraced-monochrome.svg ├── privacy_policy.txt ├── saveicon.svg ├── scaleicon.svg ├── screenshots │ ├── desktop-dark.png │ ├── desktop-light.png │ ├── mobile-dark.png │ └── mobile-light.png ├── shareicon.svg ├── shareiconmac.svg ├── sharetargetsw.js ├── spinner.svg ├── sun.svg └── tuneicon.svg ├── scripts └── icons.mjs ├── src ├── css │ ├── dark.css │ ├── light.css │ └── style.css ├── i18n │ ├── ar-TN.js │ ├── be-BY.js │ ├── ca-ES.js │ ├── da-DK.js │ ├── de-DE.js │ ├── el-GR.js │ ├── en-GB.js │ ├── en-US.js │ ├── es-ES.js │ ├── fr-FR.js │ ├── he-IL.js │ ├── id-ID.js │ ├── it-IT.js │ ├── ja-JP.js │ ├── ko-KR.js │ ├── languages.js │ ├── nl-NL.js │ ├── no-NO.js │ ├── pl-PL.js │ ├── pt-BR.js │ ├── ru-RU.js │ ├── uk-UA.js │ └── zh-CN.js ├── js │ ├── clipboard.js │ ├── color.js │ ├── colorworker.js │ ├── domrefs.js │ ├── filehandling.js │ ├── filesystem.js │ ├── i18n.js │ ├── install.js │ ├── main.js │ ├── monochrome.js │ ├── monochromeworker.js │ ├── orchestrate.js │ ├── panzoom.js │ ├── preprocess.js │ ├── preprocessworker.js │ ├── share.js │ ├── svgo.js │ ├── svgoworker.js │ ├── ui.js │ ├── util.js │ └── windowcontrols.js └── manifest.json └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | *.local 4 | /.idea/ 5 | -------------------------------------------------------------------------------- /.ncurc.json: -------------------------------------------------------------------------------- 1 | { 2 | "upgrade": true, 3 | "reject": ["esm-potrace-wasm"] 4 | } 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "embeddedLanguageFormatting": "auto", 5 | "htmlWhitespaceSensitivity": "css", 6 | "insertPragma": false, 7 | "bracketSameLine": false, 8 | "jsxSingleQuote": false, 9 | "printWidth": 80, 10 | "proseWrap": "always", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "semi": true, 14 | "singleQuote": true, 15 | "overrides": [ 16 | { 17 | "files": ["**/*.css", "**/*.scss", "**/*.html"], 18 | "options": { 19 | "singleQuote": false 20 | } 21 | } 22 | ], 23 | "tabWidth": 2, 24 | "trailingComma": "all", 25 | "useTabs": false, 26 | "vueIndentScriptAndStyle": false 27 | } 28 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "plugins": ["stylelint-order"], 4 | "rules": { 5 | "order/order": ["custom-properties", "declarations"], 6 | "order/properties-order": ["width", "height"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement (CLA). You (or your employer) retain the copyright to your 10 | contribution; this simply gives us permission to use and redistribute your 11 | contributions as part of the project. Head over to 12 | to see your current agreements on file or 13 | to sign a new one. 14 | 15 | You generally only need to submit a CLA once, so if you've already submitted one 16 | (even if it was for a different project), you probably don't need to do it 17 | again. 18 | 19 | ## Code Reviews 20 | 21 | All submissions, including submissions by project members, require review. We 22 | use GitHub pull requests for this purpose. Consult 23 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 24 | information on using pull requests. 25 | 26 | ## Community Guidelines 27 | 28 | This project follows 29 | [Google's Open Source Community Guidelines](https://opensource.google/conduct/). 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SVGcode: A PWA to Convert Raster Images to SVG Vector Graphics 2 | 3 | SVGcode is a Progressive Web App that lets you convert raster images like JPG, 4 | PNG, GIF, WebP, AVIF, etc. to vector graphics in SVG format. It uses the File 5 | System Access API, the Async Clipboard API, the File Handling API, and Window 6 | Controls Overlay customization. The app is available at 7 | SVGco.de. See what I did there? For more 8 | background, read the accompanying [article](https://web.dev/svgcode/) or watch 9 | the [video](https://youtu.be/kcvfyQh6J-0?). 10 | 11 | 12 | SVGcode application screenshot 13 | 14 | 15 | ## Access from the Web or install from a store 16 | 17 | Apart from using the Web app at [svgco.de](https://svgco.de/), you can also 18 | install SVGcode from the 19 | [Microsoft Store](https://www.microsoft.com/en-us/p/svgcode/9plhxdgsw1rj#activetab=pivot:overviewtab) 21 | on Windows. 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ## Developing and/or contributing 30 | 31 | 1. Fork this repository. 32 | 1. Clone from your fork: 33 | `git clone git@github.com:/SVGcode.git` 34 | 1. Navigate into the application's directory: `cd SVGcode` 35 | 1. Install the dependencies: `npm i` 36 | 1. Start the application: `npm start` 37 | 1. Open the application in your browser: 38 | [`http://localhost:3000`](http://localhost:3000) 39 | 1. Check out the [available Issues](https://github.com/tomayac/SVGcode/issues) 40 | or create a [new Issue](https://github.com/tomayac/SVGcode/issues/new/choose) 41 | describing your plans. 42 | 1. Start hacking. Vite automatically reloads the app upon changes. 43 | 1. Lint your modifications: `npm run lint` 44 | 1. Make sure your changes respect the code style: `npm run fix` 45 | 1. Open a Pull Request that fixes the Issue (see 7. above). 46 | 1. Have fun, and thanks for your interest in SVGcode! 47 | 48 | ## Contributing translations 49 | 50 | If SVGcode is not available in _your_ language, consider contributing a 51 | translation. Therefore, make a copy of one of the files in 52 | [`src/i18n/`](https://github.com/tomayac/SVGcode/blob/main/src/i18n/) (most 53 | users will probably be most familiar with 54 | [`en-US.js`](https://github.com/tomayac/SVGcode/blob/main/src/i18n/en-US.js)) 55 | and translate the strings. Name the new file according to 56 | [`Tags for Identifying Languages`](https://tools.ietf.org/rfc/bcp/bcp47.txt) 57 | (`$language-$REGION` like `en-US`). Then add the language code to the 58 | `SUPPORTED_LANGUAGES` array in 59 | [`src/js/i18n.js`](https://github.com/tomayac/SVGcode/blob/main/src/js/i18n.js) 60 | and the locale to `SUPPORTED_LOCALES` array in the 61 | [same file](https://github.com/tomayac/SVGcode/blob/main/src/js/i18n.js). Danke! 62 | 63 | ## Acknowledgements 64 | 65 | With SVGcode, I just stand on the shoulders of a command line tool called 66 | [Potrace](http://potrace.sourceforge.net/) by 67 | [Peter Selinger](https://www.mathstat.dal.ca/~selinger/) that I have 68 | [converted to Web Assembly](https://www.npmjs.com/package/esm-potrace-wasm), so 69 | it can be used in a Web app. The converted SVGs are automatically optimized via 70 | the amazing [svgo](https://github.com/svg/svgo) library. 71 | 72 | ## Bragging zone 73 | 74 | SVGcode - A PWA to convert raster images to SVG vector graphics | Product Hunt 75 | 76 | ## Alternatives 77 | 78 | Projects listed here must be Web-based, free to use with the option to save the 79 | SVG, open source, and not require the user to log in: 80 | 81 | - [VTracer](https://www.visioncortex.org/vtracer/#) 82 | ([source code](https://github.com/visioncortex/vtracer)) 83 | - [Image to SVG](https://tools.simonwillison.net/image-to-svg) (based on 84 | [imagetracerjs](https://github.com/jankovicsandras/imagetracerjs)) 85 | 86 | ## License 87 | 88 | GNU General Public License v2.0 89 | 90 | (This is due to Potrace choosing 91 | [GNU General Public License v2.0](http://potrace.sourceforge.net/#license).) 92 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/.nojekyll -------------------------------------------------------------------------------- /docs/.well-known/assetlinks.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "relation": ["delegate_permission/common.handle_all_urls"], 4 | "target": { 5 | "namespace": "android_app", 6 | "package_name": "de.svgco.twa", 7 | "sha256_cert_fingerprints": [ 8 | "71:40:9F:D0:17:82:14:A5:97:F2:87:22:20:F3:CA:52:9B:BB:36:5F:82:EF:01:C9:1D:FE:16:AE:3B:32:7B:69" 9 | ] 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | svgco.de 2 | -------------------------------------------------------------------------------- /docs/assets/ar-TN-hXpJlHQz.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"أحمر",green:"أخضر",blue:"أزرق",alpha:"ألفا",brightness:"السطوع",contrast:"التباين",grayscale:"التدرج الرمادي","hue-rotate":"تدوير فارق الألوان",invert:"عكس",opacity:"العتامة",saturate:"التشبع",sepia:"بني داكن",scale:"حجم",rotation:"دوران",turdsize:"ترطيب الاخاديد",alphamax:"عتبة الزاوية",minPathSegments:"الحد الأدنى لطول المسار",strokeWidth:"سمك الخط",turnpolicy:"سياسة الدوران",opticurve:"تحسين المنحنيات",opttolerance:"درجة التسامح الأمثل",showAdvancedControls:"إظهار الخيارات متقدمة","%":"%",deg:"°",steps:"خطوات",pixels:"بكسل",segments:"شرائح",reset:"إعادة ضبط",resetAll:"إعادة ضبط الكل",dropFileHere:"أضف الملف هنا",openImage:"استيراد صورة",saveSVG:"حفظ كـ SVG",pasteImage:"لصق الصورة",copySVG:"نسخ كـ SVG",shareSVG:"مشاركة كـ SVG",install:"تثبيت",posterizeInputImage:"صورة الإدخال المتتالية",colorSVG:"لون SVG",monochromeSVG:"أحادية اللون SVG",colorChannels:"قنوات اللون",imageSizeAndRotation:"حجم الصورة والدوران",imagePreprocessing:"المعالجة المسبقة",svgOptions:"خيارات SVG",considerDPR:"اخذ بعين الاعتبار نسبة وحدات البكسل للجهاز",tweak:"تعديل",closeOptions:"قفل الخيارات",optimizingSVG:"تحسين SVG",copiedSVG:"تم نسخ SVG",savedSVG:"تم حفظ SVG",readyToWorkOffline:"جاهز للعمل دون اتصال.",svgSize:"حجم SVG",zoom:"تكبير",license:"رخصة الاستخدام",about:"عن",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/be-BY-CNG3QvRr.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Чырвоны",green:"Зялёны",blue:"Блакітны",alpha:"Празрыстасць",brightness:"Яркасць",contrast:"Кантраст",grayscale:"Манахром","hue-rotate":"Паварот колеру",invert:"Інверсія",opacity:"Празрыстасць",saturate:"Насычэнне",sepia:"Сепія",scale:"Маштаб",rotation:"Паварот",turdsize:"Паменшыць смецце",alphamax:"Кутні парог",minPathSegments:"Мінімальная даўжыня шляху",strokeWidth:"Таўшчыня абводкі",turnpolicy:"Правілы павароту",opticurve:"Аптымізаваць крывыя",opttolerance:"Узровень аптымізацыі",showAdvancedControls:"Дадатковыя налады","%":"%",deg:"°",steps:"крокаў",pixels:"пікселяў",segments:"сегментаў",reset:"Скінуць",resetAll:"Скінуць усё",dropFileHere:"Кіньце файл сюды",openImage:"Адкрыць карцінку",saveSVG:"Захаваць SVG",pasteImage:"Уставіць карцінку",copySVG:"Скапіяваць SVG",install:"Усталяваць",posterizeInputImage:"Пастэрызаваць ўваходную карцінку",colorSVG:"Каляровы SVG",monochromeSVG:"Манахромны SVG",colorChannels:"Каляровыя каналы",imageSizeAndRotation:"Ўваходныя памеры і паварот",imagePreprocessing:"Уваходная апрацоўка",svgOptions:"Налады SVG",considerDPR:"Ўлічваць шчыльнасць пікселяў",tweak:"Падкруціць",closeOptions:"Закрыць",optimizingSVG:"Аптымізую SVG",copiedSVG:"Скапіяваны SVG",savedSVG:"Захаваны SVG",readyToWorkOffline:"Гатова для працы афлайн.",svgSize:"Памер SVG",zoom:"Маштаб",license:"Ліцэнзія",about:"Аб праекце",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/ca-ES-DaFbzlsN.js: -------------------------------------------------------------------------------- 1 | import a from"./languages-BtQEISXM.js";const r={red:"Vermell",green:"Verd",blue:"Blau",alpha:"Alfa",brightness:"Brillantor",contrast:"Contrast",grayscale:"Escala de gris","hue-rotate":"Gir de to",invert:"Invertir",opacity:"Opacitat",saturate:"Saturació",sepia:"Sépia",scale:"Escala",rotation:"Rotació",turdsize:"Suprimir taques",alphamax:"Llindar de la cantonada",minPathSegments:"Mín. segments de camí",strokeWidth:"Amplada de línia",turnpolicy:"Política de gir",opticurve:"Optimitzar corbes",opttolerance:"Tolerància d'optimització",showAdvancedControls:"Mostrar opcions avançades","%":"%",deg:"°",steps:"Passos",pixels:"Píxels",segments:"Segments",reset:"Restablir",resetAll:"Restablir tot",dropFileHere:"Arrossega un fitxer aquí",openImage:"Obrir imatge",saveSVG:"Guardar SVG",pasteImage:"Enganxar imatge",copySVG:"Copiar SVG",shareSVG:"Compartir SVG",install:"Instal·lar",posterizeInputImage:"Posteritzar imatge d'entrada",colorSVG:"SVG de colors",monochromeSVG:"SVG monocromàtic",colorChannels:"Canals de color",imageSizeAndRotation:"Mida i rotació de la imatge",imagePreprocessing:"Preprocessament de la imatge",svgOptions:"Opcions SVG",considerDPR:"Usar proporció de píxels del dispositiu",tweak:"Ajustar",closeOptions:"Tancar",optimizingSVG:"Optimitzant SVG",copiedSVG:"SVG copiat",savedSVG:"SVG guardat",readyToWorkOffline:"Preparat per treballar fora de línia.",svgSize:"Mida SVG",zoom:"Zoom",license:"Llicència",about:"Sobre",...a};export{r as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/da-DK-BOlqBLAC.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const r={red:"Rød",green:"Grøn",blue:"Blå",alpha:"Alfa",brightness:"Lysstyrke",contrast:"Kontrast",grayscale:"Gråtoner","hue-rotate":"Nuancerotation",invert:"Invertering",opacity:"Gennemsigtighed",saturate:"Mætning",sepia:"Sepia",scale:"Skalering",rotation:"Rotation",turdsize:"Undertryk pletter",alphamax:"Hjørnetærskel",minPathSegments:"Min. stilængde",strokeWidth:"Stregbredde",turnpolicy:"Svingstrategi",opticurve:"Optimer kurver",opttolerance:"Optimeringstolerance",showAdvancedControls:"Vis ekspertindstillinger","%":"%",deg:"°",steps:"trin",pixels:"pixel",segments:"segmenter",reset:"Nulstil",resetAll:"Nulstil alt",dropFileHere:"Drop fil her",openImage:"Åbn billede",saveSVG:"Gem SVG",pasteImage:"Indsæt billede",copySVG:"Kopiér SVG",shareSVG:"Del SVG",install:"Installér",posterizeInputImage:"Posterisér inputbillede",colorSVG:"Farve-SVG",monochromeSVG:"Monokrom-SVG",colorChannels:"Farvekanaler",imageSizeAndRotation:"Inputstørrelse og rotation",imagePreprocessing:"Inputforbehandling",svgOptions:"SVG-indstillinger",considerDPR:"Betragt Device-Pixel Ratio",tweak:"Justér",closeOptions:"Luk",optimizingSVG:"Optimerer SVG",copiedSVG:"Kopierede SVG",savedSVG:"Gemte SVG",readyToWorkOffline:"Parat til offline-brug.",svgSize:"SVG-størrelse",zoom:"Zoom",license:"Licens",about:"Om",...e};export{r as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/de-DE-D8j2hVsF.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Rot",green:"Grün",blue:"Blau",alpha:"Alpha",brightness:"Helligkeit",contrast:"Kontrast",grayscale:"Graustufen","hue-rotate":"Farbtonrotation",invert:"Invertieren",opacity:"Transparenz",saturate:"Sättigung",sepia:"Sepia",scale:"Skalierung",rotation:"Rotation",turdsize:"Flecken unterdrücken",alphamax:"Eckenschwellwert",minPathSegments:"Min. Pfadlänge",strokeWidth:"Strichbreite",turnpolicy:"Wendestrategie",opticurve:"Kurven optimieren",opttolerance:"Optimierungstoleranz",showAdvancedControls:"Expertenoptionen anzeigen","%":"%",deg:"°",steps:"Schritte",pixels:"Pixel",segments:"Segmente",reset:"Zurücksetzen",resetAll:"Alles zurücksetzen",dropFileHere:"Datei hier ablegen",openImage:"Bild öffnen",saveSVG:"SVG speichern",pasteImage:"Bild einfügen",copySVG:"SVG kopieren",shareSVG:"SVG teilen",install:"Installieren",posterizeInputImage:"Eingabebild posterisieren",colorSVG:"Farbiges SVG",monochromeSVG:"Monochromes SVG",colorChannels:"Farbkanäle",imageSizeAndRotation:"Bildgröße und -rotation",imagePreprocessing:"Bildvorverarbeitung",svgOptions:"SVG-Optionen",considerDPR:"Pixelverhältnis des Geräts beachten",tweak:"Anpassen",closeOptions:"Schließen",optimizingSVG:"Optimiere SVG",copiedSVG:"SVG kopiert",savedSVG:"SVG gespeichert",readyToWorkOffline:"Bereit für Offline-Nutzung.",svgSize:"SVG-Größe",zoom:"Zoom",license:"Lizenz",about:"Über",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/el-GR-CPghj_w6.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Κόκκινο",green:"Πράσινο",blue:"Μπλε",alpha:"Άλφα",brightness:"Φωτεινότητα",contrast:"Αντίθεση",grayscale:"Κλίμακα Γκρι","hue-rotate":"Περιστροφή Απόχρωσης",invert:"Αντιστροφή",opacity:"Αδιαφάνεια",saturate:"Κορεσμός",sepia:"Σέπια",scale:"Κλίμακα",rotation:"Περιστροφή",turdsize:"Καταστολή Κηλίδων",alphamax:"Κατώφλι Γωνίας",minPathSegments:"Ελάχ. Μήκος διαδρομής",strokeWidth:"Πλάτος Διαδρομής",turnpolicy:"Πολιτική Περιστροφής",opticurve:"Βελτιστοποίηση Καμπυλών",opttolerance:"Ανοχή Βελτιστοποίησης",showAdvancedControls:"Εμφάνιση Ειδικών Επιλογών","%":"%",deg:"°",steps:"Βήματα",pixels:"Εικονοστοιχεία",segments:"Τμήματα",reset:"Επαναφορά",resetAll:"Επαναφορά Όλων",dropFileHere:"Αποθέστε το αρχείο εδώ",openImage:"Άνοιγμα Εικόνας",saveSVG:"Αποθήκευση SVG",pasteImage:"Επικόλληση Εικόνας",copySVG:"Αντιγραφή SVG",shareSVG:"Διαμοιρασμός SVG",install:"Εγκατάσταση",posterizeInputImage:"Posterize Εικόνα Εισόδου",colorSVG:"Έγχρωμο SVG",monochromeSVG:"Μονόχρωμο SVG",colorChannels:"Κανάλια Χρώματος",imageSizeAndRotation:"Μέγεθος Εισόδου Και Περιστροφή",imagePreprocessing:"Προεπεξεργασία Εισόδου",svgOptions:"Επιλογές SVG",considerDPR:"Λάβετε υπόψη την αναλογία pixel της συσκευής",tweak:"Προσαρμογή",closeOptions:"Κλείσιμο",optimizingSVG:"Βελτιστοποίηση SVG",copiedSVG:"SVG Αντιγράφηκε",savedSVG:"SVG Αποθηκεύτηκε",readyToWorkOffline:"Έτοιμο για εργασία χωρίς σύνδεση.",svgSize:"Μέγεθος SVG",zoom:"Μεγέθυνση",license:"Αδεια",about:"Σχετικά με",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/en-GB-C7JHOrHG.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const o={red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",brightness:"Brightness",contrast:"Contrast",grayscale:"Grayscale","hue-rotate":"Hue Rotate",invert:"Invert",opacity:"Opacity",saturate:"Saturate",sepia:"Sepia",scale:"Scale",rotation:"Rotation",turdsize:"Suppress Speckles",alphamax:"Corner Threshold",minPathSegments:"Min. Path Length",strokeWidth:"Stroke Width",turnpolicy:"Turn Policy",opticurve:"Optimise Curves",opttolerance:"Optimisation Tolerance",showAdvancedControls:"Show Expert Options","%":"%",deg:"°",steps:"Steps",pixels:"Pixels",segments:"Segments",reset:"Reset",resetAll:"Reset All",dropFileHere:"Drop File Here",openImage:"Open Image",saveSVG:"Save SVG",pasteImage:"Paste Image",copySVG:"Copy SVG",shareSVG:"Share SVG",install:"Install",posterizeInputImage:"Posterise Input Image",colorSVG:"Colour SVG",monochromeSVG:"Monochrome SVG",colorChannels:"Colour Channels",imageSizeAndRotation:"Input Size and Rotation",imagePreprocessing:"Input Preprocessing",svgOptions:"SVG Options",considerDPR:"Consider Device Pixel Ratio",tweak:"Tweak",closeOptions:"Close",optimizingSVG:"Optimising SVG",copiedSVG:"Copied SVG",savedSVG:"Saved SVG",readyToWorkOffline:"Ready to Work Offline.",svgSize:"SVG Size",zoom:"Zoom",license:"License",about:"About",...e};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/en-US-B0s0BWzt.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const o={red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",brightness:"Brightness",contrast:"Contrast",grayscale:"Grayscale","hue-rotate":"Hue Rotate",invert:"Invert",opacity:"Opacity",saturate:"Saturate",sepia:"Sepia",scale:"Scale",rotation:"Rotation",turdsize:"Suppress Speckles",alphamax:"Corner Threshold",minPathSegments:"Min. Path Length",strokeWidth:"Stroke Width",turnpolicy:"Turn Policy",opticurve:"Optimize Curves",opttolerance:"Optimization Tolerance",showAdvancedControls:"Show Expert Options","%":"%",deg:"°",steps:"Steps",pixels:"Pixels",segments:"Segments",reset:"Reset",resetAll:"Reset All",dropFileHere:"Drop File Here",openImage:"Open Image",saveSVG:"Save SVG",pasteImage:"Paste Image",copySVG:"Copy SVG",shareSVG:"Share SVG",install:"Install",posterizeInputImage:"Posterize Input Image",colorSVG:"Color SVG",monochromeSVG:"Monochrome SVG",colorChannels:"Color Channels",imageSizeAndRotation:"Input Size and Rotation",imagePreprocessing:"Input Preprocessing",svgOptions:"SVG Options",considerDPR:"Consider Device Pixel Ratio",tweak:"Tweak",closeOptions:"Close",optimizingSVG:"Optimizing SVG",copiedSVG:"Copied SVG",savedSVG:"Saved SVG",readyToWorkOffline:"Ready to Work Offline.",svgSize:"SVG Size",zoom:"Zoom",license:"License",about:"About",...e};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/es-ES-DBc5Zs2w.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const o={red:"Rojo",green:"Verde",blue:"Azul",alpha:"Alfa",brightness:"Brillo",contrast:"Contraste",grayscale:"Escala de gris","hue-rotate":"Rotación de tono",invert:"Invertir",opacity:"Opacidad",saturate:"Saturación",sepia:"Sepia",scale:"Escala",rotation:"Rotación",turdsize:"Suprimir manchas",alphamax:"Umbral de la esquina",minPathSegments:"Mín. segmentos de camino",strokeWidth:"Ancho de línea",turnpolicy:"Política de giro",opticurve:"Optimizar curvas",opttolerance:"Tolerancia de optimización",showAdvancedControls:"Mostrar opciones avanzadas","%":"%",deg:"°",steps:"Pasos",pixels:"Píxeles",segments:"Segmentos",reset:"Restablecer",resetAll:"Restablecer todo",dropFileHere:"Arrastra un archivo aquí",openImage:"Abrir imagen",saveSVG:"Guardar SVG",pasteImage:"Pegar imagen",copySVG:"Copiar SVG",shareSVG:"Compartir SVG",install:"Instalar",posterizeInputImage:"Posterizar imagen de entrada",colorSVG:"SVG de colores",monochromeSVG:"SVG monocromático",colorChannels:"Canales de color",imageSizeAndRotation:"Tamaño y rotación de la imagen",imagePreprocessing:"Preprocesamiento de la imagen",svgOptions:"Opciones SVG",considerDPR:"Usar proporción de píxeles del dispositivo",tweak:"Ajustar",closeOptions:"Cerrar",optimizingSVG:"Optimizando SVG",copiedSVG:"SVG copiado",savedSVG:"SVG guardado",readyToWorkOffline:"Listo para trabajar sin conexión",svgSize:"Tamaño SVG",zoom:"Zoom",license:"Licencia",about:"Acerca de",...e};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/filehandling-ppwoROA8.js: -------------------------------------------------------------------------------- 1 | import{i as n,s as a,F as o}from"./index-aEZOVBVk.js";window.launchQueue.setConsumer(async e=>{if(e.files.length)for(const t of e.files){const s=await t.getFile();if(s.type.startsWith("image/")){const i=URL.createObjectURL(s);n.addEventListener("load",()=>{URL.revokeObjectURL(i)},{once:!0}),n.src=i,await a(o,t);return}}}); 2 | -------------------------------------------------------------------------------- /docs/assets/fr-FR-B9l2OUfe.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const o={red:"Rouge",green:"Vert",blue:"Bleu",alpha:"Alpha",brightness:"Luminosité",contrast:"Contraste",grayscale:"Niveaux de gris","hue-rotate":"Rotation de teinte",invert:"Inversion",opacity:"Opacité",saturate:"Saturation",sepia:"Sépia",scale:"Échelle",rotation:"Rotation",turdsize:"Supprimer les tâches",alphamax:"Seuil d’angle",minPathSegments:"Longueur de chemin min.",strokeWidth:"Épaisseur de trait",turnpolicy:"Stratégie de changement de direction",opticurve:"Optimiser les courbes",opttolerance:"Tolérance d’optimisation",showAdvancedControls:"Options avancées","%":"%",deg:"°",steps:"Étapes",pixels:"Pixels",segments:"Segments",reset:"Réinitialiser",resetAll:"Tout réinitialiser",dropFileHere:"Déposez le fichier ici",openImage:"Ouvrir une image",saveSVG:"Enregistrer le SVG",pasteImage:"Coller une image",copySVG:"Copier le SVG",shareSVG:"Partager le SVG",install:"Installer",posterizeInputImage:"Postériser l’image source",colorSVG:"SVG en couleurs",monochromeSVG:"SVG monochrome",colorChannels:"Canaux de couleurs",imageSizeAndRotation:"Dimensions et rotation de la source",imagePreprocessing:"Précalcul de la source",svgOptions:"Options SVG",considerDPR:"Prendre en compte la densité de pixels de l’appareil",tweak:"Ajuster",closeOptions:"Fermer",optimizingSVG:"Optimisation du SVG",copiedSVG:"SVG copié",savedSVG:"SVG enregistré",readyToWorkOffline:"Prêt à fonctionner hors connexion.",svgSize:"Poids du SVG",zoom:"Zoom",license:"Licence",about:"À propos",...e};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/he-IL-eg_IqJCK.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"אדום",green:"ירוק",blue:"כחול",alpha:"אלפא",brightness:"בהירות",contrast:"ניגודיות",grayscale:"גווני אפור","hue-rotate":"רוטציית גוון",invert:"היפוך",opacity:"אטימות",saturate:"רוויה",sepia:"ספיה",scale:"קנה מידה",rotation:"סיבוב",turdsize:"דיכוי כתמים",alphamax:"סף פינתי",minPathSegments:"אורך מסלול מינימלי",strokeWidth:"עובי קו",turnpolicy:"אסטרטגיית שינוי כיוון",opticurve:"אופטימיזציית עקומות",opttolerance:"רגישות אופטימיזצייה",showAdvancedControls:"הצג אפשרויות מתקדמות","%":"%",deg:"°",steps:"שלבים",pixels:"פיקסלים",segments:"מקטעים",reset:"איתחול",resetAll:"אתחל הכל",dropFileHere:"שחרר קובץ כאן",openImage:"פתח תמונה",saveSVG:"SVG שמור",pasteImage:"הדבק תמונה",copySVG:"SVG העתק",shareSVG:"SVG שתפורסם",install:"התקן",posterizeInputImage:"פוסטריזציה של תמונה",colorSVG:"צבעוני SVG",monochromeSVG:"שחור לבן SVG",colorChannels:"ערוצי צבע",imageSizeAndRotation:"מידות וסיבוב",imagePreprocessing:"עיבוד מקדים",svgOptions:"SVG אפשרויות",considerDPR:"התחשב ביחס הפיקסלים של ההתקן",tweak:"כיוונון",closeOptions:"סגור",optimizingSVG:"בתהליך אופטימיזציה SVG",copiedSVG:"העותק SVG",savedSVG:"נשמר SVG",readyToWorkOffline:".מוכן לעבוד במצב לא מקוון",svgSize:"SVG גודל",zoom:"זום",license:"רישיון",about:"אודות",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/id-ID-B0V93tcH.js: -------------------------------------------------------------------------------- 1 | import a from"./languages-BtQEISXM.js";const i={red:"Merah",green:"Hijau",blue:"Biru",alpha:"Alfa",brightness:"Cahaya",contrast:"Kontras",grayscale:"Monokromatik","hue-rotate":"Perputaran Corak",invert:"Inversi",opacity:"Transparansi",saturate:"Saturasi",sepia:"Sepia",scale:"Skala",rotation:"Rotasi",turdsize:"Hapus Bintik",alphamax:"Batas Pojok",minPathSegments:"Panjang Minimal Garis",strokeWidth:"Lebar Goresan",turnpolicy:"Balik Haluan",opticurve:"Optimasi Lengkungan",opttolerance:"Optimasi Toleransi",showAdvancedControls:"Munculkan Opsi Tambahan","%":"%",deg:"°",steps:"Langkah",pixels:"Piksel",segments:"Segmen",reset:"Atur Ulang",resetAll:"Atur Ulang Semua",dropFileHere:"Taruh File Di sini",openImage:"Buka Gambar",saveSVG:"Simpan SVG",pasteImage:"Tempel Gambar",copySVG:"Salin SVG",shareSVG:"Bagikan SVG",install:"Pasang",posterizeInputImage:"Posterisasi Gambar",colorSVG:"SVG Berwarna",monochromeSVG:"SVG Hitam Putih",colorChannels:"Kanal Warna",imageSizeAndRotation:"Ukuran dan Rotasi",imagePreprocessing:"Pra Pemrosesan",svgOptions:"Pengaturan SVG",considerDPR:"Pertimbangkan Proporsi Piksel Perangkat",tweak:"Modifikasi",closeOptions:"Tutup",optimizingSVG:"Optimasi SVG",copiedSVG:"SVG Tersalin",savedSVG:"SVG Tersimpan",readyToWorkOffline:"Siap Bekerja Offline",svgSize:"Ukuran SVG",zoom:"Perbesar",license:"Lisensi",about:"Tentang",...a};export{i as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/install-DX-WpHQu.js: -------------------------------------------------------------------------------- 1 | import{b as l}from"./index-aEZOVBVk.js";let e=null;window.addEventListener("beforeinstallprompt",t=>{t.preventDefault(),e=t,l.style.display="flex"});l.addEventListener("click",async()=>{if(!e)return;e.prompt(),(await e.userChoice).outcome==="accepted"&&(l.style.display="none",e=null)});window.addEventListener("appinstalled",t=>{l.style.display="none",e=null}); 2 | -------------------------------------------------------------------------------- /docs/assets/it-IT-CT3hgywc.js: -------------------------------------------------------------------------------- 1 | import i from"./languages-BtQEISXM.js";const e={red:"Rosso",green:"Verde",blue:"Blu",alpha:"Alfa",brightness:"Luminosità",contrast:"Contrasto",grayscale:"Scala di grigi","hue-rotate":"Variazione di tinta",invert:"Inversione colori",opacity:"Opacità",saturate:"Saturazione",sepia:"Effetto seppia",scale:"Scala",rotation:"Ruota",turdsize:"Elimina difetti",alphamax:"Soglia d'angolo",minPathSegments:"Lunghezza min. tratto",strokeWidth:"Larghezza del tratto",turnpolicy:"Disambiguazione tratti",opticurve:"Ottimizza le curve",opttolerance:"Tolleranza ottimizzazione",showAdvancedControls:"Mostra opzioni avanzate","%":"%",deg:"°",steps:"Passi",pixels:"Pixel",segments:"Segmenti",reset:"Ripristina",resetAll:"Ripristina tutto",dropFileHere:"Trascina un file qui",openImage:"Apri immagine",saveSVG:"Salva SVG",pasteImage:"Incolla immagine",copySVG:"Copia SVG",shareSVG:"Condividi SVG",install:"Installa",posterizeInputImage:"Posterizza immagine di input",colorSVG:"SVG a colori",monochromeSVG:"SVG monocromatico",colorChannels:"Canali di colore",imageSizeAndRotation:"Dimensioni e rotazione dell'immagine",imagePreprocessing:"Preelaborazione immagine",svgOptions:"Opzioni SVG",considerDPR:"Considera il rapporto pixel del dispositivo",tweak:"Modifica",closeOptions:"Chiudi",optimizingSVG:"Ottimizzazione SVG",copiedSVG:"SVG copiato",savedSVG:"SVG salvato",readyToWorkOffline:"Pronto per lavorare offline.",svgSize:"Dimensioni SVG",zoom:"Zoom",license:"Licenza",about:"Informazioni",...i};export{e as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/ja-JP-9Mx_HtSv.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"赤",green:"緑",blue:"青",alpha:"アルファ",brightness:"明度",contrast:"コントラスト",grayscale:"グレースケール","hue-rotate":"色相",invert:"階調の反転",opacity:"透明度",saturate:"彩度",sepia:"セピア",scale:"拡大/縮小",rotation:"回転",turdsize:"ノイズ除去",alphamax:"コーナーしきい値",minPathSegments:"パスの最小の長さ",strokeWidth:"ストローク幅",turnpolicy:"ターンポリシー",opticurve:"曲線を最適化",opttolerance:"許容差を最適化",showAdvancedControls:"上級者向け機能を表示する","%":"%",deg:"°",steps:"ステップ",pixels:"ピクセル",segments:"セグメント",reset:"リセット",resetAll:"すべてリセット",dropFileHere:"ここにファイルをドロップ",openImage:"画像を開く",saveSVG:"SVG として保存",pasteImage:"画像を貼り付ける",copySVG:"SVG をコピーする",shareSVG:"SVG を共有する",install:"インストール",posterizeInputImage:"ポスタライズする",colorSVG:"カラー SVG",monochromeSVG:"モノクロ SVG",colorChannels:"カラーチャンネル",imageSizeAndRotation:"大きさと回転",imagePreprocessing:"前処理",svgOptions:"SVG 設定",considerDPR:"デバイスのピクセル比を考慮する",tweak:"微調整",closeOptions:"閉じる",optimizingSVG:"SVG を最適化する",copiedSVG:"コピーした SVG",savedSVG:"保存した SVG",readyToWorkOffline:"オフライン作業可能",svgSize:"SVG のサイズ",zoom:"ズーム",license:"ライセンス",about:"について",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/ko-KR-CxGXyVbz.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"빨강",green:"초록",blue:"파랑",alpha:"알파(투명도)",brightness:"밝기",contrast:"대비",grayscale:"그레이 스케일","hue-rotate":"색조 회전",invert:"반전",opacity:"투명도",saturate:"채도",sepia:"세피아",scale:"확대/축소",rotation:"회전",turdsize:"얼룩 줄이기",alphamax:"알파 맥스",minPathSegments:"최소 패스 구간수",strokeWidth:"선 두께",turnpolicy:"Turn Policy",opticurve:"곡선 최적화하기",opttolerance:"최적화 허용치",showAdvancedControls:"고급 설정 보기","%":"%",deg:"°",steps:"단계",pixels:"픽셀",segments:"구간",reset:"초기화",resetAll:"모두 초기화",dropFileHere:"파일을 여기 놓아주세요",openImage:"이미지 열기",saveSVG:"SVG 저장하기",pasteImage:"이미지 붙여넣기",copySVG:"SVG 복사하기",shareSVG:"SVG 공유하기",install:"설치하기",posterizeInputImage:"입력한 이미지 포스터효과",colorSVG:"SVG 색상 주기",monochromeSVG:"SVG 단색 만들기",colorChannels:"색상 채널",imageSizeAndRotation:"크기 입력/회전",imagePreprocessing:"사전 처리 입력",svgOptions:"SVG 설정",considerDPR:"기기 픽셀 비율 고려",tweak:"조정",closeOptions:"닫기",optimizingSVG:"SVG 최적화중",copiedSVG:"SVG 복사완료",savedSVG:"SVG 저장완료",readyToWorkOffline:"오프라인 작업 준비됨.",svgSize:"SVG 크기",zoom:"확대",license:"사용권(라이센스)",about:"About",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/languages-BtQEISXM.js: -------------------------------------------------------------------------------- 1 | const a={arTN:"عربى",beBY:"Беларуская",caES:"Català",daDK:"Dansk",deDE:"Deutsch",elGR:"Ελληνικά",enGB:"English (United Kingdom)",enUS:"English (United States)",esES:"Español",frFR:"Français",heIL:"עברית",idID:"Bahasa Indonesia",itIT:"Italiano",jaJP:"日本語",koKR:"한국어",nlNL:"Nederlands",noNO:"Norsk",plPL:"Polski",ptBR:"Português",ruRU:"Русский",ukUA:"Українська",zhCN:"中文"};export{a as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/module-workers-polyfill.min-B4htaMKj.js: -------------------------------------------------------------------------------- 1 | (function(m){if(!m||m._$P!==!0){if(m){var x,b=Object.defineProperty({},"type",{get:function(){x=!0}});try{var O=URL.createObjectURL(new Blob([""],{type:"text/javascript"}));new m(O,b).terminate(),URL.revokeObjectURL(O)}catch{}if(!x)try{new m("data:text/javascript,",b).terminate()}catch{}if(x)return;(self.Worker=function(t,u){return u&&u.type=="module"&&(u={name:t+` 2 | `+(u.name||"")},t=typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new Error().stack.match(/[(@]((file|https?):\/\/[^)]+?):\d+(:\d+)?(?:\)|$)/m)[1]),new m(t,u)})._$P=!0}typeof document>"u"&&function(){var t={},u={};function R(v,r){for(r=r.replace(/^(\.\.\/|\.\/)/,v.replace(/[^/]+$/g,"")+"$1");r!==(r=r.replace(/[^/]+\/\.\.\//g,"")););return r.replace(/\.\//g,"")}var y=[],U=y.push.bind(y);addEventListener("message",U);var P=self.name.match(/^[^\n]+/)[0];self.name=self.name.replace(/^[^\n]*\n/g,""),function v(r,k){var E,s=r;return k&&(r=R(k,r)),t[r]||(t[r]=fetch(r).then(function(j){if((s=j.url)!==r){if(t[s]!=null)return t[s];t[s]=t[r]}return j.text().then(function($){if(!j.ok)throw $;var d={exports:{}};E=u[s]||(u[s]=d.exports);var S=function(f){return v(f,s)},L=[];return $=function(f,i){i=i||[];var a,p=[],h=0;function g(c,n){for(var e,l=/(?:^|,)\s*([\w$]+)(?:\s+as\s+([\w$]+))?\s*/g,o=[];e=l.exec(c);)n?p.push((e[2]||e[1])+":"+e[1]):o.push((e[2]||e[1])+"="+a+"."+e[1]);return o}return(f=f.replace(/(^\s*|[;}\s\n]\s*)import\s*(?:(?:([\w$]+)(?:\s*\,\s*\{([^}]+)\})?|(?:\*\s*as\s+([\w$]+))|\{([^}]*)\})\s*from)?\s*(['"])(.+?)\6/g,function(c,n,e,l,o,w,_,A){return i.push(A),n+="var "+(a="$im$"+ ++h)+"=$require("+_+A+_+")",e&&(n+=";var "+e+" = 'default' in "+a+" ? "+a+".default : "+a),o&&(n+=";var "+o+" = "+a),(l=l||w)&&(n+=";var "+g(l,!1)),n}).replace(/((?:^|[;}\s\n])\s*)export\s*(?:\s+(default)\s+|((?:async\s+)?function\s*\*?|class|const\s|let\s|var\s)\s*([a-zA-Z0-9$_{[]+))/g,function(c,n,e,l,o){if(e){var w="$im$"+ ++h;return p.push("default:"+w),n+"var "+w+"="}return p.push(o+":"+o),n+l+" "+o}).replace(/((?:^|[;}\s\n])\s*)export\s*\{([^}]+)\}\s*;?/g,function(c,n,e){return g(e,!0),n}).replace(/((?:^|[^a-zA-Z0-9$_@`'".])\s*)(import\s*\([\s\S]+?\))/g,"$1$$$2")).replace(/((?:^|[^a-zA-Z0-9$_@`'".])\s*)import\.meta\.url/g,"$1"+JSON.stringify(r))+` 3 | $module.exports={`+p.join(",")+"}"}($,L),Promise.all(L.map(function(f){var i=R(s,f);return i in u?u[i]:v(i)})).then(function(f){$+=` 4 | //# sourceURL=`+r;try{var i=new Function("$import","$require","$module","$exports",$)}catch(e){var a=e.line-1,p=e.column,h=$.split(` 5 | `),g=(h[a-2]||"")+` 6 | `+h[a-1]+` 7 | `+(p==null?"":new Array(p).join("-")+`^ 8 | `)+(h[a]||""),c=new Error(e.message+` 9 | 10 | `+g,r,a);throw c.sourceURL=c.fileName=r,c.line=a,c.column=p,c}var n=i(S,function(e){return f[L.indexOf(e)]},d,d.exports);return n!=null&&(d.exports=n),Object.assign(E,d.exports),d.exports})})}))}(P).then(function(){removeEventListener("message",U),y.map(dispatchEvent)}).catch(function(v){setTimeout(function(){throw v})})}()}})(self.Worker); 11 | -------------------------------------------------------------------------------- /docs/assets/nl-NL-BPPnxxwY.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const a={red:"Rood",green:"Groen",blue:"Blauw",alpha:"Alfa",brightness:"Helderheid",contrast:"Contrast",grayscale:"Grijswaarden","hue-rotate":"Hue Rotate",invert:"Omdraaien",opacity:"Transparantie",saturate:"Verzadiging",sepia:"Sepia",scale:"Schaal",rotation:"Rotatie",turdsize:"Onderdruk spikkels",alphamax:"Corner Threshold",minPathSegments:"Min. Padlengte",strokeWidth:"Lijndikte",turnpolicy:"Turn Policy",opticurve:"Optimaliseer Curves",opttolerance:"Optimalisatie Tolerantie",showAdvancedControls:"Toon Expert Opties","%":"%",deg:"°",steps:"Stappen",pixels:"Pixels",segments:"Segmenten",reset:"Reset",resetAll:"Reset Alles",dropFileHere:"Drop bestand hier",openImage:"Open beeldbestand",saveSVG:"SVG opslaan",pasteImage:"Beeldbestand plakken",copySVG:"SVG kopiëren",shareSVG:"SVG delen",install:"Installeren",posterizeInputImage:"Invoerbeeld Posteriseren",colorSVG:"Kleuren SVG",monochromeSVG:"Monochrome SVG",colorChannels:"Kleurkanalen",imageSizeAndRotation:"Invoergrootte en Rotatie",imagePreprocessing:"Invoer Voorbewerking",svgOptions:"SVG Opties",considerDPR:"Consider Device Pixel Ratio",tweak:"Tweak",closeOptions:"Sluiten",optimizingSVG:"SVG aan het optimaliseren",copiedSVG:"SVG gekopiëerd",savedSVG:"SVG opgeslagen",readyToWorkOffline:"Klaar om offline te werken.",svgSize:"SVG grootte",zoom:"Inzoomen",license:"Licentie",about:"Over",...e};export{a as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/no-NO-DiHwyl5f.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Rød",green:"Grønn",blue:"Blå",alpha:"Alfa",brightness:"Lysstyrke",contrast:"Kontrast",grayscale:"Gråtoner","hue-rotate":"Nyanserotasjon",invert:"Invertering",opacity:"Gjennomsiktighet",saturate:"Metning",sepia:"Sepia",scale:"Skalering",rotation:"Rotasjon",turdsize:"Undertrykk flekker",alphamax:"Hjørneterskel",minPathSegments:"Min. stilengde",strokeWidth:"Strøkbredde",turnpolicy:"Svingstrategi",opticurve:"Optimaliser kurver",opttolerance:"Optimaliseringstoleranse",showAdvancedControls:"Vis avanserte alternativer","%":"%",deg:"°",steps:"trinn",pixels:"piksler",segments:"segmenter",reset:"Nullstill",resetAll:"Nullstill alt",dropFileHere:"Slipp fil her",openImage:"Åpne bilde",saveSVG:"Lagre SVG",pasteImage:"Lim inn bilde",copySVG:"Kopier SVG",shareSVG:"Del SVG",install:"Installer",posterizeInputImage:"Posteriser inndatabilde",colorSVG:"Farget SVG",monochromeSVG:"Monokrom SVG",colorChannels:"Fargekanaler",imageSizeAndRotation:"Inndata størrelse og rotasjon",imagePreprocessing:"Inndataforbehandling",svgOptions:"SVG-alternativer",considerDPR:"Ta hensyn til enhetens pikselforhold",tweak:"Justér",closeOptions:"Lukk",optimizingSVG:"Optimaliserer SVG",copiedSVG:"Kopierte SVG",savedSVG:"Lagret SVG",readyToWorkOffline:"Klar for offline-bruk.",svgSize:"SVG-størrelse",zoom:"Zoom",license:"Lisens",about:"Om",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/pl-PL-C9v2eRNf.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const o={red:"Czerwony",green:"Zielony",blue:"Niebieski",alpha:"Alfa",brightness:"Jasność",contrast:"Kontrast",grayscale:"Odcień szarości","hue-rotate":"Zmiana odcienia",invert:"Odwrócenie",opacity:"Przejrzystość",saturate:"Nasycenie",sepia:"Sepia",scale:"Skala",rotation:"Obrót",turdsize:"Tłumienie plamek",alphamax:"Próg narożnika",minPathSegments:"Min. długość ścieżki",strokeWidth:"Szerokość przeciągnięcia",turnpolicy:"Strategia przekształcenia",opticurve:"Optymalizacja krzywych",opttolerance:"Tolerancja optymalizacji",showAdvancedControls:"Zaawansowane opcje","%":"%",deg:"°",steps:"Kroki",pixels:"Piksele",segments:"Segmenty",reset:"Resetuj",resetAll:"Zresetuj wszystko",dropFileHere:"Dodaj plik",openImage:"Otwórz obraz",saveSVG:"Zapisz SVG",pasteImage:"Wklej obraz",copySVG:"Kopiuj SVG",shareSVG:"Udostępnij SVG",install:"Zainstaluj",posterizeInputImage:"Posteryzacja obrazu wejściowego",colorSVG:"Kolor SVG",monochromeSVG:"Monochromatyczny SVG",colorChannels:"Kanały koloru",imageSizeAndRotation:"Rozmiar obrazu wejściowego i obrót",imagePreprocessing:"Wstępne przetwarzanie obrazu",svgOptions:"Opcje SVG",considerDPR:"Uwzględnij stosunek pikseli urządzenia",tweak:"Dostosuj",closeOptions:"Zamknij",optimizingSVG:"Optymalizacja SVG",copiedSVG:"Skopiowany SVG",savedSVG:"Zapisany SVG",readyToWorkOffline:"Gotowy do pracy Offline.",svgSize:"Rozmiar SVG",zoom:"Powiększenie",license:"Linencja",about:"O projekcie",...e};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/preprocessworker-BsUKOZia.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";const f="discrete";let a,e;const d=(t,s,r,o,n,c)=>(e.clearRect(0,0,n,c),e.setTransform(1,0,0,1,n/2,c/2),e.rotate(o*Math.PI/180),e.filter=r,e.drawImage(t,-t.width/2,-t.height/2),e.setTransform(1,0,0,1,0,0),e.filter=s,e.drawImage(a,0,0,a.width,a.height,0,0,n,c),e.getImageData(0,0,n,c));self.addEventListener("message",t=>{if(t.data.offscreen){a=t.data.offscreen,e=a.getContext("2d");return}const{inputImageBitmap:s,posterize:r,rgba:o,cssFilters:n,rotate:c,width:l,height:i,dpr:u}=t.data;e.scale(u,u),a.width=l,a.height=i;const g=d(s,p(r,o),n,c,l,i);t.ports[0].postMessage({result:g})});const p=(t,s)=>{const r=[];return t&&r.push({name:"componentTransfer",filter:"componentTransfer",funcR:{type:f,tableValues:s.r},funcG:{type:f,tableValues:s.g},funcB:{type:f,tableValues:s.b},funcA:{type:f,tableValues:s.a}}),new CanvasFilter(r)}})(); 2 | -------------------------------------------------------------------------------- /docs/assets/preprocessworker-CehXHJLM.js: -------------------------------------------------------------------------------- 1 | function r(e){return new Worker("/assets/preprocessworker-BsUKOZia.js",{name:e?.name})}export{r as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/pt-BR-Dd28HDO_.js: -------------------------------------------------------------------------------- 1 | import a from"./languages-BtQEISXM.js";const o={red:"Vermelho",green:"Verde",blue:"Azul",alpha:"Alfa",brightness:"Brilho",contrast:"Contraste",grayscale:"Tons de cinza","hue-rotate":"Rotação de tonalidade",invert:"Inverter",opacity:"Opacidade",saturate:"Saturação",sepia:"Sépia",scale:"Escala",rotation:"Rotação",turdsize:"Suprimir manchas",alphamax:"Limiar de canto",minPathSegments:"Mín. de segmentos de caminho",strokeWidth:"Largura do traço",turnpolicy:"Política de turno",opticurve:"Otimizar curvas",opttolerance:"Tolerância de otimização",showAdvancedControls:"Mostrar controles avançados","%":"%",deg:"°",steps:"Passos",pixels:"Pixels",segments:"Segmentos",reset:"Resetar",resetAll:"Resetar tudo",dropFileHere:"Arraste um arquivo aqui",openImage:"Abrir imagem",saveSVG:"Salvar SVG",pasteImage:"Colar imagem",copySVG:"Copiar SVG",shareSVG:"Compartilhar SVG",install:"Instalar",posterizeInputImage:"Posterizar imagem de entrada",colorSVG:"SVG colorido",monochromeSVG:"SVG monocromático",colorChannels:"Canais de cor",imageSizeAndRotation:"Tamanho e rotação da imagem",imagePreprocessing:"Preprocessamento da imagem",svgOptions:"Opções SVG",considerDPR:"Usar a proporção de pixels do dispositivo",tweak:"Ajustar",closeOptions:"Fechar",optimizingSVG:"Otimizando SVG",copiedSVG:"SVG copiado",savedSVG:"SVG salvado",readyToWorkOffline:"Pronto para trabalhar offline",svgSize:"Tamanho do SVG",zoom:"Zoom",license:"Licença",about:"Sobre",...a};export{o as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/ru-RU-ClHujSzv.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Красный",green:"Зелёный",blue:"Синий",alpha:"Прозрачность",brightness:"Яркость",contrast:"Контраст",grayscale:"Монохром","hue-rotate":"Поворот цвета",invert:"Инверсия",opacity:"Прозрачность",saturate:"Насыщенность",sepia:"Сепия",scale:"Масштаб",rotation:"Поворот",turdsize:"Уменьшить мусор",alphamax:"Угловой порог",minPathSegments:"Минимальная длина пути",strokeWidth:"Толщина обводки",turnpolicy:"Правила поворота",opticurve:"Оптимизировать кривые",opttolerance:"Уровень оптимизации",showAdvancedControls:"Дополнительные настройки","%":"%",deg:"°",steps:"шагов",pixels:"пикселей",segments:"сегментов",reset:"Сбросить",resetAll:"Сбросить всё",dropFileHere:"Бросьте файл сюда",openImage:"Открыть картинку",saveSVG:"Сохранить SVG",pasteImage:"Вставить картинку",copySVG:"Скопировать SVG",shareSVG:"Поделиться SVG",install:"Установить",posterizeInputImage:"Постеризовать входную картинку",colorSVG:"Цветной SVG",monochromeSVG:"Монохромный SVG",colorChannels:"Цветовые каналы",imageSizeAndRotation:"Входные размеры и поворот",imagePreprocessing:"Входная обработка",svgOptions:"Настройки SVG",considerDPR:"Учитывать плотность пикселей",tweak:"Подкрутить",closeOptions:"Закрыть",optimizingSVG:"Оптимизирую SVG",copiedSVG:"Скопированный SVG",savedSVG:"Сохранённый SVG",readyToWorkOffline:"Готово для работы офлайн.",svgSize:"Размер SVG",zoom:"Масштаб",license:"Лицензия",about:"О проекте",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/share-BJnRZ6E5.js: -------------------------------------------------------------------------------- 1 | import{c as r,e as l,f as i,g as o,o as g,h as c,j as m,F as f,k as d}from"./index-aEZOVBVk.js";r.style.display="flex";r.addEventListener("click",async()=>{let a=l.innerHTML;i(o.t("optimizingSVG"),1/0),a=await g(a),c();let t=!1;try{t=await m(f)}catch{}const n=t?d(t):"Untitled.svg",s={files:[new File([a],n,{type:"image/svg+xml"})]};if(navigator.canShare(s))try{await navigator.share(s)}catch(e){e.name!=="AbortError"&&(console.error(e.name,e.message),i(e.message))}}); 2 | -------------------------------------------------------------------------------- /docs/assets/uk-UA-BbOKxyWq.js: -------------------------------------------------------------------------------- 1 | import e from"./languages-BtQEISXM.js";const t={red:"Червоний",green:"Зелений",blue:"Синій",alpha:"Прозорість",brightness:"Яскравість",contrast:"Контраст",grayscale:"Монохром","hue-rotate":"Тон",invert:"Інверсія",opacity:"Прозорість",saturate:"Насиченість",sepia:"Сепія",scale:"Масштаб",rotation:"Поворот",turdsize:"Придушити плями",alphamax:"Згладжування",minPathSegments:"Мін. довжина лінії",strokeWidth:"Товщина контуру",turnpolicy:"Правила повороту",opticurve:"Оптимізувати криві",opttolerance:"Рівень оптимізації",showAdvancedControls:"Додаткові налаштування","%":"%",deg:"°",steps:"кроків",pixels:"пікселів",segments:"сегментів",reset:"Скинути",resetAll:"Скинути все",dropFileHere:"Киньте файл сюди",openImage:"Відкрити зображення",saveSVG:"Зберегти SVG",pasteImage:"Зберегти зображення",copySVG:"Скопіювати SVG",shareSVG:"Поділитися SVG",install:"Встановити",posterizeInputImage:"Постеризувати вхідне зображення",colorSVG:"Кольоровий SVG",monochromeSVG:"Монохромний SVG",colorChannels:"Кольорові канали",imageSizeAndRotation:"Вхідні розміри і обертання",imagePreprocessing:"Вхідна обробка",svgOptions:"Налаштування SVG",considerDPR:"Враховувати щільність пікселів",tweak:"Підкрутити",closeOptions:"Закрити",optimizingSVG:"Оптимізую SVG",copiedSVG:"Скопійований SVG",savedSVG:"Збережений SVG",readyToWorkOffline:"Готовий для роботи офлайн.",svgSize:"Розмір SVG",zoom:"Масштаб",license:"Ліцензія",about:"Про проект",...e};export{t as default}; 2 | -------------------------------------------------------------------------------- /docs/assets/windowcontrols-B6bju7oe.js: -------------------------------------------------------------------------------- 1 | import{d as a,m as e,a as s}from"./index-aEZOVBVk.js";const o="window-controls-overlay",n=()=>{e.classList.toggle(o,navigator.windowControlsOverlay.visible),s.classList.toggle(o,navigator.windowControlsOverlay.visible)};navigator.windowControlsOverlay.addEventListener("geometrychange",a(async()=>{n()},250));n(); 2 | -------------------------------------------------------------------------------- /docs/assets/workbox-window.prod.es5-DFjpnwFp.js: -------------------------------------------------------------------------------- 1 | try{self["workbox:window:7.0.0"]&&_()}catch{}function S(t,r){return new Promise(function(e){var i=new MessageChannel;i.port1.onmessage=function(f){e(f.data)},t.postMessage(r,[i.port2])})}function W(t,r){for(var e=0;et.length)&&(r=t.length);for(var e=0,i=new Array(r);e"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(e=function(f,d){if(f){if(typeof f=="string")return E(f,d);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?E(f,d):void 0}}(t))||r&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 2 | In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(e=t[Symbol.iterator]()).next.bind(e)}try{self["workbox:core:7.0.0"]&&_()}catch{}var y=function(){var t=this;this.promise=new Promise(function(r,e){t.resolve=r,t.reject=e})};function b(t,r){var e=location.href;return new URL(t,e).href===new URL(r,e).href}var g=function(t,r){this.type=t,Object.assign(this,r)};function p(t,r,e){return e?r?r(t):t:(t&&t.then||(t=Promise.resolve(t)),r?t.then(r):t)}function L(){}var j={type:"SKIP_WAITING"};function P(t,r){if(!r)return t&&t.then?t.then(L):Promise.resolve()}var x=function(t){var r,e;function i(v,c){var n,o;return c===void 0&&(c={}),(n=t.call(this)||this).nn={},n.tn=0,n.rn=new y,n.en=new y,n.on=new y,n.un=0,n.an=new Set,n.cn=function(){var s=n.fn,a=s.installing;n.tn>0||!b(a.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=a,s.removeEventListener("updatefound",n.cn)):(n.hn=a,n.an.add(a),n.rn.resolve(a)),++n.tn,a.addEventListener("statechange",n.ln)},n.ln=function(s){var a=n.fn,u=s.target,l=u.state,m=u===n.vn,w={sw:u,isExternal:m,originalEvent:s};!m&&n.mn&&(w.isUpdate=!0),n.dispatchEvent(new g(l,w)),l==="installed"?n.wn=self.setTimeout(function(){l==="installed"&&a.waiting===u&&n.dispatchEvent(new g("waiting",w))},200):l==="activating"&&(clearTimeout(n.wn),m||n.en.resolve(u))},n.dn=function(s){var a=n.hn,u=a!==navigator.serviceWorker.controller;n.dispatchEvent(new g("controlling",{isExternal:u,originalEvent:s,sw:a,isUpdate:n.mn})),u||n.on.resolve(a)},n.gn=(o=function(s){var a=s.data,u=s.ports,l=s.source;return p(n.getSW(),function(){n.an.has(l)&&n.dispatchEvent(new g("message",{data:a,originalEvent:s,ports:u,sw:l}))})},function(){for(var s=[],a=0;a -------------------------------------------------------------------------------- /docs/favicon-bw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/favicon.png -------------------------------------------------------------------------------- /docs/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/filtericon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/installicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"SVGcode","short_name":"SVGcode","start_url":"https://svgco.de/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"https://svgco.de/","id":"https://svgco.de/","description":"SVGcode is a Progressive Web App that lets you convert raster images like JPG, PNG, GIF, WebP, AVIF, etc. to vector graphics in SVG format.","screenshots":[{"src":"https://svgco.de/screenshots/desktop-dark.png","sizes":"2592x1848","type":"image/png","form_factor":"wide"},{"src":"https://svgco.de/screenshots/desktop-light.png","sizes":"2592x1848","type":"image/png","form_factor":"wide"},{"src":"https://svgco.de/screenshots/mobile-dark.png","sizes":"1439x2880","type":"image/png","form_factor":"narrow"},{"src":"https://svgco.de/screenshots/mobile-light.png","sizes":"1439x2880","type":"image/png","form_factor":"narrow"}],"dir":"auto","display_override":["window-controls-overlay"],"orientation":"portrait","theme_color":"#ffffff","user_preferences":{"color_scheme":{"dark":{"theme_color":"#131313","background_color":"#131313"},"light":{"theme_color":"#ffffff","background_color":"#ffffff"}}},"theme_colors":[{"color":"#131313","media":"(prefers-color-scheme: dark)"}],"background_colors":[{"color":"#131313","media":"(prefers-color-scheme: dark)"}],"icons":[{"src":"https://svgco.de/favicon.png","type":"image/png","sizes":"1024x1024","purpose":"maskable"},{"src":"https://svgco.de/favicon.svg","type":"image/svg+xml","sizes":"150x150","purpose":"any"},{"src":"https://svgco.de/favicon-bw.svg","type":"image/svg+xml","sizes":"150x150","purpose":"monochrome"}],"file_handlers":[{"action":"https://svgco.de/","accept":{"image/*":[".jpg",".jpeg",".webp",".png",".avif",".gif",".svg",".bmp"]}}],"share_target":{"action":"https://svgco.de/share-target/","method":"POST","enctype":"multipart/form-data","params":{"files":[{"name":"image","accept":["image/jpeg","image/png","image/webp","image/gif"]}]}},"iarc_rating_id":"39d78758-59f2-429e-92ab-ad11d61feafe","categories":["photo","productivity","utilities","devtools"],"related_applications":[{"platform":"play","url":"https://play.google.com/store/apps/details?id=de.svgco.twa","id":"de.svgco.twa"},{"platform":"windows","url":"https://www.microsoft.com/en-us/p/svgcode/9plhxdgsw1rj","id":"9PLHXDGSW1RJ"},{"platform":"webapp","url":"https://svgco.de/manifest.webmanifest"}],"prefer_related_applications":false} 2 | -------------------------------------------------------------------------------- /docs/moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/openicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/optionsicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/paletteicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/pasteicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/privacy_policy.txt: -------------------------------------------------------------------------------- 1 | SVGcode does not collect, store, or process any personal data. 2 | -------------------------------------------------------------------------------- /docs/saveicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/scaleicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/screenshots/desktop-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/screenshots/desktop-dark.png -------------------------------------------------------------------------------- /docs/screenshots/desktop-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/screenshots/desktop-light.png -------------------------------------------------------------------------------- /docs/screenshots/mobile-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/screenshots/mobile-dark.png -------------------------------------------------------------------------------- /docs/screenshots/mobile-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/docs/screenshots/mobile-light.png -------------------------------------------------------------------------------- /docs/shareicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/shareiconmac.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/sharetargetsw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const MEDIA_CACHE = 'media-cache'; 21 | const ALL_CACHES = [MEDIA_CACHE]; 22 | 23 | self.addEventListener('install', (installEvent) => { 24 | installEvent.waitUntil( 25 | (async () => { 26 | await caches.open(MEDIA_CACHE); 27 | self.skipWaiting(); 28 | })(), 29 | ); 30 | }); 31 | 32 | self.addEventListener('activate', (activateEvent) => { 33 | activateEvent.waitUntil( 34 | (async () => { 35 | const cacheKeys = await caches.keys(); 36 | await Promise.all( 37 | cacheKeys.map(async (cacheKey) => { 38 | if (!ALL_CACHES.includes(cacheKey)) { 39 | await caches.delete(cacheKey); 40 | } 41 | }), 42 | ); 43 | self.clients.claim(); 44 | })(), 45 | ); 46 | }); 47 | 48 | self.addEventListener('fetch', (fetchEvent) => { 49 | if ( 50 | fetchEvent.request.url.endsWith('/share-target/') && 51 | fetchEvent.request.method === 'POST' 52 | ) { 53 | return fetchEvent.respondWith( 54 | (async () => { 55 | const formData = await fetchEvent.request.formData(); 56 | const image = formData.get('image'); 57 | const keys = await caches.keys(); 58 | const mediaCache = await caches.open( 59 | keys.filter((key) => key.startsWith('media'))[0], 60 | ); 61 | await mediaCache.put('shared-image', new Response(image)); 62 | return Response.redirect('./?share-target', 303); 63 | })(), 64 | ); 65 | } 66 | }); 67 | -------------------------------------------------------------------------------- /docs/spinner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/sun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/sw.js: -------------------------------------------------------------------------------- 1 | if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const o=s=>l(s,i),t={module:{uri:i},exports:u,require:o};e[i]=Promise.all(r.map((s=>t[s]||o(s)))).then((s=>(n(...s),u)))}}define(["./workbox-3e911b1d"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/ar-TN-hXpJlHQz.js",revision:null},{url:"assets/be-BY-CNG3QvRr.js",revision:null},{url:"assets/ca-ES-DaFbzlsN.js",revision:null},{url:"assets/colorworker-CnMNwOdv.js",revision:null},{url:"assets/da-DK-BOlqBLAC.js",revision:null},{url:"assets/de-DE-D8j2hVsF.js",revision:null},{url:"assets/el-GR-CPghj_w6.js",revision:null},{url:"assets/en-GB-C7JHOrHG.js",revision:null},{url:"assets/en-US-B0s0BWzt.js",revision:null},{url:"assets/es-ES-DBc5Zs2w.js",revision:null},{url:"assets/filehandling-ppwoROA8.js",revision:null},{url:"assets/fr-FR-B9l2OUfe.js",revision:null},{url:"assets/he-IL-eg_IqJCK.js",revision:null},{url:"assets/id-ID-B0V93tcH.js",revision:null},{url:"assets/index-aEZOVBVk.js",revision:null},{url:"assets/install-DX-WpHQu.js",revision:null},{url:"assets/it-IT-CT3hgywc.js",revision:null},{url:"assets/ja-JP-9Mx_HtSv.js",revision:null},{url:"assets/ko-KR-CxGXyVbz.js",revision:null},{url:"assets/languages-BtQEISXM.js",revision:null},{url:"assets/module-workers-polyfill.min-B4htaMKj.js",revision:null},{url:"assets/monochromeworker-CYWnkG-H.js",revision:null},{url:"assets/nl-NL-BPPnxxwY.js",revision:null},{url:"assets/no-NO-DiHwyl5f.js",revision:null},{url:"assets/pl-PL-C9v2eRNf.js",revision:null},{url:"assets/preprocessworker-BsUKOZia.js",revision:null},{url:"assets/preprocessworker-CehXHJLM.js",revision:null},{url:"assets/pt-BR-Dd28HDO_.js",revision:null},{url:"assets/ru-RU-ClHujSzv.js",revision:null},{url:"assets/share-BJnRZ6E5.js",revision:null},{url:"assets/style-CEQ7ztD7.css",revision:null},{url:"assets/svgoworker-DfXCDkWJ.js",revision:null},{url:"assets/uk-UA-BbOKxyWq.js",revision:null},{url:"assets/windowcontrols-B6bju7oe.js",revision:null},{url:"assets/workbox-window.prod.es5-DFjpnwFp.js",revision:null},{url:"assets/zh-CN-Ce7uxnjN.js",revision:null},{url:"index.html",revision:"ae4b4994b711241571de36f9484154d2"},{url:"sharetargetsw.js",revision:"fe6035ce16732cd07fe629f4f0959ef6"},{url:"manifest.webmanifest",revision:"d837f217da95d457de6898a8c26fab31"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); 2 | -------------------------------------------------------------------------------- /docs/tuneicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SVGcode", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "start": "npm run dev", 6 | "start-with-sw": "npm run build && npm run serve", 7 | "dev": "vite", 8 | "icons": "node ./scripts/icons.mjs", 9 | "build": "vite build && shx echo \"svgco.de\" > docs/CNAME && touch docs/.nojekyll && git add docs/", 10 | "prepare": "npm run icons && npm run build", 11 | "serve": "vite preview", 12 | "https-preview": "serve docs", 13 | "lint": "npm run lint:js && npm run lint:css && npm run lint:esm", 14 | "lint:esm": "npx find-unused-exports", 15 | "lint:js": "npx eslint . --ext .js,.mjs --fix --ignore-pattern docs/", 16 | "lint:css": "npx stylelint \"**/*.css\" --fix", 17 | "fix": "npx prettier . --write", 18 | "deploy": "npm run fix && npm run lint && npm run build && git commit -a && git push", 19 | "oculus": "cd src && ovr-platform-util create-pwa -o output.apk --android-sdk ~/bin/android-10 --manifest-content-file manifest.json --package-name de.svgco" 20 | }, 21 | "engines": { 22 | "node": ">=16" 23 | }, 24 | "dependencies": { 25 | "browser-fs-access": "^0.35.0", 26 | "browserlist": "^1.0.1", 27 | "canvas-size": "^2.0.0", 28 | "dark-mode-toggle": "^0.15.0", 29 | "esm-potrace-wasm": "^0.2.1", 30 | "idb-keyval": "^6.2.1", 31 | "module-workers-polyfill": "^0.3.2", 32 | "pinch-zoom-element": "^1.1.1", 33 | "svgo": "^3.2.0" 34 | }, 35 | "devDependencies": { 36 | "@rollup/plugin-dynamic-import-vars": "^2.1.2", 37 | "eslint": "^8.57.0", 38 | "eslint-config-google": "^0.14.0", 39 | "eslint-config-prettier": "^9.1.0", 40 | "eslint-plugin-node": "^11.1.0", 41 | "find-unused-exports": "^5.0.0", 42 | "https-localhost": "^4.7.1", 43 | "napa": "^3.0.0", 44 | "node-fetch": "^3.3.2", 45 | "prettier": "^3.2.5", 46 | "shx": "^0.3.4", 47 | "stylelint": "^16.2.1", 48 | "stylelint-config-standard": "^36.0.0", 49 | "stylelint-order": "^6.0.4", 50 | "vite": "^5.1.5", 51 | "vite-plugin-pwa": "^0.19.2" 52 | }, 53 | "eslintConfig": { 54 | "plugins": [ 55 | "eslint-plugin-node" 56 | ], 57 | "parserOptions": { 58 | "ecmaVersion": 2020, 59 | "sourceType": "module" 60 | }, 61 | "extends": [ 62 | "google", 63 | "prettier" 64 | ], 65 | "rules": { 66 | "valid-jsdoc": "off" 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /public/.well-known/assetlinks.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "relation": ["delegate_permission/common.handle_all_urls"], 4 | "target": { 5 | "namespace": "android_app", 6 | "package_name": "de.svgco.twa", 7 | "sha256_cert_fingerprints": [ 8 | "71:40:9F:D0:17:82:14:A5:97:F2:87:22:20:F3:CA:52:9B:BB:36:5F:82:EF:01:C9:1D:FE:16:AE:3B:32:7B:69" 9 | ] 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /public/copyicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon-bw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/public/favicon.png -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/filtericon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/installicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/openicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/optionsicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/paletteicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/pasteicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/privacy_policy.txt: -------------------------------------------------------------------------------- 1 | SVGcode does not collect, store, or process any personal data. 2 | -------------------------------------------------------------------------------- /public/saveicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/scaleicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/screenshots/desktop-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/public/screenshots/desktop-dark.png -------------------------------------------------------------------------------- /public/screenshots/desktop-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/public/screenshots/desktop-light.png -------------------------------------------------------------------------------- /public/screenshots/mobile-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/public/screenshots/mobile-dark.png -------------------------------------------------------------------------------- /public/screenshots/mobile-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomayac/SVGcode/494e2ab6c186ac9b97711a0ca071e28fe35fb6cb/public/screenshots/mobile-light.png -------------------------------------------------------------------------------- /public/shareicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/shareiconmac.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/sharetargetsw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const MEDIA_CACHE = 'media-cache'; 21 | const ALL_CACHES = [MEDIA_CACHE]; 22 | 23 | self.addEventListener('install', (installEvent) => { 24 | installEvent.waitUntil( 25 | (async () => { 26 | await caches.open(MEDIA_CACHE); 27 | self.skipWaiting(); 28 | })(), 29 | ); 30 | }); 31 | 32 | self.addEventListener('activate', (activateEvent) => { 33 | activateEvent.waitUntil( 34 | (async () => { 35 | const cacheKeys = await caches.keys(); 36 | await Promise.all( 37 | cacheKeys.map(async (cacheKey) => { 38 | if (!ALL_CACHES.includes(cacheKey)) { 39 | await caches.delete(cacheKey); 40 | } 41 | }), 42 | ); 43 | self.clients.claim(); 44 | })(), 45 | ); 46 | }); 47 | 48 | self.addEventListener('fetch', (fetchEvent) => { 49 | if ( 50 | fetchEvent.request.url.endsWith('/share-target/') && 51 | fetchEvent.request.method === 'POST' 52 | ) { 53 | return fetchEvent.respondWith( 54 | (async () => { 55 | const formData = await fetchEvent.request.formData(); 56 | const image = formData.get('image'); 57 | const keys = await caches.keys(); 58 | const mediaCache = await caches.open( 59 | keys.filter((key) => key.startsWith('media'))[0], 60 | ); 61 | await mediaCache.put('shared-image', new Response(image)); 62 | return Response.redirect('./?share-target', 303); 63 | })(), 64 | ); 65 | } 66 | }); 67 | -------------------------------------------------------------------------------- /public/spinner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/sun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/tuneicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/icons.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import fetch from 'node-fetch'; 21 | import { writeFile } from 'fs/promises'; 22 | import path from 'path'; 23 | 24 | const URL_PREFIX = 25 | 'https://raw.githubusercontent.com/google/material-design-icons/master/src/'; 26 | 27 | const icons = { 28 | paletteicon: 'image/brush/materialicons/24px.svg', 29 | scaleicon: 'content/square_foot/materialicons/24px.svg', 30 | filtericon: 'image/filter/materialicons/24px.svg', 31 | tuneicon: 'image/tune/materialicons/24px.svg', 32 | openicon: 'file/folder_open/materialicons/24px.svg', 33 | saveicon: 'content/save/materialicons/24px.svg', 34 | copyicon: 'content/content_copy/materialicons/24px.svg', 35 | pasteicon: 'content/content_paste/materialicons/24px.svg', 36 | shareiconmac: 'social/ios_share/materialicons/24px.svg', 37 | shareicon: 'social/share/materialicons/24px.svg', 38 | optionsicon: 'image/tune/materialicons/24px.svg', 39 | installicon: 'action/install_desktop/materialicons/24px.svg', 40 | }; 41 | 42 | (async () => { 43 | const promises = []; 44 | for (const [fileName, urlSuffix] of Object.entries(icons)) { 45 | const url = URL_PREFIX + urlSuffix; 46 | promises.push( 47 | fetch(url) 48 | .then((res) => res.text()) 49 | .then((svg) => 50 | writeFile(path.resolve('public', `${fileName}.svg`), svg), 51 | ), 52 | ); 53 | } 54 | await Promise.all(promises); 55 | })(); 56 | -------------------------------------------------------------------------------- /src/css/dark.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | :root { 21 | --main-accent-color: hotpink; 22 | --alternative-accent-color: #337eff; 23 | --canvas-text: #fff; 24 | --canvas: #131313; 25 | 26 | background-color: var(--canvas); 27 | color: var(--canvas-text); 28 | } 29 | 30 | .dropenter::before { 31 | background-color: #131313dd; 32 | } 33 | 34 | .monochrome svg { 35 | filter: invert(100%); 36 | } 37 | 38 | button { 39 | color: var(--canvas-text); 40 | } 41 | 42 | button.with-bg { 43 | background-color: var(--canvas); 44 | } 45 | 46 | .checkerboard { 47 | background-image: linear-gradient( 48 | 45deg, 49 | #131313 25%, 50 | transparent 25%, 51 | transparent 75%, 52 | #131313 75%, 53 | #131313 100% 54 | ), 55 | linear-gradient( 56 | 45deg, 57 | #131313 25%, 58 | #000 25%, 59 | #000 75%, 60 | #131313 75%, 61 | #131313 100% 62 | ); 63 | } 64 | -------------------------------------------------------------------------------- /src/css/light.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | :root { 21 | --main-accent-color: #e60073; 22 | --alternative-accent-color: #337eff; 23 | --canvas-text: #000; 24 | --canvas: #fff; 25 | } 26 | 27 | .dropenter::before { 28 | background-color: #fffe; 29 | } 30 | 31 | button.with-bg { 32 | background-color: #fff; 33 | } 34 | 35 | .checkerboard { 36 | background-image: linear-gradient( 37 | 45deg, 38 | #eee 25%, 39 | transparent 25%, 40 | transparent 75%, 41 | #eee 75%, 42 | #eee 100% 43 | ), 44 | linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%); 45 | } 46 | -------------------------------------------------------------------------------- /src/i18n/ar-TN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'أحمر', 24 | green: 'أخضر', 25 | blue: 'أزرق', 26 | alpha: 'ألفا', 27 | 28 | brightness: 'السطوع', 29 | contrast: 'التباين', 30 | grayscale: 'التدرج الرمادي', 31 | 'hue-rotate': 'تدوير فارق الألوان', 32 | invert: 'عكس', 33 | opacity: 'العتامة', 34 | saturate: 'التشبع', 35 | sepia: 'بني داكن', 36 | 37 | scale: 'حجم', 38 | rotation: 'دوران', 39 | turdsize: 'ترطيب الاخاديد', 40 | alphamax: 'عتبة الزاوية', 41 | minPathSegments: 'الحد الأدنى لطول المسار', 42 | strokeWidth: 'سمك الخط', 43 | turnpolicy: 'سياسة الدوران', 44 | opticurve: 'تحسين المنحنيات', 45 | opttolerance: 'درجة التسامح الأمثل', 46 | showAdvancedControls: 'إظهار الخيارات متقدمة', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'خطوات', 51 | pixels: 'بكسل', 52 | segments: 'شرائح', 53 | 54 | reset: 'إعادة ضبط', 55 | resetAll: 'إعادة ضبط الكل', 56 | 57 | dropFileHere: 'أضف الملف هنا', 58 | openImage: 'استيراد صورة', 59 | saveSVG: 'حفظ كـ SVG', 60 | pasteImage: 'لصق الصورة', 61 | copySVG: 'نسخ كـ SVG', 62 | shareSVG: 'مشاركة كـ SVG', 63 | install: 'تثبيت', 64 | 65 | posterizeInputImage: 'صورة الإدخال المتتالية', 66 | colorSVG: 'لون SVG', 67 | monochromeSVG: 'أحادية اللون SVG', 68 | 69 | colorChannels: 'قنوات اللون', 70 | imageSizeAndRotation: 'حجم الصورة والدوران', 71 | imagePreprocessing: 'المعالجة المسبقة', 72 | svgOptions: 'خيارات SVG', 73 | 74 | considerDPR: 'اخذ بعين الاعتبار نسبة وحدات البكسل للجهاز', 75 | 76 | tweak: 'تعديل', 77 | closeOptions: 'قفل الخيارات', 78 | 79 | optimizingSVG: 'تحسين SVG', 80 | copiedSVG: 'تم نسخ SVG', 81 | savedSVG: 'تم حفظ SVG', 82 | 83 | readyToWorkOffline: 'جاهز للعمل دون اتصال.', 84 | svgSize: 'حجم SVG', 85 | zoom: 'تكبير', 86 | 87 | license: 'رخصة الاستخدام', 88 | about: 'عن', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/be-BY.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Чырвоны', 24 | green: 'Зялёны', 25 | blue: 'Блакітны', 26 | alpha: 'Празрыстасць', 27 | 28 | brightness: 'Яркасць', 29 | contrast: 'Кантраст', 30 | grayscale: 'Манахром', 31 | 'hue-rotate': 'Паварот колеру', 32 | invert: 'Інверсія', 33 | opacity: 'Празрыстасць', 34 | saturate: 'Насычэнне', 35 | sepia: 'Сепія', 36 | 37 | scale: 'Маштаб', 38 | rotation: 'Паварот', 39 | turdsize: 'Паменшыць смецце', 40 | alphamax: 'Кутні парог', 41 | minPathSegments: 'Мінімальная даўжыня шляху', 42 | strokeWidth: 'Таўшчыня абводкі', 43 | turnpolicy: 'Правілы павароту', 44 | opticurve: 'Аптымізаваць крывыя', 45 | opttolerance: 'Узровень аптымізацыі', 46 | showAdvancedControls: 'Дадатковыя налады', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'крокаў', 51 | pixels: 'пікселяў', 52 | segments: 'сегментаў', 53 | 54 | reset: 'Скінуць', 55 | resetAll: 'Скінуць усё', 56 | 57 | dropFileHere: 'Кіньце файл сюды', 58 | openImage: 'Адкрыць карцінку', 59 | saveSVG: 'Захаваць SVG', 60 | pasteImage: 'Уставіць карцінку', 61 | copySVG: 'Скапіяваць SVG', 62 | install: 'Усталяваць', 63 | 64 | posterizeInputImage: 'Пастэрызаваць ўваходную карцінку', 65 | colorSVG: 'Каляровы SVG', 66 | monochromeSVG: 'Манахромны SVG', 67 | 68 | colorChannels: 'Каляровыя каналы', 69 | imageSizeAndRotation: 'Ўваходныя памеры і паварот', 70 | imagePreprocessing: 'Уваходная апрацоўка', 71 | svgOptions: 'Налады SVG', 72 | 73 | considerDPR: 'Ўлічваць шчыльнасць пікселяў', 74 | 75 | tweak: 'Падкруціць', 76 | closeOptions: 'Закрыць', 77 | 78 | optimizingSVG: 'Аптымізую SVG', 79 | copiedSVG: 'Скапіяваны SVG', 80 | savedSVG: 'Захаваны SVG', 81 | 82 | readyToWorkOffline: 'Гатова для працы афлайн.', 83 | svgSize: 'Памер SVG', 84 | zoom: 'Маштаб', 85 | 86 | license: 'Ліцэнзія', 87 | about: 'Аб праекце', 88 | 89 | ...languages, 90 | }; 91 | 92 | // ignore unused exports default 93 | export default translations; 94 | -------------------------------------------------------------------------------- /src/i18n/ca-ES.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Vermell', 24 | green: 'Verd', 25 | blue: 'Blau', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Brillantor', 29 | contrast: 'Contrast', 30 | grayscale: 'Escala de gris', 31 | 'hue-rotate': 'Gir de to', 32 | invert: 'Invertir', 33 | opacity: 'Opacitat', 34 | saturate: 'Saturació', 35 | sepia: 'Sépia', 36 | 37 | scale: 'Escala', 38 | rotation: 'Rotació', 39 | turdsize: 'Suprimir taques', 40 | alphamax: 'Llindar de la cantonada', 41 | minPathSegments: 'Mín. segments de camí', 42 | strokeWidth: 'Amplada de línia', 43 | turnpolicy: 'Política de gir', 44 | opticurve: 'Optimitzar corbes', 45 | opttolerance: "Tolerància d'optimització", 46 | showAdvancedControls: 'Mostrar opcions avançades', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Passos', 51 | pixels: 'Píxels', 52 | segments: 'Segments', 53 | 54 | reset: 'Restablir', 55 | resetAll: 'Restablir tot', 56 | 57 | dropFileHere: 'Arrossega un fitxer aquí', 58 | openImage: 'Obrir imatge', 59 | saveSVG: 'Guardar SVG', 60 | pasteImage: 'Enganxar imatge', 61 | copySVG: 'Copiar SVG', 62 | shareSVG: 'Compartir SVG', 63 | install: 'Instal·lar', 64 | 65 | posterizeInputImage: "Posteritzar imatge d'entrada", 66 | colorSVG: 'SVG de colors', 67 | monochromeSVG: 'SVG monocromàtic', 68 | 69 | colorChannels: 'Canals de color', 70 | imageSizeAndRotation: 'Mida i rotació de la imatge', 71 | imagePreprocessing: 'Preprocessament de la imatge', 72 | svgOptions: 'Opcions SVG', 73 | 74 | considerDPR: 'Usar proporció de píxels del dispositiu', 75 | 76 | tweak: 'Ajustar', 77 | closeOptions: 'Tancar', 78 | 79 | optimizingSVG: 'Optimitzant SVG', 80 | copiedSVG: 'SVG copiat', 81 | savedSVG: 'SVG guardat', 82 | 83 | readyToWorkOffline: 'Preparat per treballar fora de línia.', 84 | svgSize: 'Mida SVG', 85 | zoom: 'Zoom', 86 | 87 | license: 'Llicència', 88 | about: 'Sobre', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/da-DK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rød', 24 | green: 'Grøn', 25 | blue: 'Blå', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Lysstyrke', 29 | contrast: 'Kontrast', 30 | grayscale: 'Gråtoner', 31 | 'hue-rotate': 'Nuancerotation', 32 | invert: 'Invertering', 33 | opacity: 'Gennemsigtighed', 34 | saturate: 'Mætning', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Skalering', 38 | rotation: 'Rotation', 39 | turdsize: 'Undertryk pletter', 40 | alphamax: 'Hjørnetærskel', 41 | minPathSegments: 'Min. stilængde', 42 | strokeWidth: 'Stregbredde', 43 | turnpolicy: 'Svingstrategi', 44 | opticurve: 'Optimer kurver', 45 | opttolerance: 'Optimeringstolerance', 46 | showAdvancedControls: 'Vis ekspertindstillinger', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'trin', 51 | pixels: 'pixel', 52 | segments: 'segmenter', 53 | 54 | reset: 'Nulstil', 55 | resetAll: 'Nulstil alt', 56 | 57 | dropFileHere: 'Drop fil her', 58 | openImage: 'Åbn billede', 59 | saveSVG: 'Gem SVG', 60 | pasteImage: 'Indsæt billede', 61 | copySVG: 'Kopiér SVG', 62 | shareSVG: 'Del SVG', 63 | install: 'Installér', 64 | 65 | posterizeInputImage: 'Posterisér inputbillede', 66 | colorSVG: 'Farve-SVG', 67 | monochromeSVG: 'Monokrom-SVG', 68 | 69 | colorChannels: 'Farvekanaler', 70 | imageSizeAndRotation: 'Inputstørrelse og rotation', 71 | imagePreprocessing: 'Inputforbehandling', 72 | svgOptions: 'SVG-indstillinger', 73 | 74 | considerDPR: 'Betragt Device-Pixel Ratio', 75 | 76 | tweak: 'Justér', 77 | closeOptions: 'Luk', 78 | 79 | optimizingSVG: 'Optimerer SVG', 80 | copiedSVG: 'Kopierede SVG', 81 | savedSVG: 'Gemte SVG', 82 | 83 | readyToWorkOffline: 'Parat til offline-brug.', 84 | svgSize: 'SVG-størrelse', 85 | zoom: 'Zoom', 86 | 87 | license: 'Licens', 88 | about: 'Om', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/de-DE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rot', 24 | green: 'Grün', 25 | blue: 'Blau', 26 | alpha: 'Alpha', 27 | 28 | brightness: 'Helligkeit', 29 | contrast: 'Kontrast', 30 | grayscale: 'Graustufen', 31 | 'hue-rotate': 'Farbtonrotation', 32 | invert: 'Invertieren', 33 | opacity: 'Transparenz', 34 | saturate: 'Sättigung', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Skalierung', 38 | rotation: 'Rotation', 39 | turdsize: 'Flecken unterdrücken', 40 | alphamax: 'Eckenschwellwert', 41 | minPathSegments: 'Min. Pfadlänge', 42 | strokeWidth: 'Strichbreite', 43 | turnpolicy: 'Wendestrategie', 44 | opticurve: 'Kurven optimieren', 45 | opttolerance: 'Optimierungstoleranz', 46 | showAdvancedControls: 'Expertenoptionen anzeigen', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Schritte', 51 | pixels: 'Pixel', 52 | segments: 'Segmente', 53 | 54 | reset: 'Zurücksetzen', 55 | resetAll: 'Alles zurücksetzen', 56 | 57 | dropFileHere: 'Datei hier ablegen', 58 | openImage: 'Bild öffnen', 59 | saveSVG: 'SVG speichern', 60 | pasteImage: 'Bild einfügen', 61 | copySVG: 'SVG kopieren', 62 | shareSVG: 'SVG teilen', 63 | install: 'Installieren', 64 | 65 | posterizeInputImage: 'Eingabebild posterisieren', 66 | colorSVG: 'Farbiges SVG', 67 | monochromeSVG: 'Monochromes SVG', 68 | 69 | colorChannels: 'Farbkanäle', 70 | imageSizeAndRotation: 'Bildgröße und -rotation', 71 | imagePreprocessing: 'Bildvorverarbeitung', 72 | svgOptions: 'SVG-Optionen', 73 | 74 | considerDPR: 'Pixelverhältnis des Geräts beachten', 75 | 76 | tweak: 'Anpassen', 77 | closeOptions: 'Schließen', 78 | 79 | optimizingSVG: 'Optimiere SVG', 80 | copiedSVG: 'SVG kopiert', 81 | savedSVG: 'SVG gespeichert', 82 | 83 | readyToWorkOffline: 'Bereit für Offline-Nutzung.', 84 | svgSize: 'SVG-Größe', 85 | zoom: 'Zoom', 86 | 87 | license: 'Lizenz', 88 | about: 'Über', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/el-GR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Κόκκινο', 24 | green: 'Πράσινο', 25 | blue: 'Μπλε', 26 | alpha: 'Άλφα', 27 | 28 | brightness: 'Φωτεινότητα', 29 | contrast: 'Αντίθεση', 30 | grayscale: 'Κλίμακα Γκρι', 31 | 'hue-rotate': 'Περιστροφή Απόχρωσης', 32 | invert: 'Αντιστροφή', 33 | opacity: 'Αδιαφάνεια', 34 | saturate: 'Κορεσμός', 35 | sepia: 'Σέπια', 36 | 37 | scale: 'Κλίμακα', 38 | rotation: 'Περιστροφή', 39 | turdsize: 'Καταστολή Κηλίδων', 40 | alphamax: 'Κατώφλι Γωνίας', 41 | minPathSegments: 'Ελάχ. Μήκος διαδρομής', 42 | strokeWidth: 'Πλάτος Διαδρομής', 43 | turnpolicy: 'Πολιτική Περιστροφής', 44 | opticurve: 'Βελτιστοποίηση Καμπυλών', 45 | opttolerance: 'Ανοχή Βελτιστοποίησης', 46 | showAdvancedControls: 'Εμφάνιση Ειδικών Επιλογών', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Βήματα', 51 | pixels: 'Εικονοστοιχεία', 52 | segments: 'Τμήματα', 53 | 54 | reset: 'Επαναφορά', 55 | resetAll: 'Επαναφορά Όλων', 56 | 57 | dropFileHere: 'Αποθέστε το αρχείο εδώ', 58 | openImage: 'Άνοιγμα Εικόνας', 59 | saveSVG: 'Αποθήκευση SVG', 60 | pasteImage: 'Επικόλληση Εικόνας', 61 | copySVG: 'Αντιγραφή SVG', 62 | shareSVG: 'Διαμοιρασμός SVG', 63 | install: 'Εγκατάσταση', 64 | 65 | posterizeInputImage: 'Posterize Εικόνα Εισόδου', 66 | colorSVG: 'Έγχρωμο SVG', 67 | monochromeSVG: 'Μονόχρωμο SVG', 68 | 69 | colorChannels: 'Κανάλια Χρώματος', 70 | imageSizeAndRotation: 'Μέγεθος Εισόδου Και Περιστροφή', 71 | imagePreprocessing: 'Προεπεξεργασία Εισόδου', 72 | svgOptions: 'Επιλογές SVG', 73 | 74 | considerDPR: 'Λάβετε υπόψη την αναλογία pixel της συσκευής', 75 | 76 | tweak: 'Προσαρμογή', 77 | closeOptions: 'Κλείσιμο', 78 | 79 | optimizingSVG: 'Βελτιστοποίηση SVG', 80 | copiedSVG: 'SVG Αντιγράφηκε', 81 | savedSVG: 'SVG Αποθηκεύτηκε', 82 | 83 | readyToWorkOffline: 'Έτοιμο για εργασία χωρίς σύνδεση.', 84 | svgSize: 'Μέγεθος SVG', 85 | zoom: 'Μεγέθυνση', 86 | 87 | license: 'Αδεια', 88 | about: 'Σχετικά με', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/en-GB.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Red', 24 | green: 'Green', 25 | blue: 'Blue', 26 | alpha: 'Alpha', 27 | 28 | brightness: 'Brightness', 29 | contrast: 'Contrast', 30 | grayscale: 'Grayscale', 31 | 'hue-rotate': 'Hue Rotate', 32 | invert: 'Invert', 33 | opacity: 'Opacity', 34 | saturate: 'Saturate', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Scale', 38 | rotation: 'Rotation', 39 | turdsize: 'Suppress Speckles', 40 | alphamax: 'Corner Threshold', 41 | minPathSegments: 'Min. Path Length', 42 | strokeWidth: 'Stroke Width', 43 | turnpolicy: 'Turn Policy', 44 | opticurve: 'Optimise Curves', 45 | opttolerance: 'Optimisation Tolerance', 46 | showAdvancedControls: 'Show Expert Options', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Steps', 51 | pixels: 'Pixels', 52 | segments: 'Segments', 53 | 54 | reset: 'Reset', 55 | resetAll: 'Reset All', 56 | 57 | dropFileHere: 'Drop File Here', 58 | openImage: 'Open Image', 59 | saveSVG: 'Save SVG', 60 | pasteImage: 'Paste Image', 61 | copySVG: 'Copy SVG', 62 | shareSVG: 'Share SVG', 63 | install: 'Install', 64 | 65 | posterizeInputImage: 'Posterise Input Image', 66 | colorSVG: 'Colour SVG', 67 | monochromeSVG: 'Monochrome SVG', 68 | 69 | colorChannels: 'Colour Channels', 70 | imageSizeAndRotation: 'Input Size and Rotation', 71 | imagePreprocessing: 'Input Preprocessing', 72 | svgOptions: 'SVG Options', 73 | 74 | considerDPR: 'Consider Device Pixel Ratio', 75 | 76 | tweak: 'Tweak', 77 | closeOptions: 'Close', 78 | 79 | optimizingSVG: 'Optimising SVG', 80 | copiedSVG: 'Copied SVG', 81 | savedSVG: 'Saved SVG', 82 | 83 | readyToWorkOffline: 'Ready to Work Offline.', 84 | svgSize: 'SVG Size', 85 | zoom: 'Zoom', 86 | 87 | license: 'License', 88 | about: 'About', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/en-US.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Red', 24 | green: 'Green', 25 | blue: 'Blue', 26 | alpha: 'Alpha', 27 | 28 | brightness: 'Brightness', 29 | contrast: 'Contrast', 30 | grayscale: 'Grayscale', 31 | 'hue-rotate': 'Hue Rotate', 32 | invert: 'Invert', 33 | opacity: 'Opacity', 34 | saturate: 'Saturate', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Scale', 38 | rotation: 'Rotation', 39 | turdsize: 'Suppress Speckles', 40 | alphamax: 'Corner Threshold', 41 | minPathSegments: 'Min. Path Length', 42 | strokeWidth: 'Stroke Width', 43 | turnpolicy: 'Turn Policy', 44 | opticurve: 'Optimize Curves', 45 | opttolerance: 'Optimization Tolerance', 46 | showAdvancedControls: 'Show Expert Options', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Steps', 51 | pixels: 'Pixels', 52 | segments: 'Segments', 53 | 54 | reset: 'Reset', 55 | resetAll: 'Reset All', 56 | 57 | dropFileHere: 'Drop File Here', 58 | openImage: 'Open Image', 59 | saveSVG: 'Save SVG', 60 | pasteImage: 'Paste Image', 61 | copySVG: 'Copy SVG', 62 | shareSVG: 'Share SVG', 63 | install: 'Install', 64 | 65 | posterizeInputImage: 'Posterize Input Image', 66 | colorSVG: 'Color SVG', 67 | monochromeSVG: 'Monochrome SVG', 68 | 69 | colorChannels: 'Color Channels', 70 | imageSizeAndRotation: 'Input Size and Rotation', 71 | imagePreprocessing: 'Input Preprocessing', 72 | svgOptions: 'SVG Options', 73 | 74 | considerDPR: 'Consider Device Pixel Ratio', 75 | 76 | tweak: 'Tweak', 77 | closeOptions: 'Close', 78 | 79 | optimizingSVG: 'Optimizing SVG', 80 | copiedSVG: 'Copied SVG', 81 | savedSVG: 'Saved SVG', 82 | 83 | readyToWorkOffline: 'Ready to Work Offline.', 84 | svgSize: 'SVG Size', 85 | zoom: 'Zoom', 86 | 87 | license: 'License', 88 | about: 'About', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/es-ES.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rojo', 24 | green: 'Verde', 25 | blue: 'Azul', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Brillo', 29 | contrast: 'Contraste', 30 | grayscale: 'Escala de gris', 31 | 'hue-rotate': 'Rotación de tono', 32 | invert: 'Invertir', 33 | opacity: 'Opacidad', 34 | saturate: 'Saturación', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Escala', 38 | rotation: 'Rotación', 39 | turdsize: 'Suprimir manchas', 40 | alphamax: 'Umbral de la esquina', 41 | minPathSegments: 'Mín. segmentos de camino', 42 | strokeWidth: 'Ancho de línea', 43 | turnpolicy: 'Política de giro', 44 | opticurve: 'Optimizar curvas', 45 | opttolerance: 'Tolerancia de optimización', 46 | showAdvancedControls: 'Mostrar opciones avanzadas', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Pasos', 51 | pixels: 'Píxeles', 52 | segments: 'Segmentos', 53 | 54 | reset: 'Restablecer', 55 | resetAll: 'Restablecer todo', 56 | 57 | dropFileHere: 'Arrastra un archivo aquí', 58 | openImage: 'Abrir imagen', 59 | saveSVG: 'Guardar SVG', 60 | pasteImage: 'Pegar imagen', 61 | copySVG: 'Copiar SVG', 62 | shareSVG: 'Compartir SVG', 63 | install: 'Instalar', 64 | 65 | posterizeInputImage: 'Posterizar imagen de entrada', 66 | colorSVG: 'SVG de colores', 67 | monochromeSVG: 'SVG monocromático', 68 | 69 | colorChannels: 'Canales de color', 70 | imageSizeAndRotation: 'Tamaño y rotación de la imagen', 71 | imagePreprocessing: 'Preprocesamiento de la imagen', 72 | svgOptions: 'Opciones SVG', 73 | 74 | considerDPR: 'Usar proporción de píxeles del dispositivo', 75 | 76 | tweak: 'Ajustar', 77 | closeOptions: 'Cerrar', 78 | 79 | optimizingSVG: 'Optimizando SVG', 80 | copiedSVG: 'SVG copiado', 81 | savedSVG: 'SVG guardado', 82 | 83 | readyToWorkOffline: 'Listo para trabajar sin conexión', 84 | svgSize: 'Tamaño SVG', 85 | zoom: 'Zoom', 86 | 87 | license: 'Licencia', 88 | about: 'Acerca de', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/fr-FR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rouge', 24 | green: 'Vert', 25 | blue: 'Bleu', 26 | alpha: 'Alpha', 27 | 28 | brightness: 'Luminosité', 29 | contrast: 'Contraste', 30 | grayscale: 'Niveaux de gris', 31 | 'hue-rotate': 'Rotation de teinte', 32 | invert: 'Inversion', 33 | opacity: 'Opacité', 34 | saturate: 'Saturation', 35 | sepia: 'Sépia', 36 | 37 | scale: 'Échelle', 38 | rotation: 'Rotation', 39 | turdsize: 'Supprimer les tâches', 40 | alphamax: 'Seuil d’angle', 41 | minPathSegments: 'Longueur de chemin min.', 42 | strokeWidth: 'Épaisseur de trait', 43 | turnpolicy: 'Stratégie de changement de direction', 44 | opticurve: 'Optimiser les courbes', 45 | opttolerance: 'Tolérance d’optimisation', 46 | showAdvancedControls: 'Options avancées', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Étapes', 51 | pixels: 'Pixels', 52 | segments: 'Segments', 53 | 54 | reset: 'Réinitialiser', 55 | resetAll: 'Tout réinitialiser', 56 | 57 | dropFileHere: 'Déposez le fichier ici', 58 | openImage: 'Ouvrir une image', 59 | saveSVG: 'Enregistrer le SVG', 60 | pasteImage: 'Coller une image', 61 | copySVG: 'Copier le SVG', 62 | shareSVG: 'Partager le SVG', 63 | install: 'Installer', 64 | 65 | posterizeInputImage: 'Postériser l’image source', 66 | colorSVG: 'SVG en couleurs', 67 | monochromeSVG: 'SVG monochrome', 68 | 69 | colorChannels: 'Canaux de couleurs', 70 | imageSizeAndRotation: 'Dimensions et rotation de la source', 71 | imagePreprocessing: 'Précalcul de la source', 72 | svgOptions: 'Options SVG', 73 | 74 | considerDPR: 'Prendre en compte la densité de pixels de l’appareil', 75 | 76 | tweak: 'Ajuster', 77 | closeOptions: 'Fermer', 78 | 79 | optimizingSVG: 'Optimisation du SVG', 80 | copiedSVG: 'SVG copié', 81 | savedSVG: 'SVG enregistré', 82 | 83 | readyToWorkOffline: 'Prêt à fonctionner hors connexion.', 84 | svgSize: 'Poids du SVG', 85 | zoom: 'Zoom', 86 | 87 | license: 'Licence', 88 | about: 'À propos', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/he-IL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'אדום', 24 | green: 'ירוק', 25 | blue: 'כחול', 26 | alpha: 'אלפא', 27 | 28 | brightness: 'בהירות', 29 | contrast: 'ניגודיות', 30 | grayscale: 'גווני אפור', 31 | 'hue-rotate': 'רוטציית גוון', 32 | invert: 'היפוך', 33 | opacity: 'אטימות', 34 | saturate: 'רוויה', 35 | sepia: 'ספיה', 36 | 37 | scale: 'קנה מידה', 38 | rotation: 'סיבוב', 39 | turdsize: 'דיכוי כתמים', 40 | alphamax: 'סף פינתי', 41 | minPathSegments: 'אורך מסלול מינימלי', 42 | strokeWidth: 'עובי קו', 43 | turnpolicy: 'אסטרטגיית שינוי כיוון', 44 | opticurve: 'אופטימיזציית עקומות', 45 | opttolerance: 'רגישות אופטימיזצייה', 46 | showAdvancedControls: 'הצג אפשרויות מתקדמות', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'שלבים', 51 | pixels: 'פיקסלים', 52 | segments: 'מקטעים', 53 | 54 | reset: 'איתחול', 55 | resetAll: 'אתחל הכל', 56 | 57 | dropFileHere: 'שחרר קובץ כאן', 58 | openImage: 'פתח תמונה', 59 | saveSVG: 'SVG שמור', 60 | pasteImage: 'הדבק תמונה', 61 | copySVG: 'SVG העתק', 62 | shareSVG: 'SVG שתפורסם', 63 | install: 'התקן', 64 | 65 | posterizeInputImage: 'פוסטריזציה של תמונה', 66 | colorSVG: 'צבעוני SVG', 67 | monochromeSVG: 'שחור לבן SVG', 68 | 69 | colorChannels: 'ערוצי צבע', 70 | imageSizeAndRotation: 'מידות וסיבוב', 71 | imagePreprocessing: 'עיבוד מקדים', 72 | svgOptions: 'SVG אפשרויות', 73 | 74 | considerDPR: 'התחשב ביחס הפיקסלים של ההתקן', 75 | 76 | tweak: 'כיוונון', 77 | closeOptions: 'סגור', 78 | 79 | optimizingSVG: 'בתהליך אופטימיזציה SVG', 80 | copiedSVG: 'העותק SVG', 81 | savedSVG: 'נשמר SVG', 82 | 83 | readyToWorkOffline: '.מוכן לעבוד במצב לא מקוון', 84 | svgSize: 'SVG גודל', 85 | zoom: 'זום', 86 | 87 | license: 'רישיון', 88 | about: 'אודות', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/id-ID.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Merah', 24 | green: 'Hijau', 25 | blue: 'Biru', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Cahaya', 29 | contrast: 'Kontras', 30 | grayscale: 'Monokromatik', 31 | 'hue-rotate': 'Perputaran Corak', 32 | invert: 'Inversi', 33 | opacity: 'Transparansi', 34 | saturate: 'Saturasi', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Skala', 38 | rotation: 'Rotasi', 39 | turdsize: 'Hapus Bintik', 40 | alphamax: 'Batas Pojok', 41 | minPathSegments: 'Panjang Minimal Garis', 42 | strokeWidth: 'Lebar Goresan', 43 | turnpolicy: 'Balik Haluan', 44 | opticurve: 'Optimasi Lengkungan', 45 | opttolerance: 'Optimasi Toleransi', 46 | showAdvancedControls: 'Munculkan Opsi Tambahan', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Langkah', 51 | pixels: 'Piksel', 52 | segments: 'Segmen', 53 | 54 | reset: 'Atur Ulang', 55 | resetAll: 'Atur Ulang Semua', 56 | 57 | dropFileHere: 'Taruh File Di sini', 58 | openImage: 'Buka Gambar', 59 | saveSVG: 'Simpan SVG', 60 | pasteImage: 'Tempel Gambar', 61 | copySVG: 'Salin SVG', 62 | shareSVG: 'Bagikan SVG', 63 | install: 'Pasang', 64 | 65 | posterizeInputImage: 'Posterisasi Gambar', 66 | colorSVG: 'SVG Berwarna', 67 | monochromeSVG: 'SVG Hitam Putih', 68 | 69 | colorChannels: 'Kanal Warna', 70 | imageSizeAndRotation: 'Ukuran dan Rotasi', 71 | imagePreprocessing: 'Pra Pemrosesan', 72 | svgOptions: 'Pengaturan SVG', 73 | 74 | considerDPR: 'Pertimbangkan Proporsi Piksel Perangkat', 75 | 76 | tweak: 'Modifikasi', 77 | closeOptions: 'Tutup', 78 | 79 | optimizingSVG: 'Optimasi SVG', 80 | copiedSVG: 'SVG Tersalin', 81 | savedSVG: 'SVG Tersimpan', 82 | 83 | readyToWorkOffline: 'Siap Bekerja Offline', 84 | svgSize: 'Ukuran SVG', 85 | zoom: 'Perbesar', 86 | 87 | license: 'Lisensi', 88 | about: 'Tentang', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/it-IT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rosso', 24 | green: 'Verde', 25 | blue: 'Blu', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Luminosità', 29 | contrast: 'Contrasto', 30 | grayscale: 'Scala di grigi', 31 | 'hue-rotate': 'Variazione di tinta', 32 | invert: 'Inversione colori', 33 | opacity: 'Opacità', 34 | saturate: 'Saturazione', 35 | sepia: 'Effetto seppia', 36 | 37 | scale: 'Scala', 38 | rotation: 'Ruota', 39 | turdsize: 'Elimina difetti', 40 | alphamax: "Soglia d'angolo", 41 | minPathSegments: 'Lunghezza min. tratto', 42 | strokeWidth: 'Larghezza del tratto', 43 | turnpolicy: 'Disambiguazione tratti', 44 | opticurve: 'Ottimizza le curve', 45 | opttolerance: 'Tolleranza ottimizzazione', 46 | showAdvancedControls: 'Mostra opzioni avanzate', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Passi', 51 | pixels: 'Pixel', 52 | segments: 'Segmenti', 53 | 54 | reset: 'Ripristina', 55 | resetAll: 'Ripristina tutto', 56 | 57 | dropFileHere: 'Trascina un file qui', 58 | openImage: 'Apri immagine', 59 | saveSVG: 'Salva SVG', 60 | pasteImage: 'Incolla immagine', 61 | copySVG: 'Copia SVG', 62 | shareSVG: 'Condividi SVG', 63 | install: 'Installa', 64 | 65 | posterizeInputImage: 'Posterizza immagine di input', 66 | colorSVG: 'SVG a colori', 67 | monochromeSVG: 'SVG monocromatico', 68 | 69 | colorChannels: 'Canali di colore', 70 | imageSizeAndRotation: "Dimensioni e rotazione dell'immagine", 71 | imagePreprocessing: 'Preelaborazione immagine', 72 | svgOptions: 'Opzioni SVG', 73 | 74 | considerDPR: 'Considera il rapporto pixel del dispositivo', 75 | 76 | tweak: 'Modifica', 77 | closeOptions: 'Chiudi', 78 | 79 | optimizingSVG: 'Ottimizzazione SVG', 80 | copiedSVG: 'SVG copiato', 81 | savedSVG: 'SVG salvato', 82 | 83 | readyToWorkOffline: 'Pronto per lavorare offline.', 84 | svgSize: 'Dimensioni SVG', 85 | zoom: 'Zoom', 86 | 87 | license: 'Licenza', 88 | about: 'Informazioni', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/ja-JP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: '赤', 24 | green: '緑', 25 | blue: '青', 26 | alpha: 'アルファ', 27 | 28 | brightness: '明度', 29 | contrast: 'コントラスト', 30 | grayscale: 'グレースケール', 31 | 'hue-rotate': '色相', 32 | invert: '階調の反転', 33 | opacity: '透明度', 34 | saturate: '彩度', 35 | sepia: 'セピア', 36 | 37 | scale: '拡大/縮小', 38 | rotation: '回転', 39 | turdsize: 'ノイズ除去', 40 | alphamax: 'コーナーしきい値', 41 | minPathSegments: 'パスの最小の長さ', 42 | strokeWidth: 'ストローク幅', 43 | turnpolicy: 'ターンポリシー', 44 | opticurve: '曲線を最適化', 45 | opttolerance: '許容差を最適化', 46 | showAdvancedControls: '上級者向け機能を表示する', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'ステップ', 51 | pixels: 'ピクセル', 52 | segments: 'セグメント', 53 | 54 | reset: 'リセット', 55 | resetAll: 'すべてリセット', 56 | 57 | dropFileHere: 'ここにファイルをドロップ', 58 | openImage: '画像を開く', 59 | saveSVG: 'SVG として保存', 60 | pasteImage: '画像を貼り付ける', 61 | copySVG: 'SVG をコピーする', 62 | shareSVG: 'SVG を共有する', 63 | install: 'インストール', 64 | 65 | posterizeInputImage: 'ポスタライズする', 66 | colorSVG: 'カラー SVG', 67 | monochromeSVG: 'モノクロ SVG', 68 | 69 | colorChannels: 'カラーチャンネル', 70 | imageSizeAndRotation: '大きさと回転', 71 | imagePreprocessing: '前処理', 72 | svgOptions: 'SVG 設定', 73 | 74 | considerDPR: 'デバイスのピクセル比を考慮する', 75 | 76 | tweak: '微調整', 77 | closeOptions: '閉じる', 78 | 79 | optimizingSVG: 'SVG を最適化する', 80 | copiedSVG: 'コピーした SVG', 81 | savedSVG: '保存した SVG', 82 | 83 | readyToWorkOffline: 'オフライン作業可能', 84 | svgSize: 'SVG のサイズ', 85 | zoom: 'ズーム', 86 | 87 | license: 'ライセンス', 88 | about: 'について', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/ko-KR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: '빨강', 24 | green: '초록', 25 | blue: '파랑', 26 | alpha: '알파(투명도)', 27 | 28 | brightness: '밝기', 29 | contrast: '대비', 30 | grayscale: '그레이 스케일', 31 | 'hue-rotate': '색조 회전', 32 | invert: '반전', 33 | opacity: '투명도', 34 | saturate: '채도', 35 | sepia: '세피아', 36 | 37 | scale: '확대/축소', 38 | rotation: '회전', 39 | turdsize: '얼룩 줄이기', 40 | alphamax: '알파 맥스', 41 | minPathSegments: '최소 패스 구간수', 42 | strokeWidth: '선 두께', 43 | turnpolicy: 'Turn Policy', 44 | opticurve: '곡선 최적화하기', 45 | opttolerance: '최적화 허용치', 46 | showAdvancedControls: '고급 설정 보기', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: '단계', 51 | pixels: '픽셀', 52 | segments: '구간', 53 | 54 | reset: '초기화', 55 | resetAll: '모두 초기화', 56 | 57 | dropFileHere: '파일을 여기 놓아주세요', 58 | openImage: '이미지 열기', 59 | saveSVG: 'SVG 저장하기', 60 | pasteImage: '이미지 붙여넣기', 61 | copySVG: 'SVG 복사하기', 62 | shareSVG: 'SVG 공유하기', 63 | install: '설치하기', 64 | 65 | posterizeInputImage: '입력한 이미지 포스터효과', 66 | colorSVG: 'SVG 색상 주기', 67 | monochromeSVG: 'SVG 단색 만들기', 68 | 69 | colorChannels: '색상 채널', 70 | imageSizeAndRotation: '크기 입력/회전', 71 | imagePreprocessing: '사전 처리 입력', 72 | svgOptions: 'SVG 설정', 73 | 74 | considerDPR: '기기 픽셀 비율 고려', 75 | 76 | tweak: '조정', 77 | closeOptions: '닫기', 78 | 79 | optimizingSVG: 'SVG 최적화중', 80 | copiedSVG: 'SVG 복사완료', 81 | savedSVG: 'SVG 저장완료', 82 | 83 | readyToWorkOffline: '오프라인 작업 준비됨.', 84 | svgSize: 'SVG 크기', 85 | zoom: '확대', 86 | 87 | license: '사용권(라이센스)', 88 | about: 'About', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/languages.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const languages = { 21 | arTN: 'عربى', 22 | beBY: 'Беларуская', 23 | caES: 'Català', 24 | daDK: 'Dansk', 25 | deDE: 'Deutsch', 26 | elGR: 'Ελληνικά', 27 | enGB: 'English (United Kingdom)', 28 | enUS: 'English (United States)', 29 | esES: 'Español', 30 | frFR: 'Français', 31 | heIL: 'עברית', 32 | idID: 'Bahasa Indonesia', 33 | itIT: 'Italiano', 34 | jaJP: '日本語', 35 | koKR: '한국어', 36 | nlNL: 'Nederlands', 37 | noNO: 'Norsk', 38 | plPL: 'Polski', 39 | ptBR: 'Português', 40 | ruRU: 'Русский', 41 | ukUA: 'Українська', 42 | zhCN: '中文', 43 | }; 44 | 45 | // ignore unused exports default 46 | export default languages; 47 | -------------------------------------------------------------------------------- /src/i18n/nl-NL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rood', 24 | green: 'Groen', 25 | blue: 'Blauw', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Helderheid', 29 | contrast: 'Contrast', 30 | grayscale: 'Grijswaarden', 31 | 'hue-rotate': 'Hue Rotate', 32 | invert: 'Omdraaien', 33 | opacity: 'Transparantie', 34 | saturate: 'Verzadiging', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Schaal', 38 | rotation: 'Rotatie', 39 | turdsize: 'Onderdruk spikkels', 40 | alphamax: 'Corner Threshold', 41 | minPathSegments: 'Min. Padlengte', 42 | strokeWidth: 'Lijndikte', 43 | turnpolicy: 'Turn Policy', 44 | opticurve: 'Optimaliseer Curves', 45 | opttolerance: 'Optimalisatie Tolerantie', 46 | showAdvancedControls: 'Toon Expert Opties', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Stappen', 51 | pixels: 'Pixels', 52 | segments: 'Segmenten', 53 | 54 | reset: 'Reset', 55 | resetAll: 'Reset Alles', 56 | 57 | dropFileHere: 'Drop bestand hier', 58 | openImage: 'Open beeldbestand', 59 | saveSVG: 'SVG opslaan', 60 | pasteImage: 'Beeldbestand plakken', 61 | copySVG: 'SVG kopiëren', 62 | shareSVG: 'SVG delen', 63 | install: 'Installeren', 64 | 65 | posterizeInputImage: 'Invoerbeeld Posteriseren', 66 | colorSVG: 'Kleuren SVG', 67 | monochromeSVG: 'Monochrome SVG', 68 | 69 | colorChannels: 'Kleurkanalen', 70 | imageSizeAndRotation: 'Invoergrootte en Rotatie', 71 | imagePreprocessing: 'Invoer Voorbewerking', 72 | svgOptions: 'SVG Opties', 73 | 74 | considerDPR: 'Consider Device Pixel Ratio', 75 | 76 | tweak: 'Tweak', 77 | closeOptions: 'Sluiten', 78 | 79 | optimizingSVG: 'SVG aan het optimaliseren', 80 | copiedSVG: 'SVG gekopiëerd', 81 | savedSVG: 'SVG opgeslagen', 82 | 83 | readyToWorkOffline: 'Klaar om offline te werken.', 84 | svgSize: 'SVG grootte', 85 | zoom: 'Inzoomen', 86 | 87 | license: 'Licentie', 88 | about: 'Over', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/no-NO.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Rød', 24 | green: 'Grønn', 25 | blue: 'Blå', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Lysstyrke', 29 | contrast: 'Kontrast', 30 | grayscale: 'Gråtoner', 31 | 'hue-rotate': 'Nyanserotasjon', 32 | invert: 'Invertering', 33 | opacity: 'Gjennomsiktighet', 34 | saturate: 'Metning', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Skalering', 38 | rotation: 'Rotasjon', 39 | turdsize: 'Undertrykk flekker', 40 | alphamax: 'Hjørneterskel', 41 | minPathSegments: 'Min. stilengde', 42 | strokeWidth: 'Strøkbredde', 43 | turnpolicy: 'Svingstrategi', 44 | opticurve: 'Optimaliser kurver', 45 | opttolerance: 'Optimaliseringstoleranse', 46 | showAdvancedControls: 'Vis avanserte alternativer', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'trinn', 51 | pixels: 'piksler', 52 | segments: 'segmenter', 53 | 54 | reset: 'Nullstill', 55 | resetAll: 'Nullstill alt', 56 | 57 | dropFileHere: 'Slipp fil her', 58 | openImage: 'Åpne bilde', 59 | saveSVG: 'Lagre SVG', 60 | pasteImage: 'Lim inn bilde', 61 | copySVG: 'Kopier SVG', 62 | shareSVG: 'Del SVG', 63 | install: 'Installer', 64 | 65 | posterizeInputImage: 'Posteriser inndatabilde', 66 | colorSVG: 'Farget SVG', 67 | monochromeSVG: 'Monokrom SVG', 68 | 69 | colorChannels: 'Fargekanaler', 70 | imageSizeAndRotation: 'Inndata størrelse og rotasjon', 71 | imagePreprocessing: 'Inndataforbehandling', 72 | svgOptions: 'SVG-alternativer', 73 | 74 | considerDPR: 'Ta hensyn til enhetens pikselforhold', 75 | 76 | tweak: 'Justér', 77 | closeOptions: 'Lukk', 78 | 79 | optimizingSVG: 'Optimaliserer SVG', 80 | copiedSVG: 'Kopierte SVG', 81 | savedSVG: 'Lagret SVG', 82 | 83 | readyToWorkOffline: 'Klar for offline-bruk.', 84 | svgSize: 'SVG-størrelse', 85 | zoom: 'Zoom', 86 | 87 | license: 'Lisens', 88 | about: 'Om', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/pl-PL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Czerwony', 24 | green: 'Zielony', 25 | blue: 'Niebieski', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Jasność', 29 | contrast: 'Kontrast', 30 | grayscale: 'Odcień szarości', 31 | 'hue-rotate': 'Zmiana odcienia', 32 | invert: 'Odwrócenie', 33 | opacity: 'Przejrzystość', 34 | saturate: 'Nasycenie', 35 | sepia: 'Sepia', 36 | 37 | scale: 'Skala', 38 | rotation: 'Obrót', 39 | turdsize: 'Tłumienie plamek', 40 | alphamax: 'Próg narożnika', 41 | minPathSegments: 'Min. długość ścieżki', 42 | strokeWidth: 'Szerokość przeciągnięcia', 43 | turnpolicy: 'Strategia przekształcenia', 44 | opticurve: 'Optymalizacja krzywych', 45 | opttolerance: 'Tolerancja optymalizacji', 46 | showAdvancedControls: 'Zaawansowane opcje', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Kroki', 51 | pixels: 'Piksele', 52 | segments: 'Segmenty', 53 | 54 | reset: 'Resetuj', 55 | resetAll: 'Zresetuj wszystko', 56 | 57 | dropFileHere: 'Dodaj plik', 58 | openImage: 'Otwórz obraz', 59 | saveSVG: 'Zapisz SVG', 60 | pasteImage: 'Wklej obraz', 61 | copySVG: 'Kopiuj SVG', 62 | shareSVG: 'Udostępnij SVG', 63 | install: 'Zainstaluj', 64 | 65 | posterizeInputImage: 'Posteryzacja obrazu wejściowego', 66 | colorSVG: 'Kolor SVG', 67 | monochromeSVG: 'Monochromatyczny SVG', 68 | 69 | colorChannels: 'Kanały koloru', 70 | imageSizeAndRotation: 'Rozmiar obrazu wejściowego i obrót', 71 | imagePreprocessing: 'Wstępne przetwarzanie obrazu', 72 | svgOptions: 'Opcje SVG', 73 | 74 | considerDPR: 'Uwzględnij stosunek pikseli urządzenia', 75 | 76 | tweak: 'Dostosuj', 77 | closeOptions: 'Zamknij', 78 | 79 | optimizingSVG: 'Optymalizacja SVG', 80 | copiedSVG: 'Skopiowany SVG', 81 | savedSVG: 'Zapisany SVG', 82 | 83 | readyToWorkOffline: 'Gotowy do pracy Offline.', 84 | svgSize: 'Rozmiar SVG', 85 | zoom: 'Powiększenie', 86 | 87 | license: 'Linencja', 88 | about: 'O projekcie', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Vermelho', 24 | green: 'Verde', 25 | blue: 'Azul', 26 | alpha: 'Alfa', 27 | 28 | brightness: 'Brilho', 29 | contrast: 'Contraste', 30 | grayscale: 'Tons de cinza', 31 | 'hue-rotate': 'Rotação de tonalidade', 32 | invert: 'Inverter', 33 | opacity: 'Opacidade', 34 | saturate: 'Saturação', 35 | sepia: 'Sépia', 36 | 37 | scale: 'Escala', 38 | rotation: 'Rotação', 39 | turdsize: 'Suprimir manchas', 40 | alphamax: 'Limiar de canto', 41 | minPathSegments: 'Mín. de segmentos de caminho', 42 | strokeWidth: 'Largura do traço', 43 | turnpolicy: 'Política de turno', 44 | opticurve: 'Otimizar curvas', 45 | opttolerance: 'Tolerância de otimização', 46 | showAdvancedControls: 'Mostrar controles avançados', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'Passos', 51 | pixels: 'Pixels', 52 | segments: 'Segmentos', 53 | 54 | reset: 'Resetar', 55 | resetAll: 'Resetar tudo', 56 | 57 | dropFileHere: 'Arraste um arquivo aqui', 58 | openImage: 'Abrir imagem', 59 | saveSVG: 'Salvar SVG', 60 | pasteImage: 'Colar imagem', 61 | copySVG: 'Copiar SVG', 62 | shareSVG: 'Compartilhar SVG', 63 | install: 'Instalar', 64 | 65 | posterizeInputImage: 'Posterizar imagem de entrada', 66 | colorSVG: 'SVG colorido', 67 | monochromeSVG: 'SVG monocromático', 68 | 69 | colorChannels: 'Canais de cor', 70 | imageSizeAndRotation: 'Tamanho e rotação da imagem', 71 | imagePreprocessing: 'Preprocessamento da imagem', 72 | svgOptions: 'Opções SVG', 73 | 74 | considerDPR: 'Usar a proporção de pixels do dispositivo', 75 | 76 | tweak: 'Ajustar', 77 | closeOptions: 'Fechar', 78 | 79 | optimizingSVG: 'Otimizando SVG', 80 | copiedSVG: 'SVG copiado', 81 | savedSVG: 'SVG salvado', 82 | 83 | readyToWorkOffline: 'Pronto para trabalhar offline', 84 | svgSize: 'Tamanho do SVG', 85 | zoom: 'Zoom', 86 | 87 | license: 'Licença', 88 | about: 'Sobre', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/ru-RU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Красный', 24 | green: 'Зелёный', 25 | blue: 'Синий', 26 | alpha: 'Прозрачность', 27 | 28 | brightness: 'Яркость', 29 | contrast: 'Контраст', 30 | grayscale: 'Монохром', 31 | 'hue-rotate': 'Поворот цвета', 32 | invert: 'Инверсия', 33 | opacity: 'Прозрачность', 34 | saturate: 'Насыщенность', 35 | sepia: 'Сепия', 36 | 37 | scale: 'Масштаб', 38 | rotation: 'Поворот', 39 | turdsize: 'Уменьшить мусор', 40 | alphamax: 'Угловой порог', 41 | minPathSegments: 'Минимальная длина пути', 42 | strokeWidth: 'Толщина обводки', 43 | turnpolicy: 'Правила поворота', 44 | opticurve: 'Оптимизировать кривые', 45 | opttolerance: 'Уровень оптимизации', 46 | showAdvancedControls: 'Дополнительные настройки', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'шагов', 51 | pixels: 'пикселей', 52 | segments: 'сегментов', 53 | 54 | reset: 'Сбросить', 55 | resetAll: 'Сбросить всё', 56 | 57 | dropFileHere: 'Бросьте файл сюда', 58 | openImage: 'Открыть картинку', 59 | saveSVG: 'Сохранить SVG', 60 | pasteImage: 'Вставить картинку', 61 | copySVG: 'Скопировать SVG', 62 | shareSVG: 'Поделиться SVG', 63 | install: 'Установить', 64 | 65 | posterizeInputImage: 'Постеризовать входную картинку', 66 | colorSVG: 'Цветной SVG', 67 | monochromeSVG: 'Монохромный SVG', 68 | 69 | colorChannels: 'Цветовые каналы', 70 | imageSizeAndRotation: 'Входные размеры и поворот', 71 | imagePreprocessing: 'Входная обработка', 72 | svgOptions: 'Настройки SVG', 73 | 74 | considerDPR: 'Учитывать плотность пикселей', 75 | 76 | tweak: 'Подкрутить', 77 | closeOptions: 'Закрыть', 78 | 79 | optimizingSVG: 'Оптимизирую SVG', 80 | copiedSVG: 'Скопированный SVG', 81 | savedSVG: 'Сохранённый SVG', 82 | 83 | readyToWorkOffline: 'Готово для работы офлайн.', 84 | svgSize: 'Размер SVG', 85 | zoom: 'Масштаб', 86 | 87 | license: 'Лицензия', 88 | about: 'О проекте', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/uk-UA.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2022 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: 'Червоний', 24 | green: 'Зелений', 25 | blue: 'Синій', 26 | alpha: 'Прозорість', 27 | 28 | brightness: 'Яскравість', 29 | contrast: 'Контраст', 30 | grayscale: 'Монохром', 31 | 'hue-rotate': 'Тон', 32 | invert: 'Інверсія', 33 | opacity: 'Прозорість', 34 | saturate: 'Насиченість', 35 | sepia: 'Сепія', 36 | 37 | scale: 'Масштаб', 38 | rotation: 'Поворот', 39 | turdsize: 'Придушити плями', 40 | alphamax: 'Згладжування', 41 | minPathSegments: 'Мін. довжина лінії', 42 | strokeWidth: 'Товщина контуру', 43 | turnpolicy: 'Правила повороту', 44 | opticurve: 'Оптимізувати криві', 45 | opttolerance: 'Рівень оптимізації', 46 | showAdvancedControls: 'Додаткові налаштування', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: 'кроків', 51 | pixels: 'пікселів', 52 | segments: 'сегментів', 53 | 54 | reset: 'Скинути', 55 | resetAll: 'Скинути все', 56 | 57 | dropFileHere: 'Киньте файл сюди', 58 | openImage: 'Відкрити зображення', 59 | saveSVG: 'Зберегти SVG', 60 | pasteImage: 'Зберегти зображення', 61 | copySVG: 'Скопіювати SVG', 62 | shareSVG: 'Поділитися SVG', 63 | install: 'Встановити', 64 | 65 | posterizeInputImage: 'Постеризувати вхідне зображення', 66 | colorSVG: 'Кольоровий SVG', 67 | monochromeSVG: 'Монохромний SVG', 68 | 69 | colorChannels: 'Кольорові канали', 70 | imageSizeAndRotation: 'Вхідні розміри і обертання', 71 | imagePreprocessing: 'Вхідна обробка', 72 | svgOptions: 'Налаштування SVG', 73 | 74 | considerDPR: 'Враховувати щільність пікселів', 75 | 76 | tweak: 'Підкрутити', 77 | closeOptions: 'Закрити', 78 | 79 | optimizingSVG: 'Оптимізую SVG', 80 | copiedSVG: 'Скопійований SVG', 81 | savedSVG: 'Збережений SVG', 82 | 83 | readyToWorkOffline: 'Готовий для роботи офлайн.', 84 | svgSize: 'Розмір SVG', 85 | zoom: 'Масштаб', 86 | 87 | license: 'Ліцензія', 88 | about: 'Про проект', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import languages from './languages.js'; 21 | 22 | const translations = { 23 | red: '红', 24 | green: '绿', 25 | blue: '蓝', 26 | alpha: 'Alpha', 27 | 28 | brightness: '亮度', 29 | contrast: '对比度', 30 | grayscale: '灰度', 31 | 'hue-rotate': '色调反转', 32 | invert: '反转', 33 | opacity: '透明度', 34 | saturate: '饱和度', 35 | sepia: '褐度', 36 | 37 | scale: '缩放', 38 | rotation: '旋转', 39 | turdsize: '抑制噪点', 40 | alphamax: '边角阈值', 41 | minPathSegments: '最小路径长度', 42 | strokeWidth: '笔触大小', 43 | turnpolicy: '转化程度', 44 | opticurve: '优化曲线', 45 | opttolerance: '优化容差', 46 | showAdvancedControls: '显示高级设置', 47 | 48 | '%': '%', 49 | deg: '°', 50 | steps: '级', 51 | pixels: '像素', 52 | segments: '段', 53 | 54 | reset: '重置', 55 | resetAll: '重置全部', 56 | 57 | dropFileHere: '拖拽文件到此处', 58 | openImage: '打开图像', 59 | saveSVG: '保存 SVG', 60 | pasteImage: '粘贴图像', 61 | copySVG: '复制 SVG', 62 | shareSVG: '分享 SVG', 63 | install: '安装', 64 | 65 | posterizeInputImage: '对图像进行色彩处理', 66 | colorSVG: '彩色 SVG', 67 | monochromeSVG: '单色 SVG', 68 | 69 | colorChannels: '色彩通道', 70 | imageSizeAndRotation: '图像尺寸及旋转角度', 71 | imagePreprocessing: '图像处理', 72 | svgOptions: 'SVG 选项', 73 | 74 | considerDPR: '考虑设备像素比', 75 | 76 | tweak: '调整', 77 | closeOptions: '关闭', 78 | 79 | optimizingSVG: '压缩 SVG', 80 | copiedSVG: '复制 SVG', 81 | savedSVG: '保存 SVG', 82 | 83 | readyToWorkOffline: '离线工作已就绪。', 84 | svgSize: 'SVG 大小', 85 | zoom: '缩放', 86 | 87 | license: '许可', 88 | about: '关于', 89 | 90 | ...languages, 91 | }; 92 | 93 | // ignore unused exports default 94 | export default translations; 95 | -------------------------------------------------------------------------------- /src/js/clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { inputImage, copyButton, pasteButton, svgOutput } from './domrefs.js'; 21 | import { optimizeSVG } from './svgo.js'; 22 | import { showToast } from './ui.js'; 23 | import { i18n } from './i18n.js'; 24 | import { IS_SAFARI } from './util.js'; 25 | 26 | pasteButton.addEventListener('click', async () => { 27 | try { 28 | const clipboardItems = await navigator.clipboard.read(); 29 | for (const clipboardItem of clipboardItems) { 30 | for (const type of clipboardItem.types) { 31 | if (type.startsWith('image/')) { 32 | const image = await clipboardItem.getType(type); 33 | if (!image) { 34 | return; 35 | } 36 | const blobURL = URL.createObjectURL(image); 37 | inputImage.src = blobURL; 38 | return; 39 | } 40 | } 41 | } 42 | } catch (err) { 43 | console.error(err.name, err.message); 44 | showToast(err.message); 45 | } 46 | }); 47 | 48 | document.addEventListener('paste', (e) => { 49 | try { 50 | if (!e.clipboardData.files.length) { 51 | return; 52 | } 53 | const file = e.clipboardData.files[0]; 54 | if (file.type.startsWith('image/')) { 55 | const blobURL = URL.createObjectURL(file); 56 | inputImage.src = blobURL; 57 | return; 58 | } 59 | } catch (err) { 60 | console.error(err.name, err.message); 61 | showToast(err.message); 62 | } 63 | }); 64 | 65 | copyButton.addEventListener('click', async () => { 66 | let svg = svgOutput.innerHTML; 67 | showToast(i18n.t('optimizingSVG'), Infinity); 68 | try { 69 | // Firefox only supports `navigator.clipboard.write()`. 70 | if (!('ClipboardItem' in window)) { 71 | await navigator.clipboard.writeText(await optimizeSVG(svg)); 72 | } else { 73 | // Chromium >=98. 74 | if ( 75 | ('supports' in ClipboardItem && 76 | ClipboardItem.supports('image/svg+xml')) || 77 | !IS_SAFARI 78 | ) { 79 | svg = await optimizeSVG(svg); 80 | await navigator.clipboard.write([ 81 | new ClipboardItem({ 82 | 'image/svg+xml': new Promise(async (resolve) => { 83 | resolve(new Blob([svg], { type: 'image/svg+xml' })); 84 | }), 85 | 'text/plain': new Promise(async (resolve) => { 86 | resolve(new Blob([svg], { type: 'text/plain' })); 87 | }), 88 | }), 89 | ]); 90 | // Safari (non-optimized SVG) 91 | } else { 92 | /* 93 | await navigator.clipboard.write([ 94 | new ClipboardItem({ 95 | 'text/plain': new Promise((resolve) => { 96 | resolve(new Blob([svg], { type: 'text/plain' })); 97 | }), 98 | }), 99 | ]); 100 | */ 101 | await navigator.clipboard.write([ 102 | new ClipboardItem({ 103 | 'text/plain': new Blob([svg], { type: 'text/plain' }), 104 | }), 105 | ]); 106 | } 107 | } 108 | // Chromium < 98. 109 | } catch (err) { 110 | svg = await optimizeSVG(svg); 111 | const textBlob = new Blob([svg], { type: 'text/plain' }); 112 | const svgBlob = new Blob([svg], { type: 'image/svg+xml' }); 113 | try { 114 | // Chromium <=88 (text only). Old Chrome crashes hard when trying to copy 115 | // 'image/svg+xml' blob: https://github.com/tomayac/SVGcode/issues/51. 116 | if ( 117 | Number(navigator.userAgent.replace(/.*Chrome\/(\d+).*/, '$1')) <= 88 118 | ) { 119 | await navigator.clipboard.write([ 120 | new ClipboardItem({ 121 | [textBlob.type]: textBlob, 122 | }), 123 | ]); 124 | } else { 125 | // Chromium (text and SVG) 126 | await navigator.clipboard.write([ 127 | new ClipboardItem({ 128 | [svgBlob.type]: svgBlob, 129 | [textBlob.type]: textBlob, 130 | }), 131 | ]); 132 | } 133 | } catch (err) { 134 | try { 135 | // Chromium (text only) 136 | await navigator.clipboard.write([ 137 | new ClipboardItem({ 138 | [textBlob.type]: textBlob, 139 | }), 140 | ]); 141 | } catch (err) { 142 | showToast(err.message); 143 | return; 144 | } 145 | } 146 | } 147 | showToast(i18n.t('copiedSVG')); 148 | }); 149 | -------------------------------------------------------------------------------- /src/js/color.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { filterInputs, POTRACE } from './ui.js'; 21 | import { progress, svgOutput, optimizeCurvesCheckbox } from './domrefs.js'; 22 | import ColorWorker from './colorworker?worker'; 23 | 24 | let colorWorker = null; 25 | const intervalID = {}; 26 | 27 | const convertToColorSVG = async (imageData) => { 28 | if (colorWorker) { 29 | colorWorker.terminate(); 30 | } 31 | colorWorker = new ColorWorker(); 32 | 33 | return new Promise(async (resolve) => { 34 | const channel = new MessageChannel(); 35 | channel.port1.onmessage = ({ data }) => { 36 | channel.port1.close(); 37 | if (colorWorker) { 38 | colorWorker.terminate(); 39 | colorWorker = null; 40 | } 41 | resolve(data.result); 42 | }; 43 | 44 | progress.value = 0; 45 | let prefix = ''; 46 | let suffix = ''; 47 | let paths = ''; 48 | let lastLength = 0; 49 | 50 | if (intervalID.current) { 51 | clearInterval(intervalID.current); 52 | intervalID.current = null; 53 | } 54 | intervalID.current = setInterval(() => { 55 | const svg = `${prefix}${paths}${suffix}`; 56 | if (svg.length !== lastLength) { 57 | const transform = svgOutput.dataset.transform; 58 | if (transform) { 59 | svgOutput.setAttribute('transform', transform); 60 | } 61 | svgOutput.innerHTML = svg; 62 | lastLength = svg.length; 63 | } 64 | }, 500); 65 | 66 | const progressChannel = new MessageChannel(); 67 | progressChannel.port1.onmessage = ({ data }) => { 68 | const percentage = Math.floor((data.processed / data.total) * 100); 69 | progress.value = percentage; 70 | if (data.svg) { 71 | if (!prefix) { 72 | prefix = data.svg 73 | .replace(/(.*?]+>)(.*?)(<\/svg>)/, '$1') 74 | .replace(/\s+width="\d+(?:\.\d+)?"/, '') 75 | .replace(/\s+height="\d+(?:\.\d+)"/, ''); 76 | suffix = data.svg.replace(/(.*?]+>)(.*?)(<\/svg>)/, '$3'); 77 | } 78 | const path = data.svg.replace(/(.*?]+>)(.*?)(<\/svg>)/, '$2'); 79 | paths += path; 80 | } 81 | if (data.processed === data.total) { 82 | clearInterval(intervalID.current); 83 | intervalID.current = null; 84 | progressChannel.port1.close(); 85 | progress.value = 0; 86 | } 87 | }; 88 | 89 | const params = { 90 | minPathSegments: Number(filterInputs[POTRACE.minPathLength].value), 91 | strokeWidth: Number(filterInputs[POTRACE.strokeWidth].value), 92 | turdsize: Number(filterInputs[POTRACE.turdsize].value), 93 | alphamax: Number(filterInputs[POTRACE.alphamax].value), 94 | turnpolicy: Number(filterInputs[POTRACE.turnpolicy].value), 95 | opttolerance: Number(filterInputs[POTRACE.opttolerance].value), 96 | opticurve: optimizeCurvesCheckbox.checked ? 1 : 0, 97 | extractcolors: false, 98 | posterizelevel: 2, // [1, 255] 99 | posterizationalgorithm: 0, 100 | }; 101 | colorWorker.postMessage({ imageData, params }, [ 102 | channel.port2, 103 | progressChannel.port2, 104 | ]); 105 | }); 106 | }; 107 | 108 | export { convertToColorSVG, intervalID }; 109 | -------------------------------------------------------------------------------- /src/js/colorworker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { potrace, init } from 'esm-potrace-wasm'; 21 | 22 | const extractColors = (imageData) => { 23 | const colors = {}; 24 | for (let i = 0; i < imageData.data.length; i += 4) { 25 | const r = imageData.data[i]; 26 | const g = imageData.data[i + 1]; 27 | const b = imageData.data[i + 2]; 28 | const a = imageData.data[i + 3]; 29 | if (a === 0) { 30 | continue; 31 | } 32 | const rgba = `${r},${g},${b},${a}`; 33 | if (!colors[rgba]) { 34 | colors[rgba] = [i]; 35 | } else { 36 | colors[rgba].push(i); 37 | } 38 | } 39 | return colors; 40 | }; 41 | 42 | const convertToColorSVG = async (imageData, params, progressPort) => { 43 | await init(); 44 | const colors = extractColors(imageData); 45 | 46 | let prefix = ''; 47 | let suffix = ''; 48 | let svgString = ''; 49 | 50 | const promises = []; 51 | let processed = 0; 52 | for (const [color, occurrences] of Object.entries(colors)) { 53 | promises.push(() => { 54 | let newImageData = new ImageData(imageData.width, imageData.height); 55 | newImageData.data.fill(255); 56 | const len = occurrences.length; 57 | for (let i = 0; i < len; i++) { 58 | const location = occurrences[i]; 59 | newImageData.data[location] = 0; 60 | newImageData.data[location + 1] = 0; 61 | newImageData.data[location + 2] = 0; 62 | newImageData.data[location + 3] = 255; 63 | } 64 | return new Promise(async (resolve) => { 65 | let svg = await potrace(newImageData, params); 66 | newImageData = null; 67 | const [r, g, b, a] = color.split(','); 68 | const alpha = (a / 255).toFixed(2); 69 | svg = svg.replace( 70 | 'fill="#000000" stroke="none"', 71 | `fill="rgb(${r},${g},${b})" stroke="rgb(${r},${g},${b})"${ 72 | a === '255' 73 | ? '' 74 | : ` fill-opacity="${alpha}" stroke-opacity="${alpha}"` 75 | } stroke-width="${params.strokeWidth}px"`, 76 | ); 77 | const pathRegEx = //g; 78 | let matches; 79 | const shortPaths = []; 80 | while ((matches = pathRegEx.exec(svg)) !== null) { 81 | const path = matches[1]; 82 | if (path.split(' ').length < params.minPathSegments) { 83 | shortPaths.push(matches[0]); 84 | } 85 | } 86 | shortPaths.forEach((path) => { 87 | svg = svg.replace(path, ''); 88 | }); 89 | processed++; 90 | if (!/ 0) { 112 | promiseChunks.push(promises.splice(0, chunkSize)); 113 | } 114 | const svgs = []; 115 | for (const chunk of promiseChunks) { 116 | svgs.push(await Promise.all(chunk.map((f) => f()))); 117 | } 118 | 119 | for (const svg of svgs.flat()) { 120 | if (!prefix) { 121 | prefix = svg.replace(/(.*?]+>)(.*?)(<\/svg>)/, '$1'); 122 | suffix = svg.replace(/(.*?]+>)(.*?)(<\/svg>)/, '$3'); 123 | svgString = prefix; 124 | } 125 | svgString += svg.replace(/(.*?]+>)(.*?)(<\/svg>)/, '$2'); 126 | } 127 | svgString += suffix; 128 | return svgString; 129 | }; 130 | 131 | self.addEventListener('message', async (e) => { 132 | const { imageData, params } = e.data; 133 | const svg = await convertToColorSVG(imageData, params, e.ports[1]); 134 | e.ports[0].postMessage({ result: svg }); 135 | }); 136 | -------------------------------------------------------------------------------- /src/js/domrefs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const canvasMain = document.querySelector('canvas'); 21 | const menu = document.querySelector('.menu'); 22 | const main = document.querySelector('main'); 23 | const detailsContainer = document.querySelector('.details'); 24 | const posterizeCheckbox = document.querySelector('.posterize'); 25 | const posterizeLabel = document.querySelector('[for=posterize]'); 26 | const colorRadio = document.querySelector('.color'); 27 | const colorLabel = document.querySelector('[for=color]'); 28 | const monochromeRadio = document.querySelector('.monochrome'); 29 | const monochromeLabel = document.querySelector('[for=monochrome]'); 30 | const considerDPRCheckbox = document.querySelector('.consider-dpr'); 31 | const considerDPRLabel = document.querySelector('[for="consider-dpr"]'); 32 | const optimizeCurvesCheckbox = document.querySelector('.optimize-curves'); 33 | const optimizeCurvesLabel = document.querySelector('[for="optimize-curves"]'); 34 | const showAdvancedControlsCheckbox = document.querySelector('.show-advanced'); 35 | const showAdvancedControlsLabel = document.querySelector( 36 | '[for="show-advanced"]', 37 | ); 38 | const inputImage = document.querySelector('img'); 39 | const resetAllButton = document.querySelector('.reset-all'); 40 | const fileOpenButton = document.querySelector('.open'); 41 | const saveSVGButton = document.querySelector('.save'); 42 | const copyButton = document.querySelector('.copy'); 43 | const shareSVGButton = document.querySelector('.share'); 44 | const pasteButton = document.querySelector('.paste'); 45 | const installButton = document.querySelector('.install'); 46 | const svgOutput = document.querySelector('.svg-output'); 47 | const debugCheckbox = document.querySelector('.debug'); 48 | const progress = document.querySelector('progress'); 49 | const toast = document.querySelector('.toast'); 50 | const details = document.querySelector('details.main'); 51 | const summary = document.querySelector('summary'); 52 | const closeOptionsButton = document.querySelector('.close-options-button'); 53 | const licenseLink = document.querySelector('.license'); 54 | const aboutLink = document.querySelector('.about'); 55 | const pinchZoom = document.querySelector('pinch-zoom'); 56 | const languageSelect = document.querySelector('.language'); 57 | const darkModeToggle = document.querySelector('dark-mode-toggle'); 58 | const documentElement = document.documentElement; 59 | const metaThemeColor = document.querySelector('meta[name=theme-color]'); 60 | 61 | const dpr = window.devicePixelRatio; 62 | 63 | export { 64 | canvasMain, 65 | main, 66 | menu, 67 | detailsContainer, 68 | posterizeCheckbox, 69 | posterizeLabel, 70 | colorRadio, 71 | colorLabel, 72 | monochromeRadio, 73 | monochromeLabel, 74 | considerDPRCheckbox, 75 | considerDPRLabel, 76 | optimizeCurvesCheckbox, 77 | optimizeCurvesLabel, 78 | showAdvancedControlsCheckbox, 79 | showAdvancedControlsLabel, 80 | inputImage, 81 | resetAllButton, 82 | fileOpenButton, 83 | saveSVGButton, 84 | shareSVGButton, 85 | copyButton, 86 | pasteButton, 87 | installButton, 88 | svgOutput, 89 | documentElement, 90 | debugCheckbox, 91 | toast, 92 | progress, 93 | details, 94 | summary, 95 | closeOptionsButton, 96 | dpr, 97 | licenseLink, 98 | aboutLink, 99 | pinchZoom, 100 | languageSelect, 101 | darkModeToggle, 102 | metaThemeColor, 103 | }; 104 | -------------------------------------------------------------------------------- /src/js/filehandling.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { inputImage } from './domrefs.js'; 21 | import { set } from 'idb-keyval'; 22 | import { FILE_HANDLE } from './filesystem.js'; 23 | 24 | window.launchQueue.setConsumer(async (launchParams) => { 25 | if (!launchParams.files.length) { 26 | return; 27 | } 28 | for (const handle of launchParams.files) { 29 | const file = await handle.getFile(); 30 | if (file.type.startsWith('image/')) { 31 | const blobURL = URL.createObjectURL(file); 32 | inputImage.addEventListener( 33 | 'load', 34 | () => { 35 | URL.revokeObjectURL(blobURL); 36 | }, 37 | { once: true }, 38 | ); 39 | inputImage.src = blobURL; 40 | await set(FILE_HANDLE, handle); 41 | return; 42 | } 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /src/js/filesystem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { fileOpen, fileSave, supported } from 'browser-fs-access'; 21 | import { 22 | inputImage, 23 | fileOpenButton, 24 | saveSVGButton, 25 | svgOutput, 26 | documentElement, 27 | } from './domrefs.js'; 28 | import { clearToast, showToast } from './ui.js'; 29 | import { optimizeSVG } from './svgo.js'; 30 | import { i18n } from './i18n.js'; 31 | import { set, get } from 'idb-keyval'; 32 | 33 | const FILE_HANDLE = 'fileHandle'; 34 | 35 | const getSuggestedFileName = (fileHandle) => { 36 | if (!fileHandle) { 37 | return ''; 38 | } 39 | // Remove original file extension. 40 | return fileHandle.name.replace(/\.[^\.]+$/, ''); 41 | }; 42 | 43 | fileOpenButton.addEventListener('click', async () => { 44 | try { 45 | const file = await fileOpen({ 46 | mimeTypes: ['image/*'], 47 | description: 'Image files', 48 | }); 49 | const blobURL = URL.createObjectURL(file); 50 | inputImage.addEventListener( 51 | 'load', 52 | () => { 53 | URL.revokeObjectURL(blobURL); 54 | }, 55 | { once: true }, 56 | ); 57 | inputImage.src = blobURL; 58 | if (supported) { 59 | await set(FILE_HANDLE, file.handle); 60 | } 61 | } catch (err) { 62 | console.error(err.name, err.message); 63 | showToast(err.message); 64 | } 65 | }); 66 | 67 | document.addEventListener('dragover', (event) => { 68 | event.preventDefault(); 69 | }); 70 | 71 | document.addEventListener('dragenter', (event) => { 72 | event.preventDefault(); 73 | documentElement.classList.add('dropenter'); 74 | }); 75 | 76 | document.addEventListener('dragleave', (event) => { 77 | event.preventDefault(); 78 | if (event.target !== documentElement) { 79 | return; 80 | } 81 | documentElement.classList.remove('dropenter'); 82 | }); 83 | 84 | document.addEventListener('drop', async (event) => { 85 | event.preventDefault(); 86 | event.stopPropagation(); 87 | documentElement.classList.remove('dropenter'); 88 | const item = event.dataTransfer.items[0]; 89 | if (item.kind === 'file') { 90 | let blobURL; 91 | inputImage.addEventListener( 92 | 'load', 93 | () => { 94 | URL.revokeObjectURL(blobURL); 95 | }, 96 | { once: true }, 97 | ); 98 | if (supported) { 99 | const handle = await item.getAsFileSystemHandle(); 100 | if (handle.kind !== 'file') { 101 | return; 102 | } 103 | const file = await handle.getFile(); 104 | blobURL = URL.createObjectURL(file); 105 | inputImage.src = blobURL; 106 | await set(FILE_HANDLE, handle); 107 | return; 108 | } 109 | const file = item.getAsFile(); 110 | blobURL = URL.createObjectURL(file); 111 | inputImage.src = blobURL; 112 | } 113 | }); 114 | 115 | saveSVGButton.addEventListener('click', async () => { 116 | const createPromiseBlob = async () => { 117 | showToast(i18n.t('optimizingSVG'), Infinity); 118 | const optimizedSVG = await optimizeSVG(svgOutput.innerHTML); 119 | clearToast(); 120 | return new Blob([optimizedSVG], { type: 'image/svg+xml' }); 121 | }; 122 | 123 | try { 124 | let fileHandle = false; 125 | try { 126 | fileHandle = await get(FILE_HANDLE); 127 | } catch (err) { 128 | // Do nothing. The user probably blocks cookies. 129 | } 130 | const fileName = getSuggestedFileName(fileHandle); 131 | await fileSave(createPromiseBlob(), { 132 | fileName, 133 | description: 'SVG file', 134 | extensions: ['.svg'], 135 | mimeTypes: ['image/svg+xml'], 136 | }); 137 | showToast(i18n.t('savedSVG')); 138 | } catch (err) { 139 | console.error(err.name, err.message); 140 | showToast(err.message); 141 | } 142 | }); 143 | 144 | export { FILE_HANDLE, getSuggestedFileName }; 145 | -------------------------------------------------------------------------------- /src/js/install.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { installButton } from './domrefs.js'; 21 | 22 | let installEvent = null; 23 | 24 | window.addEventListener('beforeinstallprompt', (event) => { 25 | event.preventDefault(); 26 | installEvent = event; 27 | installButton.style.display = 'flex'; 28 | }); 29 | 30 | installButton.addEventListener('click', async () => { 31 | if (!installEvent) { 32 | return; 33 | } 34 | installEvent.prompt(); 35 | const result = await installEvent.userChoice; 36 | if (result.outcome === 'accepted') { 37 | installButton.style.display = 'none'; 38 | installEvent = null; 39 | } 40 | }); 41 | 42 | window.addEventListener('appinstalled', (event) => { 43 | // Duplicate because users can install through the prompt or the button. 44 | installButton.style.display = 'none'; 45 | installEvent = null; 46 | }); 47 | -------------------------------------------------------------------------------- /src/js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { initUI, showToast } from './ui.js'; 21 | import { registerSW } from 'virtual:pwa-register'; 22 | import { i18n } from './i18n.js'; 23 | import { 24 | installButton, 25 | shareSVGButton, 26 | inputImage, 27 | darkModeToggle, 28 | documentElement, 29 | metaThemeColor, 30 | } from './domrefs.js'; 31 | import 'dark-mode-toggle'; 32 | 33 | if ('launchQueue' in window) { 34 | import('./filehandling.js'); 35 | } 36 | 37 | if ('windowControlsOverlay' in navigator) { 38 | import('./windowcontrols.js'); 39 | } 40 | 41 | if ('onbeforeinstallprompt' in window && 'onappinstalled' in window) { 42 | import('./install.js'); 43 | } else { 44 | installButton.style.display = 'none'; 45 | } 46 | 47 | if ('share' in navigator && 'canShare' in navigator) { 48 | import('./share.js'); 49 | } else { 50 | shareSVGButton.style.display = 'none'; 51 | } 52 | 53 | if ('serviceWorker' in navigator) { 54 | window.addEventListener('load', async () => { 55 | try { 56 | await navigator.serviceWorker.register('./sharetargetsw.js', { 57 | scope: '/share-target/', 58 | }); 59 | } catch (err) { 60 | console.error(err.name, err.message); 61 | showToast(err.message); 62 | } 63 | 64 | if (location.search.includes('share-target')) { 65 | const keys = await caches.keys(); 66 | const mediaCache = await caches.open( 67 | keys.filter((key) => key.startsWith('media'))[0], 68 | ); 69 | const image = await mediaCache.match('shared-image'); 70 | if (image) { 71 | const blob = await image.blob(); 72 | await mediaCache.delete('shared-image'); 73 | const blobURL = URL.createObjectURL(blob); 74 | inputImage.addEventListener( 75 | 'load', 76 | () => { 77 | URL.revokeObjectURL(blobURL); 78 | }, 79 | { once: true }, 80 | ); 81 | inputImage.src = blobURL; 82 | } 83 | } 84 | }); 85 | } 86 | 87 | // From https://stackoverflow.com/a/62963963/6255000. 88 | const supportsWorkerType = () => { 89 | let supports = false; 90 | const tester = { 91 | get type() { 92 | supports = true; 93 | }, 94 | }; 95 | try { 96 | new Worker('blob://', tester); 97 | } finally { 98 | return supports; 99 | } 100 | }; 101 | 102 | const onColorSchemeChange = () => { 103 | const mode = darkModeToggle.mode; 104 | documentElement.style.setProperty('--color-scheme', mode); 105 | metaThemeColor.content = mode === 'dark' ? '#131313' : '#fff'; 106 | }; 107 | darkModeToggle.addEventListener('colorschemechange', onColorSchemeChange); 108 | onColorSchemeChange(); 109 | 110 | (async () => { 111 | initUI(); 112 | if (!supportsWorkerType()) { 113 | await import( 114 | '../.././node_modules/module-workers-polyfill/module-workers-polyfill.min.js' 115 | ); 116 | } 117 | 118 | const updateSW = registerSW({ 119 | onOfflineReady() { 120 | showToast(i18n.t('readyToWorkOffline')); 121 | }, 122 | onNeedRefresh() { 123 | location.reload(); 124 | }, 125 | }); 126 | updateSW(); 127 | })(); 128 | -------------------------------------------------------------------------------- /src/js/monochrome.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { filterInputs, POTRACE } from './ui.js'; 21 | import { optimizeCurvesCheckbox } from './domrefs.js'; 22 | import MonochromeSVGWorker from './monochromeworker.js?worker'; 23 | 24 | let monochromeSVGWorker = null; 25 | 26 | const convertToMonochromeSVG = async (imageData) => { 27 | if (monochromeSVGWorker) { 28 | monochromeSVGWorker.terminate(); 29 | } 30 | monochromeSVGWorker = new MonochromeSVGWorker(); 31 | 32 | return new Promise(async (resolve) => { 33 | const channel = new MessageChannel(); 34 | channel.port1.onmessage = ({ data }) => { 35 | channel.port1.close(); 36 | if (monochromeSVGWorker) { 37 | monochromeSVGWorker.terminate(); 38 | monochromeSVGWorker = null; 39 | } 40 | resolve(data.result); 41 | }; 42 | 43 | const params = { 44 | turdsize: Number(filterInputs[POTRACE.turdsize].value), 45 | alphamax: Number(filterInputs[POTRACE.alphamax].value), 46 | turnpolicy: Number(filterInputs[POTRACE.turnpolicy].value), 47 | opttolerance: Number(filterInputs[POTRACE.opttolerance].value), 48 | opticurve: optimizeCurvesCheckbox.checked ? 1 : 0, 49 | extractcolors: false, 50 | }; 51 | monochromeSVGWorker.postMessage({ imageData, params }, [channel.port2]); 52 | }); 53 | }; 54 | 55 | export { convertToMonochromeSVG }; 56 | -------------------------------------------------------------------------------- /src/js/monochromeworker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { potrace, init } from 'esm-potrace-wasm'; 21 | 22 | const convertToMonochromeSVG = async (imageData, params) => { 23 | await init(); 24 | const svg = await potrace(imageData, params); 25 | return svg; 26 | }; 27 | 28 | self.addEventListener('message', async (e) => { 29 | const { imageData, params } = e.data; 30 | const svg = await convertToMonochromeSVG(imageData, params); 31 | e.ports[0].postMessage({ result: svg }); 32 | }); 33 | -------------------------------------------------------------------------------- /src/js/orchestrate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { 21 | preProcessMainCanvas, 22 | preProcessInputImage, 23 | supportsOffscreenCanvas, 24 | } from './preprocess.js'; 25 | import { colorRadio, svgOutput } from './domrefs.js'; 26 | import { convertToMonochromeSVG } from './monochrome.js'; 27 | import { convertToColorSVG, intervalID } from './color.js'; 28 | import { showToast, MONOCHROME, COLOR } from './ui.js'; 29 | import { i18n } from './i18n.js'; 30 | 31 | import spinnerSVG from '/spinner.svg?raw'; 32 | 33 | const readableSize = (size) => { 34 | if (size === 0) return '0B'; 35 | const i = Math.floor(Math.log(size) / Math.log(1024)); 36 | return `${(size / Math.pow(1024, i)).toFixed(2) * 1} ${['B', 'KB', 'MB'][i]}`; 37 | }; 38 | 39 | const displayResult = (svg, className) => { 40 | if (!svg) { 41 | return; 42 | } 43 | // Remove `width` and `height` attributes. 44 | svg = svg 45 | .replace(/\s+width="\d+(?:\.\d+)?"/, '') 46 | .replace(/\s+height="\d+(?:\.\d+)"/, ''); 47 | svgOutput.classList.remove(COLOR); 48 | svgOutput.classList.remove(MONOCHROME); 49 | svgOutput.classList.add(className); 50 | svgOutput.innerHTML = svg; 51 | showToast(`${i18n.t('svgSize')}: ${readableSize(svg.length)}`, 3000); 52 | }; 53 | 54 | const startProcessing = async () => { 55 | svgOutput.innerHTML = ''; 56 | svgOutput.classList.remove(COLOR, MONOCHROME); 57 | if (intervalID.current) { 58 | clearInterval(intervalID.current); 59 | intervalID.current = null; 60 | } 61 | const transform = svgOutput.getAttribute('transform'); 62 | svgOutput.innerHTML = spinnerSVG; 63 | if (transform) { 64 | svgOutput.dataset.transform = transform; 65 | svgOutput.setAttribute('transform', ''); 66 | } 67 | const imageData = supportsOffscreenCanvas 68 | ? await preProcessInputImage() 69 | : preProcessMainCanvas(); 70 | if (colorRadio.checked) { 71 | const svg = await convertToColorSVG(imageData); 72 | if (transform) { 73 | svgOutput.setAttribute('transform', transform); 74 | } 75 | displayResult(svg, COLOR); 76 | } else { 77 | const svg = await convertToMonochromeSVG(imageData); 78 | if (transform) { 79 | svgOutput.setAttribute('transform', transform); 80 | } 81 | displayResult(svg, MONOCHROME); 82 | } 83 | }; 84 | 85 | export { startProcessing }; 86 | -------------------------------------------------------------------------------- /src/js/panzoom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { svgOutput, pinchZoom } from './domrefs.js'; 21 | 22 | pinchZoom.addEventListener('change', () => { 23 | const { x, y, scale } = pinchZoom; 24 | svgOutput.setAttribute('transform', `translate(${x}, ${y}) scale(${scale})`); 25 | }); 26 | 27 | pinchZoom.addEventListener('pointerdown', () => { 28 | pinchZoom.style.cursor = 'grabbing'; 29 | }); 30 | 31 | pinchZoom.addEventListener('pointerup', () => { 32 | pinchZoom.style.cursor = ''; 33 | }); 34 | 35 | const resetPanAndZoom = () => { 36 | svgOutput.setAttribute('transform', ''); 37 | }; 38 | 39 | export { resetPanAndZoom }; 40 | -------------------------------------------------------------------------------- /src/js/preprocessworker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const DISCRETE = 'discrete'; 21 | 22 | let offscreen; 23 | let ctxOffscreen; 24 | 25 | const preProcessMainCanvas = ( 26 | inputImageBitmap, 27 | filter, 28 | cssFilters, 29 | rotate, 30 | width, 31 | height, 32 | ) => { 33 | ctxOffscreen.clearRect(0, 0, width, height); 34 | ctxOffscreen.setTransform(1, 0, 0, 1, width / 2, height / 2); 35 | ctxOffscreen.rotate((rotate * Math.PI) / 180); 36 | ctxOffscreen.filter = cssFilters; 37 | ctxOffscreen.drawImage( 38 | inputImageBitmap, 39 | -inputImageBitmap.width / 2, 40 | -inputImageBitmap.height / 2, 41 | ); 42 | ctxOffscreen.setTransform(1, 0, 0, 1, 0, 0); 43 | ctxOffscreen.filter = filter; 44 | ctxOffscreen.drawImage( 45 | offscreen, 46 | 0, 47 | 0, 48 | offscreen.width, 49 | offscreen.height, 50 | 0, 51 | 0, 52 | width, 53 | height, 54 | ); 55 | return ctxOffscreen.getImageData(0, 0, width, height); 56 | }; 57 | 58 | self.addEventListener('message', (e) => { 59 | if (e.data.offscreen) { 60 | offscreen = e.data.offscreen; 61 | ctxOffscreen = offscreen.getContext('2d'); 62 | return; 63 | } 64 | const { 65 | inputImageBitmap, 66 | posterize, 67 | rgba, 68 | cssFilters, 69 | rotate, 70 | width, 71 | height, 72 | dpr, 73 | } = e.data; 74 | ctxOffscreen.scale(dpr, dpr); 75 | offscreen.width = width; 76 | offscreen.height = height; 77 | const imageData = preProcessMainCanvas( 78 | inputImageBitmap, 79 | getFilter(posterize, rgba, cssFilters), 80 | cssFilters, 81 | rotate, 82 | width, 83 | height, 84 | dpr, 85 | ); 86 | e.ports[0].postMessage({ result: imageData }); 87 | }); 88 | 89 | const getFilter = (posterize, rgba) => { 90 | const filters = []; 91 | if (posterize) { 92 | filters.push({ 93 | name: 'componentTransfer', 94 | filter: 'componentTransfer', 95 | funcR: { 96 | type: DISCRETE, 97 | tableValues: rgba.r, 98 | }, 99 | funcG: { 100 | type: DISCRETE, 101 | tableValues: rgba.g, 102 | }, 103 | funcB: { 104 | type: DISCRETE, 105 | tableValues: rgba.b, 106 | }, 107 | funcA: { 108 | type: DISCRETE, 109 | tableValues: rgba.a, 110 | }, 111 | }); 112 | } 113 | return new CanvasFilter(filters); 114 | }; 115 | -------------------------------------------------------------------------------- /src/js/share.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { shareSVGButton, svgOutput } from './domrefs.js'; 21 | import { showToast, clearToast } from './ui.js'; 22 | import { optimizeSVG } from './svgo.js'; 23 | import { get } from 'idb-keyval'; 24 | import { getSuggestedFileName, FILE_HANDLE } from './filesystem.js'; 25 | import { i18n } from './i18n.js'; 26 | 27 | shareSVGButton.style.display = 'flex'; 28 | 29 | shareSVGButton.addEventListener('click', async () => { 30 | let svg = svgOutput.innerHTML; 31 | showToast(i18n.t('optimizingSVG'), Infinity); 32 | svg = await optimizeSVG(svg); 33 | clearToast(); 34 | let fileHandle = false; 35 | try { 36 | fileHandle = await get(FILE_HANDLE); 37 | } catch (err) { 38 | // Do nothing. The user probably blocks cookies. 39 | } 40 | const suggestedFileName = fileHandle 41 | ? getSuggestedFileName(fileHandle) 42 | : 'Untitled.svg'; 43 | const file = new File([svg], suggestedFileName, { type: 'image/svg+xml' }); 44 | const data = { 45 | files: [file], 46 | }; 47 | if (navigator.canShare(data)) { 48 | try { 49 | await navigator.share(data); 50 | } catch (err) { 51 | if (err.name !== 'AbortError') { 52 | console.error(err.name, err.message); 53 | showToast(err.message); 54 | } 55 | } 56 | } 57 | }); 58 | -------------------------------------------------------------------------------- /src/js/svgo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import OptimizeSVGWorker from './svgoworker.js?worker'; 21 | 22 | let optimizeSVGWorker = null; 23 | 24 | const optimizeSVG = async (svg) => { 25 | if (optimizeSVGWorker) { 26 | optimizeSVGWorker.terminate(); 27 | } 28 | optimizeSVGWorker = new OptimizeSVGWorker(); 29 | 30 | return new Promise((resolve) => { 31 | const channel = new MessageChannel(); 32 | channel.port1.onmessage = ({ data }) => { 33 | channel.port1.close(); 34 | if (optimizeSVGWorker) { 35 | optimizeSVGWorker.terminate(); 36 | optimizeSVGWorker = null; 37 | } 38 | resolve(data.result); 39 | }; 40 | 41 | optimizeSVGWorker.postMessage({ svg }, [channel.port2]); 42 | }); 43 | }; 44 | 45 | export { optimizeSVG }; 46 | -------------------------------------------------------------------------------- /src/js/svgoworker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { optimize } from 'svgo/dist/svgo.browser'; 21 | 22 | self.addEventListener('message', async (e) => { 23 | const { svg } = e.data; 24 | const optimized = optimize(svg, { 25 | multipass: true, 26 | plugins: [ 27 | { 28 | name: 'preset-default', 29 | params: { 30 | overrides: { 31 | removeViewBox: false, 32 | }, 33 | }, 34 | }, 35 | ], 36 | }); 37 | e.ports[0].postMessage({ result: optimized.data }); 38 | }); 39 | -------------------------------------------------------------------------------- /src/js/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | const debounce = (func, wait) => { 21 | let timeout; 22 | return function executedFunction(...args) { 23 | const later = () => { 24 | clearTimeout(timeout); 25 | func(...args); 26 | }; 27 | clearTimeout(timeout); 28 | timeout = setTimeout(later, wait); 29 | }; 30 | }; 31 | 32 | const IS_MAC = /Mac|iPhone/.test(navigator.platform); 33 | const IS_SAFARI = /Version\/.* Safari\//.test(navigator.userAgent); 34 | 35 | export { debounce, IS_MAC, IS_SAFARI }; 36 | -------------------------------------------------------------------------------- /src/js/windowcontrols.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | import { debounce } from './util.js'; 21 | import { main, menu } from './domrefs.js'; 22 | 23 | const WINDOW_CONTROLS_OVERLAY = 'window-controls-overlay'; 24 | 25 | const onGeometryChange = () => { 26 | menu.classList.toggle( 27 | WINDOW_CONTROLS_OVERLAY, 28 | navigator.windowControlsOverlay.visible, 29 | ); 30 | main.classList.toggle( 31 | WINDOW_CONTROLS_OVERLAY, 32 | navigator.windowControlsOverlay.visible, 33 | ); 34 | }; 35 | 36 | navigator.windowControlsOverlay.addEventListener( 37 | 'geometrychange', 38 | debounce(async () => { 39 | onGeometryChange(); 40 | }, 250), 41 | ); 42 | 43 | onGeometryChange(); 44 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SVGcode", 3 | "short_name": "SVGcode", 4 | "start_url": "https://svgco.de/", 5 | "id": "https://svgco.de/", 6 | "description": "SVGcode is a Progressive Web App that lets you convert raster images like JPG, PNG, GIF, WebP, AVIF, etc. to vector graphics in SVG format.", 7 | "screenshots": [ 8 | { 9 | "src": "https://svgco.de/screenshots/desktop-dark.png", 10 | "sizes": "2592x1848", 11 | "type": "image/png", 12 | "form_factor": "wide" 13 | }, 14 | { 15 | "src": "https://svgco.de/screenshots/desktop-light.png", 16 | "sizes": "2592x1848", 17 | "type": "image/png", 18 | "form_factor": "wide" 19 | }, 20 | { 21 | "src": "https://svgco.de/screenshots/mobile-dark.png", 22 | "sizes": "1439x2880", 23 | "type": "image/png", 24 | "form_factor": "narrow" 25 | }, 26 | { 27 | "src": "https://svgco.de/screenshots/mobile-light.png", 28 | "sizes": "1439x2880", 29 | "type": "image/png", 30 | "form_factor": "narrow" 31 | } 32 | ], 33 | "scope": "https://svgco.de/", 34 | "display": "standalone", 35 | "dir": "auto", 36 | "display_override": ["window-controls-overlay"], 37 | "orientation": "portrait", 38 | "theme_color": "#ffffff", 39 | "background_color": "#ffffff", 40 | "user_preferences": { 41 | "color_scheme": { 42 | "dark": { 43 | "theme_color": "#131313", 44 | "background_color": "#131313" 45 | }, 46 | "light": { 47 | "theme_color": "#ffffff", 48 | "background_color": "#ffffff" 49 | } 50 | } 51 | }, 52 | "theme_colors": [ 53 | { "color": "#131313", "media": "(prefers-color-scheme: dark)" } 54 | ], 55 | "background_colors": [ 56 | { "color": "#131313", "media": "(prefers-color-scheme: dark)" } 57 | ], 58 | "icons": [ 59 | { 60 | "src": "https://svgco.de/favicon.png", 61 | "type": "image/png", 62 | "sizes": "1024x1024", 63 | "purpose": "maskable" 64 | }, 65 | { 66 | "src": "https://svgco.de/favicon.svg", 67 | "type": "image/svg+xml", 68 | "sizes": "150x150", 69 | "purpose": "any" 70 | }, 71 | { 72 | "src": "https://svgco.de/favicon-bw.svg", 73 | "type": "image/svg+xml", 74 | "sizes": "150x150", 75 | "purpose": "monochrome" 76 | } 77 | ], 78 | "file_handlers": [ 79 | { 80 | "action": "https://svgco.de/", 81 | "accept": { 82 | "image/*": [ 83 | ".jpg", 84 | ".jpeg", 85 | ".webp", 86 | ".png", 87 | ".avif", 88 | ".gif", 89 | ".svg", 90 | ".bmp" 91 | ] 92 | } 93 | } 94 | ], 95 | "share_target": { 96 | "action": "https://svgco.de/share-target/", 97 | "method": "POST", 98 | "enctype": "multipart/form-data", 99 | "params": { 100 | "files": [ 101 | { 102 | "name": "image", 103 | "accept": ["image/jpeg", "image/png", "image/webp", "image/gif"] 104 | } 105 | ] 106 | } 107 | }, 108 | "iarc_rating_id": "39d78758-59f2-429e-92ab-ad11d61feafe", 109 | "categories": ["photo", "productivity", "utilities", "devtools"], 110 | "related_applications": [ 111 | { 112 | "platform": "play", 113 | "url": "https://play.google.com/store/apps/details?id=de.svgco.twa", 114 | "id": "de.svgco.twa" 115 | }, 116 | { 117 | "platform": "windows", 118 | "url": "https://www.microsoft.com/en-us/p/svgcode/9plhxdgsw1rj", 119 | "id": "9PLHXDGSW1RJ" 120 | }, 121 | { 122 | "platform": "webapp", 123 | "url": "https://svgco.de/manifest.webmanifest" 124 | } 125 | ], 126 | "prefer_related_applications": false 127 | } 128 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SVGcode—Convert raster images to SVG vector graphics 3 | * Copyright (C) 2021 Google LLC 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | /** 21 | * @type {import('vite').UserConfig} 22 | */ 23 | 24 | import { VitePWA as vitePWA } from 'vite-plugin-pwa'; 25 | import dynamicImportVars from '@rollup/plugin-dynamic-import-vars'; 26 | import webmanifest from './src/manifest.json'; 27 | 28 | // ignore unused exports default 29 | export default { 30 | plugins: [ 31 | dynamicImportVars({ 32 | include: ['./src/i18n/*'], 33 | }), 34 | vitePWA({ 35 | registerType: 'autoUpdate', 36 | injectRegister: 'auto', 37 | manifest: webmanifest, 38 | }), 39 | ], 40 | build: { 41 | outDir: 'docs', 42 | target: 'esnext', 43 | cssCodeSplit: false, 44 | }, 45 | preview: { 46 | port: 4000, 47 | }, 48 | }; 49 | --------------------------------------------------------------------------------