This Java application demonstrates multithreading by recoloring images using multiple threads. It divides the image processing task into smaller regions and assigns each region to a separate thread, thereby improving processing speed by utilizing multiple CPU cores effectively.
- Multithreaded Processing: Utilizes multiple threads to recolor different sections of the image concurrently.
- Thread Safety: Ensures thread safety using proper synchronization techniques.
- Customizable Thread Count: Allows customization of the number of threads for parallel processing.
-
Clone the repository to your local machine:
git clone https://github.com/yourusername/multithreaded-image-recoloring.git
-
Navigate to the project directory:
cd multithreaded-image-recoloring
-
Compile the Java source code:
javac Main.java
-
Run the application:
java Main
-
View the recolored image in the output directory.
- Java Development Kit (JDK) installed on your system.
- Input image file in JPEG format placed in the
resources
directory.
- Adjust the
SOURCE_FILE
andDESTINATION_FILE
constants inMain.java
to specify the input and output file paths. - Modify the
numberOfThreads
parameter in themain
method ofMain.java
to customize the number of threads used for processing.
This project is developed by [Yaroslav Prozorov].
This project is licensed under the MIT License.