Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MkCode2ImageNew to Visual Studio Code? Get it now.
MkCode2Image

MkCode2Image

orgcw01

|
1 install
| (0) | Free
transform your code into image
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code2Img

Code2Img VSCode Extension can convert code into image.
Code2Img 插件可以将 VSCode 中的代码转成图片。

Usage

  • Step 1: Highlight the code in your VSCode editor that you want to transform.
  • Step 2: Right-click to open the context menu and select "Convert Code to Picture".
  • Step 3: Voila! Your code is instantly converted to an image and saved to your Downloads folder

使用方法

  • 1: 在 VSCode 编辑器中选中你希望转换的代码。
  • 2: 右键鼠标打开菜单,选择Convert Code to Picture。
  • 3: 瞧!您的代码瞬间被转换成图片,并保存在您的下载文件夹中。

alt desc1

How To Build

You can search for Code2Img in the VSCode extension and install it. In case you want to test the project code, you can do it like this:

  • 1: Install all dependencies in the project root directory with npm install
  • 2: Run from the VSCode menu bar Run -> Start Debugging

About

The project was inspired by Crazy-Luke, with GPT completing the code writing.

项目由 疯狂豆Luke 提供思路,GPT 完成代码编写。 npm install --registry=https://registry.npmmirror.com npm install --registry=https://registry.npmmirror.com

1. 使用国内镜像源加速(解决 Chromium 下载问题)

PUPPETEER_DOWNLOAD_HOST=https://cdn.npmmirror.com/binaries/chromium-browser-snapshots npm install puppeteer@22.8.2 PUPPETEER_DOWNLOAD_BASE_URL=https://cdn.npmmirror.com/binaries/chromium-browser-snapshots npm install puppeteer@22.8.2 PUPPETEER_DOWNLOAD_BASE_URL=https://cdn.npmmirror.com/binaries/chromium-browser-snapshots npm install puppeteer@latest

2. 或使用完整镜像源配置

npm config set puppeteer_download_host=https://cdn.npmmirror.com/binaries/chromium-browser-snapshots npm install puppeteer@22.8.2

该操作不下载chromium,只下载puppeteer依赖的一些node包

npm i --save puppeteer --ignore-scripts { "repository": { "type": "git", "url": "https://github.com/yourusername/your-repo.git" } }

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft