شعار Image To Svg

Image To Svg

المجتمع
zyipeng
image-to-svg

حوّل الصور النقطية التي يقدّمها المستخدم إلى ملفات SVG نظيفة وقابلة للتحرير بخلفية شفافة، للأيقونات والشعارات ورموز واجهة المستخدم والعلامات النصية والشعارات اللفظية وغيرها من الأصول الرسومية المسطحة. استخدمها مع صور PNG أو JPG أو WebP أو لقطات الشاشة، بما في ذلك الصور غير الشفافة التي يجب فصل خلفيتها قبل إعادة بنائها كرسومات متجهة، والشعارات المركّبة مع النص، والنسخ المطابق للبكسل للأيقونات، والطلبات لتحويل أيقونة أو شعار في صورة إلى SVG. لا تستخدمها لتحويل الصور الفوتوغرافية العادية إلى رسومات متجهة أو لإنتاج صور نقطية فقط.

نظرة عامة

الناشرzyipeng
المستودعimage-to-svg
اسم المهارةimage-to-svg
النجوم
31
التفريعات
6
الملفات المرفقة
20
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 20

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها zyipeng على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Image To Svg في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/zyipeng/image-to-svg/tree/main
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zyipeng/image-to-svg.git \
  .claude/skills/image-to-svg
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Image To Svg في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Image To Svg تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Image To Svg بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Image to SVG

Rebuild the foreground geometry represented by the supplied pixels. Treat the raster as the only source of truth and produce a real vector, not a bitmap wrapper.

Resolve <skill-dir> to the directory containing this SKILL.md. Resolve every bundled script and reference relative to that directory. Do not assume a vendor-specific home directory or the current working directory.

Non-negotiable boundary

  • Use only the user-provided raster and facts explicitly supplied by the user.
  • Do not browse the web, search icon libraries, inspect application bundles, reverse-search the image, or recover an original/candidate SVG.
  • Do not embed the source with <image>, a data URL, foreignObject, a raster pattern, or CSS background imagery.
  • Do not present an automatic threshold contour as final smooth artwork unless the source is intentionally pixel art.
  • Do not claim that one raster uniquely determines the original authoring geometry. Aim for a pixel-faithful reference-size render plus clean scaling, and disclose underdetermined details.

Background separation is mandatory

The final SVG must have a transparent canvas and contain only the requested graphic foreground.

  • If the source has meaningful transparency, preserve its visible foreground and ignore fully transparent pixels.
  • If the source is opaque, identify and exclude the background before reconstructing geometry. This is an internal preprocessing step, not a separate output mode.
  • For solid or near-solid backgrounds, infer the background from palette prevalence, borders, corners, and spatial continuity. Do not assume every border pixel is background.
  • For gradients, shadows, compression noise, or textured backgrounds, separate the intended foreground semantically and inspect edges at high zoom. Do not vectorize the surrounding scene unless the user asks for it.
  • When foreground/background separation is ambiguous or part of the graphic may be occluded, state the ambiguity instead of silently inventing hidden geometry.
  • Do not deliver a transparent PNG or mask unless the user explicitly asks for one.

Runtime levels

The core workflow has no mandatory third-party installation. Viewing the image, reasoning about foreground geometry, writing SVG, and running scripts/svg_audit.py are sufficient to produce a useful result.

Optionally check enhanced QA availability:

bash
python3 <skill-dir>/scripts/doctor.py

The doctor searches the current shell, environment overrides, system runtimes, and known agent-managed runtime caches. Set IMAGE_TO_SVG_RUNTIME_ROOTS to a path-separated list when an agent stores reusable runtimes elsewhere. Use the executables reported under selected_runtimes; do not assume that the default python3 or node owns already-installed packages.

