提高 adobe creative SDK 中编辑图像的质量

Increasing the quality of the edited image in adobe creative SDK

我有启动 adobe creative SDK 图像编辑器的代码。

        Uri imageUri = Uri.parse(path);

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

        startActivityForResult(imageEditorIntent, 1);

我希望编辑后的图像具有最高质量。

为此传递哪些 Intent 参数?或者任何其他解决方法?

图像编辑器指南中的示例

您可以使用图像编辑器的可选方法设置图像质量。这是来自 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();

对于您的情况,您可能最感兴趣的是 .withOutputSize().withOutputQuality()

相关可选方法

来自图像编辑器指南:

  • .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).

    注意:您可以传入 Creative SDK 的 MegaPixels 枚举中的任何值,Mp0Mp30

  • .withOutputQuality(int)

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

    注意:为了获得最高质量,传入100

所有可选方法的文档

关于以上方法和所有其他可选方法的详细信息,您可以参考this section of the Creative SDK Image Editor guide