MCPcopy
hub / github.com/xpf0000/FlyEnv / toString

Method toString

src/fork/module/Image/ImageCompressTask.ts:1190–1211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1188 }
1189
1190 toString(): string {
1191 if (this.hasError) {
1192 return `ImageCompressTask: ${this.image.path} -> 错误: ${this.errorMessage}`
1193 }
1194
1195 const savedPercentage =
1196 this.image.size > 0
1197 ? `${(((this.image.size - this.size) / this.image.size) * 100).toFixed(2)}%`
1198 : '0%'
1199
1200 let info = `ImageCompressTask: ${this.image.width}x${this.image.height} ${this.image.sizeFormatted} -> ${this.width}x${this.height} ${this.sizeFormatted} (节省${savedPercentage})`
1201
1202 if (this.hasWatermark) {
1203 info += ' [水印]'
1204 }
1205
1206 if (this.hasTexture) {
1207 info += ' [纹理]'
1208 }
1209
1210 return info
1211 }
1212}
1213
1214/**

Callers 15

imageBaseTestFunction · 0.95
manualChunksFunction · 0.45
handleBrewCheckFunction · 0.45
exec_execMethod · 0.45
getAllWindowsMethod · 0.45
getAuthUrlMethod · 0.45
generateStateMethod · 0.45
handleOpenPathByAppMethod · 0.45
showMethod · 0.45
constructorMethod · 0.45
parseHtmlPageMethod · 0.45
parseHtmlLinkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected