LuckSiege / LuckSiege/PictureSelector

关于添加水印后图像文件的处理。

Open
#2,913 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

大佬您好,我想问下我使用setAddBitmapWatermarkListener()添加水印后,拍一次照总共包含了两张图像,即我拍摄时的原图像 和 添加水印后的图像。 这里是否有什么函数能够只保存含有水印的图像呢? 还是说我每次还是需要自行删除原图?
```
// 获取图片
PictureSelector.create(getContext())
.openCamera(SelectMimeType.ofImage()) // 直接启动相机摄像头拍照
.setAddBitmapWatermarkListener(getAddBitmapWatermarkListener()) // 添加水印
.setLanguage(LanguageConfig.SYSTEM_LANGUAGE)
.isOriginalControl(true) // 开启原图功能
.setOutputCameraDir(getSandboxPhotoOutputPath())
.setOutputCameraImageFileName(picFileName)
.setSelectedData(imgAdapter.getData()).forResult(new OnResultCallbackListener() {
@Override
public void onResult(ArrayList result) {
if (onSuccessListener != null) {
onSuccessListener.onSuccess();
}
analyticalPhotoResults(result);
}

@Override
public void onCancel() {
Log.i("Report", "PictureSelector Cancel");
}
});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the camera flow using setAddBitmapWatermarkListener() and isOriginalControl(true), then trace how the two resulting images are exposed through the OnResultCallbackListener result. The work is complete when the behavior for retaining only the watermarked image is defined and implemented or documented, including what happens to the original image.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.