jhansireddy / AndroidScannerDemo

ScanLibrary is an android document scanning library built on top of OpenCV, using the app you will be able to select the exact edges and crop the document accordingly from the selected 4 edges and change the perspective transformation of the cropped image.
MIT License
1.07k stars 472 forks source link

How to save scanned images in specific directory not in pictures #131

Open vamsee9 opened 4 years ago

vamsee9 commented 4 years ago

At this string, I think we need to add folder like /AndroidScannerDemo/img.jpg

String path = MediaStore.Images.Media.insertImage(context.getContentResolver(), bitmap, "Title", null);

at this line: Line 23

nalinbansal1234 commented 4 years ago

try { String filename = "NalinBansal.jpg"; String directory = new String(Environment.getExternalStorageDirectory().getAbsolutePath() + "/myFolder"); save(directory + "/" + filename); println("File saved successfully."); }

vamsee9 commented 4 years ago

@nalinbansal1234 its pure java but andriod java is bit different I think