{"id":20438692,"url":"https://github.com/anurag1101/image_resizer","last_synced_at":"2026-06-10T14:31:14.238Z","repository":{"id":261242651,"uuid":"883716935","full_name":"Anurag1101/Image_Resizer","owner":"Anurag1101","description":"A simple Python script to resize images by a custom percentage using OpenCV. Easily adjust image dimensions, save resized versions, and preview results. Perfect for quick and efficient image resizing tasks.","archived":false,"fork":false,"pushed_at":"2024-12-27T12:45:18.000Z","size":322,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T16:51:55.897Z","etag":null,"topics":["image-resizer","modules","opencv-python","opencv2-python","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anurag1101.png","metadata":{"files":{"readme":"README.md","changelog":"newSrk.png","contributing":null,"funding":null,"license":null,"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":"2024-11-05T13:02:39.000Z","updated_at":"2024-12-27T12:45:21.000Z","dependencies_parsed_at":"2024-11-24T11:19:28.085Z","dependency_job_id":"8b2731d1-064f-42b0-9566-7e0303cf5463","html_url":"https://github.com/Anurag1101/Image_Resizer","commit_stats":null,"previous_names":["anurag1101/image_resizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anurag1101/Image_Resizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FImage_Resizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FImage_Resizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FImage_Resizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FImage_Resizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anurag1101","download_url":"https://codeload.github.com/Anurag1101/Image_Resizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FImage_Resizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34157453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["image-resizer","modules","opencv-python","opencv2-python","python","python3"],"created_at":"2024-11-15T09:12:52.729Z","updated_at":"2026-06-10T14:31:14.212Z","avatar_url":"https://github.com/Anurag1101.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Resizer\n\nA simple Python script for resizing images using `OpenCV`. This tool allows you to resize an image by a specified percentage and save the resized image in a new file.\n\n## Features:\n\n- Resize an image to a custom scale percentage.\n\n- Save the resized image in a specified output file format.\n\n- Preview the resized image in a display window.\n\n## Requirements:\n\n- ### Python 3.x\n\n- ### OpenCV (cv2)\n\n## Installation:\n\n#### Clone this repository to your local machine:\n\n    git clone https://github.com/your-username/Image_Resizer.git\n    cd Image_Resizer\n\n#### Install the required OpenCV library if not already installed:\n\n    pip install opencv-python\n\n## Usage:\n\nPlace the **source image** (e.g., `srk.jpg`) in the repository folder.\n\nSet the `source`, `destination`, and `scale_percent` variables in the script:\n\n    source = \"srk.jpg\"        # Path to the original image\n    destination = \"newSrk.png\"  # Path for saving the resized image\n    scale_percent = 50         # Resize percentage (e.g., 50% of original size)\n\n#### Run the script:\n\n    python image_resizer.py\n\nThe resized image will be saved as `newSrk.png` in the same folder. The script will display the resized image in a preview window. Press any key to close the window.\n\n## Code Overview:\n\nThe script follows these steps:\n\n- **Load the Image:** Loads the specified image using `cv2.imread()`.\n\n- **Calculate New Dimensions:**  Calculates the new width and height based on the specified `scale_percent`.\n\n- **Resize the Image:**  Uses `cv2.resize()` to resize the image.\n\n- **Save and Display the Image:**  Saves the resized image using `cv2.imwrite()` and optionally displays it in a new window.\n\n## Example:\n\nFor a 50% resize of an image named `srk.jpg`, `set scale_percent = 50`, then run the script. The output file (`newSrk.png`) will be half the size of the original image.\n\n## Potential Enhancements:\n\n- **Command-line Arguments:**  Allow setting parameters like source image, destination file, and scale percentage via command-line options.\n\n- **Aspect Ratio Resize:** Enable resizing by specifying a target width or height while maintaining the original aspect ratio.\n\n- **Batch Processing:**  Resize multiple images at once.\n\n## License\n\nThis project is licensed under the `MIT` License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fimage_resizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanurag1101%2Fimage_resizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fimage_resizer/lists"}