mirror of
https://gitee.com/openharmony-tpc/ImageKnife.git
synced 2026-05-24 17:25:44 +08:00
@@ -165,7 +165,9 @@ struct DownSamplePage {
|
||||
console.error("Failed to create PixelMap")
|
||||
});
|
||||
}
|
||||
|
||||
getResourceString(res:Resource){
|
||||
return getContext().resourceManager.getStringSync(res.id)
|
||||
}
|
||||
build() {
|
||||
Scroll() {
|
||||
Column() {
|
||||
@@ -178,12 +180,12 @@ struct DownSamplePage {
|
||||
.onClick(() => {
|
||||
this.updateImageKnifeOption(item.value)
|
||||
})
|
||||
Text("降采样规格:" + item.value).fontSize(20)
|
||||
Text(this.getResourceString($r('app.string.Sampling_pecification'))+ item.value).fontSize(20)
|
||||
}
|
||||
}, (item: SamplingType) => JSON.stringify(item))
|
||||
Column() {
|
||||
Text(`未降采样大小:${this.beforeSampling}`).fontSize(20)
|
||||
Text(`降采样后大小:${this.afterSampling}`).fontSize(20)
|
||||
Text(`${this.getResourceString($r('app.string.Unreal_samples'))}:${this.beforeSampling}`).fontSize(20)
|
||||
Text(`${ this.getResourceString($r('app.string.After_the_sampling'))}:${this.afterSampling}`).fontSize(20)
|
||||
}
|
||||
|
||||
ImageKnifeComponent({
|
||||
|
||||
@@ -371,6 +371,18 @@
|
||||
{
|
||||
"name": "Image_Downsampling_Functionality",
|
||||
"value": "Downscale Image effect"
|
||||
},
|
||||
{
|
||||
"name": "Sampling_pecification",
|
||||
"value": "降采样规格"
|
||||
},
|
||||
{
|
||||
"name": "Unreal_samples",
|
||||
"value": "未降采样大小"
|
||||
},
|
||||
{
|
||||
"name": "After_the_sampling",
|
||||
"value": "降采样后大小"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -367,6 +367,18 @@
|
||||
{
|
||||
"name": "Image_Downsampling_Functionality",
|
||||
"value": "降采样功能"
|
||||
},
|
||||
{
|
||||
"name": "Sampling_pecification",
|
||||
"value": "降采样规格"
|
||||
},
|
||||
{
|
||||
"name": "Unreal_samples",
|
||||
"value": "未降采样大小"
|
||||
},
|
||||
{
|
||||
"name": "After_the_sampling",
|
||||
"value": "降采样后大小"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user