Image2Text is a Flutter-based mobile application that allows users to extract text from images. Users can either select an image from their gallery or take a photo using their device's camera. The app processes the image and displays the extracted text, with options to copy the text to the clipboard or return to the home screen.
- Image Selection: Choose an image from the gallery or capture a photo using the camera.
- Text Extraction: Converts the selected image into text using the Gemini API.
- Copy to Clipboard: Easily copy the extracted text for use in other applications.
- Clean UI: Modern and intuitive design for a seamless user experience.
- Flutter: Cross-platform framework for the frontend.
- Gemini API: For image-to-text conversion.
-
Clone the Repository:
git clone https://github.com/santoshvandari/Image2Text.git cd Image2Text -
Install Dependencies:
flutter pub get
-
Run the Application:
flutter run
- Launch the application.
- Tap the "Select Image" button.
- Choose an image from the gallery or capture a photo.
- View the extracted text on the Result Screen.
- Copy the text to the clipboard or return to the home screen.
The app uses the Gemini API for text extraction. Create the File in lib folder with name api_key.dart. The Structure look like /lib/api_key.dart and add the following code:
final String apikey = '<YOUR_API_KEY>'; // Replace the API Key With Your Actual API key. The app requires Camera and Storage Access permissions to capture and read the local photos. If the permission is not granted, the app will prompt the user to allow permission.
Required Permissions:
- Camera Permission: To Capture the Image.
- Storage Permission: To Read the Image from Gallery.
- Internet Permission: To Fetch the Data from the API.
For Android, ensure that the following permissions are added in the AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>flutter: The Flutter framework for building the app.image_picker: For selecting images from the gallery or capturing photos.http: For making HTTP requests to the Gemini API.
To install the app on your Android device:
- Download the latest APK from the Releases section.
- Transfer the APK to your phone and install it.
We welcome contributions! Feel free to submit a pull request or open an issue if you find bugs or want to add new features. Check out the Contributing Guidelines for more information.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or support, please reach out at:
- GitHub: @santoshvandari

