package com.heyu.api.baidu.handle.doc;


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.doc.BRemoveMoireRequest;
import com.heyu.api.baidu.response.doc.BRemoveMoireResp;
import org.springframework.stereotype.Component;

/***
 * https://console.bce.baidu.com/support/?_=1740667714316&timestamp=1740671115065#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E6%96%87%E6%A1%A3%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86&api=rest%2F2.0%2Fimage-process%2Fv1%2Fremove_moire&method=post
 *
 * 图片去摩尔纹
 *
 * 去除翻拍电脑、手机等显示屏照片中的摩尔纹，使图片更加清晰。示例图如下：
 *
 *
 */
@Component
public class BRemoveMoireHandle extends BaiduBaseHandle<BRemoveMoireRequest, BRemoveMoireResp> {


    @Override
    public String getUri() {
        return "/rest/2.0/image-process/v1/remove_moire";
    }

    @Override
    public String check(BRemoveMoireRequest bRemoveMoireRequest) {
        return checkPdf(bRemoveMoireRequest);
    }

    @Override
    public String getContent(BRemoveMoireRequest bRemoveMoireRequest) {
        return getPdfContent(bRemoveMoireRequest).toString();
    }
}