Pillow and NumPy enable automated raster measurement and image-difference metrics. Node.js, Playwright, and Chrome/Chromium enable deterministic browser rendering. Treat all of them as optional enhancements:

  • Prefer already-installed system or agent-managed dependencies; using them is not an installation.
  • Do not install dependencies unless the user explicitly asks.
  • Do not stop SVG reconstruction when optional dependencies are missing.
  • Use available visual inspection, local SVG viewing, and the dependency-free SVG audit instead.
  • Report which enhanced QA steps were skipped; do not label the SVG unusable merely because automated metrics were unavailable.

Deliverables

Always deliver the requested editable .svg with a transparent canvas.

  • Preserve a logo, icon-plus-wordmark, or other intentional lockup as one combined SVG by default.
  • Split elements into separate SVG files only when the user asks or when the source clearly contains unrelated assets.
  • Preserve source spacing and relative alignment for combined assets.
  • When enhanced QA is available, also deliver final-render.png, comparison.png, and metrics.json as evidence.
  • Do not create extra extraction artifacts unless they materially help iteration or the user requests them.

Workflow

1. Inspect, separate, and measure

View the original image. Record canvas dimensions, alpha behavior, likely background, foreground bounds, colors, repeated widths, symmetry axes, negative spaces, element grouping, and whether the artwork appears stroke-authored or fill-authored.

For every opaque source, explicitly decide which pixels belong to the background and exclude that background from the SVG. Tighten the output viewBox around the requested foreground unless preserving source whitespace or layout is part of the request.

If Pillow and NumPy are already available, run the analyzer on the image or an explicit crop:

bash
python3 <skill-dir>/scripts/analyze_raster.py input.png --out-dir outputs/analysis
python3 <skill-dir>/scripts/analyze_raster.py input.png --crop X Y W H --out-dir outputs/asset/analysis

Inspect analysis.json, coverage.png, and zoom.png. If qa_blocked is true, inspect the raster and rerun with explicit evidence:

bash
python3 <skill-dir>/scripts/analyze_raster.py input.png \
  --background '#f7f7f7' --foreground '#4c4c4c' --polarity dark-on-light \
  --out-dir outputs/analysis

Use --background transparent for a genuinely transparent canvas. Connected components are measurements only; separate letters, dots, and antialiased fragments do not necessarily imply separate final paths.

When the analyzer is unavailable, perform the same foreground/background decision visually and continue.

2. Form geometry hypotheses

Read references/geometry-recipes.md. Start at the lowest adequate complexity:

  1. circles, ellipses, lines, polylines, rectangles, rounded rectangles, and arcs;
  2. small composites of primitives and negative-space cutouts;
  3. a few analytic cubic curves with deliberate tangent continuity;
  4. a smoothed outline fitted from measured edges;
  5. a trace-derived outline only for genuinely irregular silhouettes, followed by simplification and smoothing.

For apparent line icons, test a centerline stroke hypothesis before fitting both outline edges. Infer centerlines from paired edges and estimate width from their separation. Test caps, joins, miter behavior, and open-versus-closed endpoints. Use filled outlines only when constant-width strokes cannot explain the pixels.

Use symmetry and repetition as constraints. Share radii, stroke widths, corner radii, centers, and mirrored control points when supported by the raster.

For wordmarks and combined brand marks, preserve each visible glyph as vector geometry and preserve the measured relationship between symbol and text. Do not substitute editable font text unless the user prefers it or the typeface is known from supplied evidence.

3. Author and audit a true SVG

Write a correct tight or intentionally spaced viewBox, semantic element ids, explicit colors, and the fewest elements/control points that explain the image. Leave the canvas transparent and keep coordinates readable enough for later editing.

Run the dependency-free audit after every structural rewrite:

bash
python3 <skill-dir>/scripts/svg_audit.py asset.svg --report outputs/audit.json

