You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
File outputFile = FileUtils.genEditFile();
try {
Intent intent = new ImageEditorIntentBuilder(this, root, outputFile.getAbsolutePath())
.withAddText() // Add the features you need
.withPaintFeature()
.withFilterFeature()
.withRotateFeature()
.withCropFeature()
.withBrightnessFeature()
.withSaturationFeature()
.withBeautyFeature()
.withStickerFeature()
.forcePortrait(true) // Add this to force portrait mode (It's set to false by default)
.setSupportActionBarVisibility(false) // To hide app's default action bar
.build();
EditImageActivity.start(ImagePriview.this, intent, PHOTO_EDITOR_REQUEST_CODE);
} catch (Exception e) {
Log.e("Demo App", e.getMessage()); // This could throw if either sourcePath or outputPath is blank or Null
}
than cretate FileUtils Class:
public class FileUtils {
public static final String FOLDER_NAME = "Destination File Name";
File outputFile = FileUtils.genEditFile();
try {
Intent intent = new ImageEditorIntentBuilder(this, root, outputFile.getAbsolutePath())
.withAddText() // Add the features you need
.withPaintFeature()
.withFilterFeature()
.withRotateFeature()
.withCropFeature()
.withBrightnessFeature()
.withSaturationFeature()
.withBeautyFeature()
.withStickerFeature()
.forcePortrait(true) // Add this to force portrait mode (It's set to false by default)
.setSupportActionBarVisibility(false) // To hide app's default action bar
.build();
EditImageActivity.start(ImagePriview.this, intent, PHOTO_EDITOR_REQUEST_CODE);
} catch (Exception e) {
Log.e("Demo App", e.getMessage()); // This could throw if either
sourcePath
oroutputPath
is blank or Null}
than cretate FileUtils Class:
public class FileUtils {
public static final String FOLDER_NAME = "Destination File Name";
File baseDir;
if (android.os.Build.VERSION.SDK_INT < 8) {
baseDir = Environment.getExternalStorageDirectory();
} else {
baseDir = Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
}
if (baseDir == null)
return Environment.getExternalStorageDirectory();
File aviaryFolder = new File(baseDir, FOLDER_NAME);
if (aviaryFolder.exists())
return aviaryFolder;
if (aviaryFolder.isFile())
aviaryFolder.delete();
if (aviaryFolder.mkdirs())
return aviaryFolder;
return Environment.getExternalStorageDirectory();
}
}
fileutility.zip
Originally posted by @ravi-savaj in #75 (comment)
The text was updated successfully, but these errors were encountered: