我有这段代码来启动Adobe Creative SDK图像编辑器。
Uri imageUri = Uri.parse(path);
Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
.setData(imageUri)
.build();
startActivityForResult(imageEditorIntent, 1);
我希望编辑后的图像具有最高质量。
为此要传递哪些Intent参数?或任何其他解决方法?
您可以使用图像编辑器的可选方法设置图像质量。这是Creative SDK的“图像编辑器”指南中的示例:
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)
设置输出文件的大小(以百万像素为单位)。
如果未调用此方法,或者传递的值为0,则将返回预览尺寸的图像(通常是设备的屏幕尺寸)。
注意:您可以将Creative SDKMegaPixels
枚举中的任何值传递Mp0
给Mp30
。
.withOutputQuality(int)
如果输出格式为JPEG,则定义保存的JPEG图像的质量。
注意:要获得最高质量,请传入100
。
有关上述方法和所有其他可选方法的详细信息,您可以参考Creative SDK图像编辑器指南的本部分。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句