feat: 颜色上传可以从library选择&历史列表参数修改

This commit is contained in:
zhangyh
2025-09-24 11:51:22 +08:00
parent 05e9bada5a
commit 3e3b8b17fe
8 changed files with 184 additions and 57 deletions

View File

@@ -155,6 +155,12 @@ const base64toFile = (dataurl, filename = 'file') => {//转换base64
}
const UrlToFile = async (url, imageName) => {
const response = await fetch(url)
const blob = await response.blob()
return new File([blob], imageName, { type: 'image/png' })
}
function rgbToHsv([R, G, B]) {//根据rgb获取hsv
R /= 255
G /= 255
@@ -613,25 +619,26 @@ function segmentImage(markerImage,fullImage,size){
})
}
export {
isEmail,
getUploadUrl,
getUniversalZoomLevel,
rgbaToHex,
getMinioUrl,
base64ToFile,
dataURLtoFile,
blobToFile,
base64toFile,
rgbToHsv,
formatTime,
dataURLtoBlob,
isMoible,
downloadIamge,
downloadVideoWithFetch,
getBrowserInfo,
setPubDate,
murmur,
setGradual,
calculateGradientCoordinate,
segmentImage,
isEmail,
getUploadUrl,
getUniversalZoomLevel,
rgbaToHex,
getMinioUrl,
base64ToFile,
dataURLtoFile,
blobToFile,
base64toFile,
rgbToHsv,
formatTime,
dataURLtoBlob,
isMoible,
downloadIamge,
downloadVideoWithFetch,
getBrowserInfo,
setPubDate,
murmur,
setGradual,
calculateGradientCoordinate,
segmentImage,
UrlToFile
}