Any raster embedding or external reference is a hard failure. Internal url(#id) references for gradients, masks, clip paths, and filters are valid. Treat excessive path commands and noisy knots as smoothness warnings.

4. Render with available tools

If the bundled browser runtime is already available, render at exact physical dimensions:

bash
node <skill-dir>/scripts/render_svg.cjs asset.svg outputs/final-render.png \
  --physical-width 74 --physical-height 90 --dpr 1 --background '#f7f7f7'

For a DPR-2 hypothesis, keep the same physical dimensions and change only --dpr 2.

If Playwright is unavailable, use any existing safe local SVG viewer or image preview to inspect the delivered SVG at reference size and 200–400% zoom. Do not install a renderer automatically.

5. Compare and refine

If Pillow and NumPy are already available, compare source and render at identical physical dimensions:

bash
python3 <skill-dir>/scripts/compare_fit.py source-crop.png outputs/final-render.png \
  --background '#f7f7f7' --foreground '#4c4c4c' --out-dir outputs/qa

Read references/qa-metrics.md, inspect comparison.png, and refine in this order:

  1. foreground/background separation, canvas, placement, scale, and optical centering;
  2. topology, open/closed structure, and negative space;
  3. endpoints, extrema, radii, corner positions, and symmetry;
  4. stroke width, caps, joins, and local width profile;
  5. curve tangents and antialias-sensitive subpixel placement;
  6. foreground color.

When automated comparison is unavailable, apply the same ordering through direct visual comparison. Change a small set of parameters per iteration and stop at the first clean, structurally correct fit or after 10 geometry iterations.

6. Accept with available evidence

Always require:

  • the SVG passes the no-raster/external-reference audit;
  • the background is excluded and the SVG canvas is transparent;
  • intended curves remain smooth at 200–400% zoom;
  • no obvious structural, spacing, endpoint, or negative-space mismatch remains;
  • the grouping matches user intent, including combined logo-and-text layouts.

When enhanced QA is available, also require non-ambiguous coverage polarity, exact render dimensions, and locally competitive comparison metrics among clean candidates. When it is unavailable, report the skipped automated checks without blocking delivery.

Do not impose a universal IoU threshold. A smooth primitive can be more correct than a jagged trace with higher IoU; high IoU does not excuse wrong topology or background inclusion.

Thresholds for enhanced analysis

  • Analysis defaults to coverage 0.08 to retain faint antialias fringe for bounds and components.
  • Binary QA defaults to 0.10 for a more stable foreground mask.
  • Soft IoU and coverage MAE remain continuous and do not use either binary threshold.

Both defaults live in scripts/raster_utils.py and every enhanced report records the active value.

Maintenance

Run the dependency-free skill validation after changing metadata or instructions. Run enhanced regressions only when their dependencies are already available:

bash
python3 <skill-creator-dir>/scripts/quick_validate.py <skill-dir>
python3 <skill-dir>/scripts/self_test.py
python3 <skill-dir>/scripts/self_test.py --require-browser

References

  • references/geometry-recipes.md — stroke, primitive, curve, symmetry, grouping, and crop reconstruction guidance.
  • references/qa-metrics.md — optional metric interpretation, renderer calibration, and acceptance ordering.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Image To Svg؟

حوّل الصور النقطية التي يقدّمها المستخدم إلى ملفات SVG نظيفة وقابلة للتحرير بخلفية شفافة، للأيقونات والشعارات ورموز واجهة المستخدم والعلامات النصية والشعارات اللفظية وغيرها من الأصول الرسومية المسطحة. استخدمها مع صور PNG أو JPG أو WebP أو لقطات الشاشة، بما في ذلك الصور غير الشفافة التي يجب فصل خلفيتها قبل إعادة بنائها كرسومات متجهة، والشعارات المركّبة مع النص، والنسخ المطابق للبكسل للأيقونات، والطلبات لتحويل أيقونة أو شعار في صورة إلى SVG. لا تستخدمها لتحويل الصور الفوتوغرافية العادية إلى رسومات متجهة أو لإنتاج صور نقطية فقط.

لماذا تستخدم Image To Svg على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Image To Svg عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Image To Svg في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/zyipeng/image-to-svg/tree/main. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Image To Svg؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Image To Svg؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Image To Svg معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Image To Svg مجانية؟

نشرها zyipeng على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