V 2.2.7 lama iopaint 去水印
This commit is contained in:
@@ -5,6 +5,15 @@ import { DEFINE_STRING } from "../define/define_string"
|
||||
const img = {
|
||||
// 加载当前链接的SD服务数据
|
||||
OneSplitFour: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.IMG.ONE_SPLIT_FOUR, value)),
|
||||
|
||||
// 将base64的图片转换为文件
|
||||
Base64ToFile: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.IMG.BASE64_TO_FILE, value)),
|
||||
|
||||
// 请求图片处理,去除水印
|
||||
ProcessImage: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.IMG.PROCESS_IMAGE, value)),
|
||||
|
||||
//批量处理图片,去除水印
|
||||
BatchProcessImage: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.IMG.BATCH_PROCESS_IMAGE, value)),
|
||||
}
|
||||
export {
|
||||
img
|
||||
|
||||
@@ -5,6 +5,7 @@ import { discord } from './discord.js';
|
||||
import { mj } from './mj.js';
|
||||
import { sd } from './sd.js';
|
||||
import { img } from './img.js';
|
||||
import { system } from './system.js';
|
||||
// Custom APIs for renderer
|
||||
|
||||
let events = [];
|
||||
@@ -413,6 +414,7 @@ if (process.contextIsolated) {
|
||||
contextBridge.exposeInMainWorld('discord', discord)
|
||||
contextBridge.exposeInMainWorld("sd", sd)
|
||||
contextBridge.exposeInMainWorld("img", img)
|
||||
contextBridge.exposeInMainWorld("system", system)
|
||||
contextBridge.exposeInMainWorld('darkMode', {
|
||||
toggle: (value) => ipcRenderer.invoke('dark-mode:toggle', value),
|
||||
})
|
||||
@@ -426,5 +428,6 @@ if (process.contextIsolated) {
|
||||
window.discord = discord;
|
||||
window.sd = sd;
|
||||
window.img = img;
|
||||
window.system = system;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ipcRenderer } from "electron"
|
||||
import { DEFINE_STRING } from "../define/define_string"
|
||||
|
||||
|
||||
const system = {
|
||||
// 打开指定的文件
|
||||
OpenFile: async (value, callback) => callback(ipcRenderer.send(DEFINE_STRING.SYSTEM.OPEN_FILE, value)),
|
||||
}
|
||||
export {
|
||||
system
|
||||
}
|
||||
Reference in New Issue
Block a user