Skip to main content

Small code files to Images and Vice-Versa

Reason this release was yanked:

File Isssues

Project description

ImgRar v1.0

Overview

ImgRar is a versatile command-line tool for:

  • Code to PNG Conversion: Transforming codes (up to several kilobytes in size) into visually encoded PNG images.
  • PNG to Code Conversion: Decoding PNG images back into their original codes.
  • MP4 Video Preparation: Preparing PNG files for MP4 video creation (future functionality).

Key Features

  • Seamless Conversion: Effortlessly switch between code and PNG formats.
  • Customizable Frame Size: Specify the frame size during code-to-PNG conversions for precise output.
  • Flexible Directories: Define input and output directories for streamlined workflows.

Requirements

  • Python Version: Python 3.6 or higher.
  • Dependencies:
    • Built-in libraries: argparse, os.

Installation

  1. Clone the Repository:
    git clone https://github.com/your-repo/ImgRar.git
    
  2. Navigate to the Directory:
    cd ImgRar
    
  3. Install Required Dependencies: If additional modules are needed, install them using pip.

Usage

Command-Line Arguments

Run the tool with these arguments:

Argument Short Form Required Description
--Output -output Yes Directory to save the output files.
--Input -input Yes Directory containing input files to process.
--Code2Png -code2png No Enable code-to-PNG conversion mode.
--Png2Code -png2code No Enable PNG-to-code conversion mode.
--fsize -fsize No Set the frame size for PNG conversion (default: 320*240).

Example Commands

  1. Code to PNG Conversion:

    python main.py -input ./input_dir -output ./output_dir -code2png -fsize 640*480
    

    Converts code files in input_dir to PNG images, saving them to output_dir with a frame size of 640x480.

  2. PNG to Code Conversion:

    python main.py -input ./input_dir -output ./output_dir -png2code
    

    Converts PNG images in input_dir back into code files, saving them to output_dir.

Directory Structure

ImgRar/
|
├── BaseConversion.py  # Core logic for conversions.
├── main.py            # Application entry point.
├── README.md          # Documentation file.
├── input_dir/         # Example input directory (replace with your path).
├── output_dir/        # Example output directory (replace with your path).

Notes

  • Implementation Details: Ensure the BaseConversion class in BaseConversion.py includes both code2png and png2code methods.
  • Input Files: Use appropriate input files for smooth processing.

License

This project is licensed under the MIT License. Refer to the LICENSE file for more details.

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a pull request.

Contact

For support or questions, email: your-email@example.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Imgrar-1.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Imgrar-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file Imgrar-1.0.1.tar.gz.

File metadata

  • Download URL: Imgrar-1.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for Imgrar-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0c3158d97e26301eb27a3d08fd332753b066ec9a6da0a060f03f1bd995c6273c
MD5 0900066dce912cf86c7eedc656b2e4a1
BLAKE2b-256 b01de000b4f1a176a51a0b375f17eb748ab7836faa02b19dcda9f5341496ddcd

See more details on using hashes here.

File details

Details for the file Imgrar-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: Imgrar-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for Imgrar-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd707a34454dc08486ce11095937e8b7161a128a729ebd7dd1550639558ea455
MD5 8de55344e886359113b27fdc2fadea0c
BLAKE2b-256 d69a8a542be4552f6347b5e49db5f022fbe63e97fa53c45fdd16d152e4f4b94c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page