{"id":27976388,"url":"https://github.com/xy-liao/jp2forge_web","last_synced_at":"2026-04-19T03:01:52.363Z","repository":{"id":320705538,"uuid":"1006019156","full_name":"xy-liao/jp2forge_web","owner":"xy-liao","description":"A web interface for the JP2Forge conversion library, providing an easy-to-use system for converting and managing image files in the JPEG2000 format with BnF (Bibliothèque nationale de France) compliance.","archived":false,"fork":false,"pushed_at":"2025-10-13T07:03:05.000Z","size":41943,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-25T12:04:07.702Z","etag":null,"topics":["bnf-compliance","digital-preservation","django-application","image-conversion","image-processing","jpeg2000","python-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xy-liao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-21T10:01:17.000Z","updated_at":"2025-06-21T11:59:07.000Z","dependencies_parsed_at":"2025-10-25T12:04:10.629Z","dependency_job_id":"baa23da9-5b9f-4b2a-b4ca-f2e3305fbdd9","html_url":"https://github.com/xy-liao/jp2forge_web","commit_stats":null,"previous_names":["xy-liao/jp2forge_web"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xy-liao/jp2forge_web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xy-liao%2Fjp2forge_web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xy-liao%2Fjp2forge_web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xy-liao%2Fjp2forge_web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xy-liao%2Fjp2forge_web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xy-liao","download_url":"https://codeload.github.com/xy-liao/jp2forge_web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xy-liao%2Fjp2forge_web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bnf-compliance","digital-preservation","django-application","image-conversion","image-processing","jpeg2000","python-library"],"created_at":"2025-05-08T01:26:07.646Z","updated_at":"2026-04-19T03:01:52.285Z","avatar_url":"https://github.com/xy-liao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JP2Forge Web Application\n\n[![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-blue.svg)](https://github.com/xy-liao/jp2forge_web/releases/tag/v0.1.6) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.9–3.12](https://img.shields.io/badge/python-3.9--3.12-blue.svg)](https://www.python.org/downloads/) [![Project Status: Active](https://img.shields.io/badge/Project%20Status-Active-green.svg)](https://github.com/xy-liao/jp2forge_web) [![Security: SonarQube Compliant](https://img.shields.io/badge/Security-SonarQube%20Compliant-brightgreen.svg)](https://www.sonarsource.com/products/sonarqube/)\n\nA web interface for the JP2Forge JPEG2000 conversion library, providing an easy-to-use system for converting and managing image files in the JPEG2000 format.\n\n**Important Note**: This application serves primarily as a promotional demonstration for the [JP2Forge script](https://github.com/xy-liao/jp2forge) and its BnF (Bibliothèque nationale de France) compliance capabilities. JP2Forge Web doesn't leverage all available arguments and features of the underlying JP2Forge script - it's a case study implementation showcasing selected functionality of the more comprehensive JP2Forge tool.\n\n## Dashboard Screenshot\n\n![Dashboard](static/images/docs/jp2forge_web_dashboard.png)\n\n## Features\n\n- **Interactive Dashboard** with conversion statistics, storage metrics, and job monitoring\n- **Convert images to JPEG2000** format with various compression options\n- **Multiple compression modes**: lossless, lossy, supervised, and BnF-compliant\n- **Document type support**: photograph, heritage document, color, grayscale\n- **Parallel processing** of conversion jobs with Celery\n- **User authentication** and job management\n- **Detailed conversion reports** with quality metrics (PSNR, SSIM)\n- **Multi-page TIFF support**\n- **Real-time progress tracking**\n- **Batch file processing**\n\n## Supported File Formats\n\n### Input Formats\n- **JPEG/JPG**: Standard photographic format\n- **TIFF/TIF**: Both single-page and multi-page TIFF files\n- **PNG**: Lossless raster graphics format\n- **BMP**: Bitmap image format\n\n### Output Format\n- **JPEG2000 (.jp2)**: ISO standard for image compression\n\n**File Size Limits**: 100MB per file\n\n## Installation\n\n### Quick Setup with Docker (Recommended)\n\n```bash\n# Clone the repository\ngit clone https://github.com/xy-liao/jp2forge_web.git\ncd jp2forge_web\n\n# Run automated setup script\nchmod +x docker_setup.sh\n./docker_setup.sh\n```\n\nThe script automatically:\n- Generates secure passwords for database and Redis\n- Configures environment variables\n- Builds and starts all containers\n- Creates default admin user (admin/admin123)\n\n**Access the application**: http://localhost:8000\n\n### Manual Installation\n\n#### Prerequisites\n- Redis server\n- ExifTool\n- Git\n\n#### Setup Steps\n\n```bash\n# Clone repository\ngit clone https://github.com/xy-liao/jp2forge_web.git\ncd jp2forge_web\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Initialize application\npython init.py\n\n# Start services\n./start_dev.sh      # Django server\n./start_celery.sh   # Celery worker (in separate terminal)\n```\n\n**Access the application**: http://localhost:8000\n\n## User Guide\n\n### Getting Started\n\n1. **Create an account** or log in with existing credentials\n2. **Navigate to \"New Conversion\"** in the main menu\n3. **Upload files** by clicking \"Choose Files\" or drag-and-drop\n4. **Configure settings** (compression mode, document type, quality)\n5. **Submit job** and monitor progress in real-time\n6. **Download results** once conversion is complete\n\n### Compression Options\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| **Lossless** | No quality loss, larger files | Archival, critical documents |\n| **Lossy** | Higher compression, some quality loss | General use, web images |\n| **Supervised** | Quality-controlled with metrics | Balanced quality/size |\n| **BnF Compliant** | Meets BnF digitization standards | Cultural heritage institutions |\n\n### Document Types\n\n- **Photograph**: Standard photographic images (default)\n- **Heritage Document**: Historical documents with enhanced quality settings\n- **Color**: General color images\n- **Grayscale**: Black and white images\n\n### Quality Metrics (Supervised Mode)\n\n- **PSNR**: Peak Signal-to-Noise Ratio (higher = better quality)\n- **SSIM**: Structural Similarity Index (closer to 1.0 = better quality)\n- **Compression Ratio**: Original size vs compressed size\n\n## Docker Management\n\n### Useful Commands\n\n```bash\n# View all logs\ndocker-compose logs\n\n# View specific service logs\ndocker-compose logs web\ndocker-compose logs worker\n\n# Restart services\ndocker-compose restart\n\n# Stop all services\ndocker-compose down\n\n# Start services\ndocker-compose up -d\n\n# Access Django shell\ndocker-compose exec web python manage.py shell\n\n# Run migrations\ndocker-compose exec web python manage.py migrate\n```\n\n### Service Management\n\n```bash\n# Check service status\npython manage_services.py status\n\n# Stop and cleanup all services\npython manage_services.py clean\n\n# Start all services\npython manage_services.py start\n\n# Restart all services\npython manage_services.py restart\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Redis connection failed\"**\n- Ensure Redis is running: `brew services start redis` (macOS) or `sudo service redis-server start` (Linux)\n- Check Redis password in .env file\n\n**\"Database connection error\"**\n- For Docker: `docker-compose down -v \u0026\u0026 docker-compose up -d`\n- For manual: Check database settings in .env\n\n**\"Import error: No module named 'jp2forge'\"**\n- Ensure JP2Forge 0.9.7 is installed: `pip install jp2forge==0.9.7`\n- For Docker: Rebuild containers: `docker-compose build --no-cache`\n- Check virtual environment activation: `source venv/bin/activate`\n\n**\"Permission denied\" errors**\n- Ensure scripts are executable: `chmod +x *.sh`\n- Check file permissions in media directory\n\n**\"Port already in use\"**\n- Stop conflicting services: `python manage_services.py clean`\n- Use different ports in .env file\n\n**Conversion jobs stuck in \"Processing\"**\n- Restart Celery worker: `./start_celery.sh` or `docker-compose restart worker`\n- Check Celery logs: `docker-compose logs worker`\n\n### Development Mode\n\nEnable mock mode for testing without actual conversions:\n\n```bash\n# In .env file\nJP2FORGE_MOCK_MODE=True\n```\n\n### Log Files\n\n- **Django**: `logs/django.log`\n- **Celery**: `logs/celery.log`\n- **Conversion errors**: `logs/converter.log`\n- **System errors**: `logs/error.log`\n\n## Architecture\n\n### Core Components\n\n- **Django 5.2+**: Web framework with enhanced security\n- **Celery 5.5+**: Background task processing with improved reliability\n- **Redis 6.2+**: Message broker and caching\n- **PostgreSQL 16+**: Database (Docker) / SQLite (development)\n- **JP2Forge 0.9.7**: JPEG2000 conversion engine with BnF compliance\n\n### Security Features\n\n- **CSRF protection** on all forms and state-changing operations\n- **HTTP method validation** with explicit GET/POST restrictions\n- **User authentication** required for all conversion operations\n- **File upload validation** with type checking and size limits (100MB max)\n- **Secure password hashing** using Django's PBKDF2 algorithm\n- **Docker security** with non-root user and restricted privileges\n- **Input sanitization** and XSS protection\n- **Session security** with secure cookie settings\n\n## Contributing\n\nThis is a single-developer project. For questions or issues, please open a GitHub issue.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Version History\n\nSee [CHANGELOG.md](CHANGELOG.md) for detailed version history and updates.\n\n## Related Projects\n\n- **[JP2Forge](https://github.com/xy-liao/jp2forge)**: The underlying JPEG2000 conversion library\n\n\u003c!-- Repository cleanup completed --\u003e\n\u003c!-- Contributors list refresh --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxy-liao%2Fjp2forge_web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxy-liao%2Fjp2forge_web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxy-liao%2Fjp2forge_web/lists"}