My Image Fetcher Library is a C++ library that allows you to search for images on Google and download them to your local system. It provides a simple API for querying Google's Custom Search API and saving image results.
- Search for images on Google using keywords.
- Download and save images to a specified folder.
- Easily integrate image searching and downloading into your C++ applications.
Before using the library, you'll need the following:
- CMake (for building the project)
- C++ Compiler (e.g., GCC)
- cURL library (for making HTTP requests)
-
Clone this repository to your local machine:
git clone https://github.com/pb2204/cpp-google-image-fetcher.git cd my-image-fetcher-library
-
Build the library using CMake:
mkdir build cd build cmake .. make
-
Include the library in your C++ project:
#include "google_image_fetcher.h"
-
Create an instance of the
GoogleImageFetcher
class:GoogleImageFetcher imageFetcher;
-
Use the
fetchImages
method to search and download images:imageFetcher.fetchImages("cat", "downloaded_images");
This example searches for images of cats and saves them to the "downloaded_images" folder.
You can find a complete example of using the library in the examples directory.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "Add your changes"
- Push to your branch:
git push origin feature/your-feature-name
- Open a pull request on this repository.
Please review the Contributing Guidelines for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the creators of cURL for the powerful HTTP request library.
- Inspiration from other image-fetching libraries and APIs.
If you have any questions, suggestions, or feedback, feel free to reach out to Pabitra Banerjee.
Happy coding!