A Flask-based web application for reading QR codes from images and PDFs.
- Image Upload: Support for PNG, JPG, JPEG, GIF, BMP, and TIFF formats
- QR Code Detection: Automatically detects and decodes QR codes
- Web Interface: Beautiful, responsive web interface with drag-and-drop support
- Command Line: Simple CLI tool for quick QR code decoding
- Smart Detection: Automatically detects URLs, emails, phone numbers, and WiFi configurations
- Copy to Clipboard: Easy copying of decoded content
- API Endpoint: RESTful API for programmatic access
- Clone the repository:
git clone https://github.com/ArmanShirzad/qrRobust-scanner.git
cd qrRobust-scanner- Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the server:
python app.py-
Open your browser and go to
http://localhost:5000 -
Upload an image containing a QR code by:
- Clicking the upload area and selecting a file
- Dragging and dropping an image onto the upload area
-
View the decoded content on the results page
python cli_qr_reader.py <image_path>Send a POST request to /decode_base64 with a base64-encoded image:
curl -X POST http://localhost:5000/decode_base64 \
-H "Content-Type: application/json" \
-d '{"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."}'-
Install Heroku CLI and login:
heroku login
-
Create a new Heroku app:
heroku create your-app-name
-
Add required buildpacks:
heroku buildpacks:add --index 1 heroku-community/apt heroku buildpacks:add --index 2 heroku/python
-
Deploy:
git push heroku main
- Flask: Web framework
- Pillow: Image processing
- Pyzbar: QR code decoding (requires libzbar0)
- NumPy: Numerical computing
python test_installation.py- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.