|
@@ -3,7 +3,7 @@
|
|
|
<el-container style="user-select: none; height: 100vh;">
|
|
|
<el-container>
|
|
|
<!-- #333744 -->
|
|
|
- <el-aside width="180px" style="border-right: 1px solid #fafafa; background-color: #333744;">
|
|
|
+ <el-aside width="170px" style="border-right: 1px solid #fafafa; background-color: #333744;">
|
|
|
<p class="soft-name" style="-webkit-app-region: drag; color: #fff;">
|
|
|
<img src="../assets/image/icon.png" class="soft-icon" />
|
|
|
{{productName}}
|
|
@@ -90,14 +90,14 @@
|
|
|
<el-image style="width: 30px; height: 30px" :src="row.path" fit="contain"></el-image>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column field="size" title="大小" min-width="100">
|
|
|
+ <vxe-column field="size" title="大小" min-width="100" max-width="120">
|
|
|
<template #default="{ row }">
|
|
|
<span v-if="row.width == 0 && row.height == 0">-</span>
|
|
|
<span v-else>{{row.size}}</span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
|
|
|
- <vxe-column field="width" title="尺寸" min-width="110">
|
|
|
+ <vxe-column field="width" title="尺寸" min-width="110" max-width="130">
|
|
|
<template #default="{ row }">
|
|
|
<span v-if="row.width == 0 && row.height == 0">{{'加载中 '+row.loadPercent+'%'}}</span>
|
|
|
<span v-else>{{row.width + '*' + row.height}}</span>
|
|
@@ -227,22 +227,30 @@
|
|
|
<label class="handle-label">颜色:</label>
|
|
|
<el-select size="small" v-model="handleData.color" style="width:100px;" @change="handleImg">
|
|
|
<el-option value="0" label="原图"></el-option>
|
|
|
- <el-option value="1" label="低彩"></el-option>
|
|
|
+ <!-- <el-option value="1" label="低彩"></el-option> -->
|
|
|
<el-option value="2" label="灰度"></el-option>
|
|
|
<el-option value="3" label="反转"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="handle-item">
|
|
|
+ <label class="handle-label">颜色量:</label>
|
|
|
+ <el-slider v-model="handleData.colorValue" class="info-input" @change="handleImg" :min="1" :max="256"></el-slider>
|
|
|
+ {{handleData.colorValue}}
|
|
|
+ </div>
|
|
|
+ <div class="handle-item">
|
|
|
<label class="handle-label">对比度:</label>
|
|
|
- <el-slider v-model="handleData.contrastValue" class="info-input" @change="handleImg"></el-slider>
|
|
|
+ <el-slider v-model="handleData.contrastValue" class="info-input" @change="handleImg" :min="-100" :max="100"></el-slider>
|
|
|
+ {{handleData.contrastValue}}
|
|
|
</div>
|
|
|
<div class="handle-item">
|
|
|
<label class="handle-label">亮度:</label>
|
|
|
- <el-slider v-model="handleData.brightnessValue" class="info-input" @change="handleImg"></el-slider>
|
|
|
+ <el-slider v-model="handleData.brightnessValue" class="info-input" :min="-100" :max="100" @change="handleImg"></el-slider>
|
|
|
+ {{handleData.brightnessValue}}
|
|
|
</div>
|
|
|
<div class="handle-item">
|
|
|
<label class="handle-label">透明度:</label>
|
|
|
- <el-slider v-model="handleData.opacityValue" class="info-input" @change="handleImg"></el-slider>
|
|
|
+ <el-slider v-model="handleData.opacityValue" class="info-input" @change="handleImg"></el-slider>
|
|
|
+ {{handleData.opacityValue}}
|
|
|
</div>
|
|
|
<div class="handle-item">
|
|
|
<label class="handle-label">边框:</label>
|
|
@@ -505,10 +513,10 @@
|
|
|
<span style="font-size: 12px; color: #666;">(原始尺寸{{cropOptionsImgInfo.originalWidth}}:{{cropOptionsImgInfo.originalHeight}})</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<div style="text-align: center;">
|
|
|
+ <el-badge v-if="cropOptions.cropType == '2' && cropOptions.cropClassify != '1'" is-dot style="font-size: 12px;">裁剪尺寸大于原图尺寸时,会等比例放大原图后进行裁剪</el-badge>
|
|
|
<el-button style="margin: 20px 0;" type="info" @click="setModal = true;">应用全部</el-button>
|
|
|
<el-button type="info" plain @click="resetModal = true;">重置设置</el-button>
|
|
|
</div>
|
|
@@ -875,8 +883,9 @@ export default {
|
|
|
scaling: 90, // 缩放比例
|
|
|
rotateValue: 0, // 旋转角度
|
|
|
color: '0', // 图片色彩
|
|
|
- brightnessValue: 50, // 亮度
|
|
|
- contrastValue: 50, // 对比度
|
|
|
+ colorValue: 256,
|
|
|
+ brightnessValue: 0, // 亮度
|
|
|
+ contrastValue: 0, // 对比度
|
|
|
opacityValue: 100, // 透明度
|
|
|
compressScaling:100,
|
|
|
compressOutType:2,
|
|
@@ -1395,8 +1404,9 @@ export default {
|
|
|
color: '0', // 图片色彩
|
|
|
sizeType: '1', // 调整尺寸
|
|
|
scaling: 90, // 缩放比例
|
|
|
- brightnessValue: 50, // 亮度
|
|
|
- contrastValue: 50, // 对比度
|
|
|
+ colorValue: 256,
|
|
|
+ brightnessValue: 0, // 亮度
|
|
|
+ contrastValue: 0, // 对比度
|
|
|
rotateValue: 0, // 旋转角度
|
|
|
opacityValue: 100, // 透明度
|
|
|
compressScaling:100,
|
|
@@ -2072,7 +2082,7 @@ export default {
|
|
|
let extraParams2 = [];
|
|
|
let extraParams3 = [];
|
|
|
if (this.handleData.color == '1') { // 色彩
|
|
|
- extraParams2 = ['-colors',245];
|
|
|
+ // extraParams2 = ['-colors',245];
|
|
|
} else if (this.handleData.color == '2') { // 灰色
|
|
|
extraParams2 = ['-type','Grayscale'];
|
|
|
} else if (this.handleData.color == '3') { // 反转
|
|
@@ -2087,8 +2097,10 @@ export default {
|
|
|
'convert.exe',
|
|
|
imgInfo.path,
|
|
|
'-monitor',
|
|
|
+ '-colors',
|
|
|
+ this.handleData.colorValue,
|
|
|
'-brightness-contrast',
|
|
|
- `${Number(this.handleData.brightnessValue-50)}/${Number(this.handleData.contrastValue-50)}`,
|
|
|
+ `${Number(this.handleData.brightnessValue)}/${Number(this.handleData.contrastValue)}`,
|
|
|
'-alpha', 'set', '-channel', 'A', '-evaluate', 'Multiply', this.handleData.opacityValue/100, '+channel',
|
|
|
...extraParams2,
|
|
|
...extraParams3,
|