From 884aa3d586a065b44b97e383c434b37bfa6c38fd Mon Sep 17 00:00:00 2001 From: Andreas Fahrecker Date: Mon, 18 Mar 2024 22:45:47 +0100 Subject: [PATCH] Added README.md and LICENSE --- LICENSE | 9 +++++++++ README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1123c83 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024 Andreas Fahrecker + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4c9f05 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Image Splitter + +This is a simple command-line tool that splits an image into two halves. The left half of the image is saved in a directory named "left", and the right half is saved in a directory named "right". These directories are created in the parent directory of the original image's directory. + +## Directory Structure + +For example, if you have a directory structure like this: + +- Wallpapers/ + - original/ + - image1.jpg + +After running the script with `image1.jpg` as the input, the directory structure will look like this: + +- Wallpapers/ + - original/ + - image1.jpg + - left/ + - image1_left.jpg + - right/ + - image1_right.jpg + +The "left" directory contains the left half of the original image, and the "right" directory contains the right half. + +## Requirements + +- Python 3 +- Pillow library + +## Installation + +1. Clone this repository. +2. Install the required Python packages using pip: + +```sh +pip install -r requirements.txt +``` + +## Usage +Run the script with the path to the image you want to split as an argument: + +```sh +python main.py path_to_your_image.jpg +``` + +The script will create two new images in the "left" and "right" directories with the suffixes _left and _right added to the original file name. + +## License +This project is licensed under the terms of the MIT license. \ No newline at end of file