Search code examples
androidimage-editingadobecreativesdk

Increasing the quality of the edited image in adobe creative SDK


I have this code to launch the adobe creative SDK image editor.

        Uri imageUri = Uri.parse(path);

        Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
                .setData(imageUri)
                .build();

        startActivityForResult(imageEditorIntent, 1);

I want the edited image be in highest quality.

What Intent parameters be passed for that ? Or any other workaround ?


Solution

  • Example from the Image Editor guide

    You can set the image quality with the Image Editor's optional methods. Here is an example from the Creative SDK's Image Editor guide:

    Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
        .setData(uri) // input image source
        .withOutput(Uri.parse("file://" + getFilesDir() + "/my-pic-name.jpg")) // output file destination
        .withOutputFormat(Bitmap.CompressFormat.JPEG) // output format
        .withOutputSize(MegaPixels.Mp5) // output size
        .withOutputQuality(90) // output quality
        .build();
    

    In your case, you might mostly be interested in .withOutputSize() and .withOutputQuality().

    Relevant optional methods

    From the Image Editor guide:

    • .withOutputSize(MegaPixels)

      Sets the output file size (in megapixels).

      If this method is not called, or a value of 0 is passed, then the preview sized image will be returned (usually the screen size of the device).

      Note: you can pass in any value from the Creative SDK's MegaPixels enum, Mp0 to Mp30.

    • .withOutputQuality(int)

      If the outputformat is JPEG, defines the quality of the saved JPEG image.

      Note: for maximum quality, pass in 100.

    Documentation for all optional methods

    For details on the methods above and all other optional methods, you can refer to this section of the Creative SDK Image Editor guide.