拾碌 (Shilu) is a lightweight Windows GUI application built with Python and Tkinter. It provides a seamless way to convert images to Base64 strings and vice versa. Designed for developers and designers, it handles large files efficiently and offers a clean, modern interface.
- Image to Base64:
- Large File Support: Multi-threaded processing ensures the UI remains responsive even with large images.
- Smart Preview: Displays only the first 1000 characters of the Base64 string to prevent interface freezing.
- Auto-generated Filenames: Automatically generates filenames in the format
GJT+ 6 random digits (e.g.,GJT123456.txt) when saving. - Export Options: One-click copy to clipboard or save as a
.txtfile.
- Base64 to Image:
- Flexible Input: Import from clipboard, text files, or direct input.
- Real-time Preview: Instantly view the decoded image.
- Save as Image: Save decoded images as PNG/JPG with auto-generated filenames (
GJT+ 6 random digits).
- Modern UI: Built with
ttkbootstrapfor a sleek look and feel.
- Windows OS (Recommended for the pre-built EXE)
- Python 3.x (If running from source)
- Dependencies:
Pillow,ttkbootstrap
- Clone the repository:
git clone https://github.com/yourusername/image-base64-converter.git cd image-base64-converter - Install dependencies:
pip install -r requirements.txt
- Run the application:
python image_converter.py
If you want to package the app as a standalone .exe file:
- Install PyInstaller:
pip install pyinstaller
- Run the build script:
- Double-click
build_exe.bat - OR run command:
pyinstaller --noconfirm --onefile --windowed --name "拾碌" --icon "app_icon.ico" image_converter.py
- Double-click
- Find the executable in the
dist/folder.
拾碌 是一款基于 Python 和 Tkinter 开发的轻量级 Windows 桌面应用,旨在提供便捷的图片与 Base64 字符串互转功能。它专为开发者和设计师打造,界面简洁现代,能够高效处理大文件。
- 图片转 Base64:
- 支持大文件:采用多线程处理,转换大图片时界面不卡顿。
- 智能预览:仅显示 Base64 字符串的前 1000 个字符,防止界面冻结。
- 自动文件名:保存文件时自动生成
GJT+ 6位随机数字的文件名(如GJT123456.txt),无需手动输入。 - 便捷导出:支持一键复制完整代码到剪贴板或保存为
.txt文件。
- Base64 转图片:
- 灵活输入:支持从剪贴板粘贴、导入文本文件或直接输入。
- 实时预览:解码后立即显示图片预览。
- 保存图片:支持将解码后的图片保存为 PNG/JPG 格式,同样支持自动生成文件名。
- 现代界面:使用
ttkbootstrap构建,提供美观的视觉体验。
- Windows 操作系统
- Python 3.x (源码运行)
- 依赖库:
Pillow,ttkbootstrap
- 克隆项目:
git clone https://github.com/yourusername/image-base64-converter.git cd image-base64-converter - 安装依赖:
pip install -r requirements.txt
- 运行程序:
python image_converter.py
如果您想将程序打包为独立的 .exe 可执行文件:
- 安装 PyInstaller:
pip install pyinstaller
- 执行打包:
- 直接运行
build_exe.bat脚本 - 或者 在命令行运行:
pyinstaller --noconfirm --onefile --windowed --name "拾碌" --icon "app_icon.ico" image_converter.py
- 直接运行
- 在
dist/目录下找到生成的可执行文件。
License: MIT