|
@@ -29,12 +29,17 @@ export async function addWatermark(
|
|
|
y = imageHeight * y;
|
|
|
if (!gm) {
|
|
|
gm =
|
|
|
- store.config.imagemagick != undefined
|
|
|
+ store.config.imagemagickDev != undefined
|
|
|
? require("gm").subClass({
|
|
|
imageMagick: true,
|
|
|
- appPath: store.config.imagemagick,
|
|
|
+ appPath: store.config.imagemagickDev,
|
|
|
})
|
|
|
- : require("gm");
|
|
|
+ : require("gm").subClass({
|
|
|
+ imageMagick: true,
|
|
|
+ appPath: path.join(__dirname, "../../imagemagick/"), // windows打包进程序了
|
|
|
+ });
|
|
|
+ // console.log(path.join(__dirname, "../../imagemagick/"));
|
|
|
+ // console.log(path.join(__dirname, store.config.imagemagickDev));
|
|
|
}
|
|
|
if (fs.existsSync(file) && store.pageInputs["/image-download"].append) {
|
|
|
console.log(file + " already exists");
|