3.7 KiB
FileImgSwap
FileImgSwap is a tool that enables mutual conversion between files and PNG images. It supports encryption and image-seed (appending compressed packages) functions, allowing you to hide any file in a PNG image and restore the original file from the generated PNG image.Features
- File to PNG: Convert any type of file (such as text, documents, compressed packages, etc.) into a PNG image, with file data encoded into the image's pixels.
- PNG to File: Extract and restore the original file from a PNG image generated by this tool.
- Encryption Protection: Encryption protection via a password/key file with the same name as the main program in the same directory.
- Image-seed Function: Append a compressed package to the end of the generated PNG image to achieve the "image-seed" effect.
- Metadata: The image retains the original file's name and modification time.
Technical Details
- Encryption algorithm: AES-CTR
- Key algorithm: Key derivation using PBKDF2-SHA256 and HKDF-SHA256
- Image format: PNG
User Guide
Drag and drop files/folders onto the program icon, or run via the command line.
File to PNG
Convert ordinary files to PNG images:
# Convert a single file
FileImgSwap file.pdf
# Convert multiple files
FileImgSwap image.jpg data.zip notes.txt
A PNG file with the .fis.png extension will be generated after conversion. For example, document.pdf will generate document.fis.png.
Restore File
Restore the original file from a PNG image:
# Restore a single PNG
FileImgSwap file.fis.png
# Restore multiple PNGs
FileImgSwap file1.fis.png file2.tz.png
The restored file will use the original file name. If a file with the same name exists, it will be automatically renamed (with a sequence number added).
Encryption Function
To enable encrypted conversion, create one of the following files in the same directory as the program (both can also exist):
- Password file:
.fisp.txtwith the same name as the program (e.g.,FileImgSwap.fisp.txt), where the first line is the password. - Key file:
.fisp.keywith the same name as the program (e.g.,FileImgSwap.fisp.key), which stores the binary key.
The program will automatically detect and use these files for encryption/decryption. No encryption will be applied if none are detected.
Image-seed Function
Use the -append parameter to append a compressed package (zip/rar) to the end of the generated PNG. Separation is not supported; extraction requires a compression tool.
FileImgSwap video.mp4 -append archive.zip
The generated file will have the .tz.png extension. It can be viewed as a normal image and also extracted as a compressed package (zip/rar formats are recommended; rename the extension and use WinRAR for extraction).
Changelog
Notes
- Encrypted files can only be restored using the same password/key file.
- File-Image Swap + image-seed compressed packages can be encrypted with different passwords to achieve "one image, two decryptions".
- 32-bit programs support a maximum single file size of 2GB, and 64-bit programs support a maximum single file size of 5GB.
Related Projects
XiangYue - Text encryption for free expression
NaughtyDamagePack - Make compressed packages look corrupted
