added tons of features

This commit is contained in:
2025-02-05 08:01:14 +02:00
parent 4ae0d8c545
commit 8138da6b1d
195 changed files with 12619 additions and 415 deletions

30
lib/module/image.ts Normal file
View File

@@ -0,0 +1,30 @@
import im from 'imagemagick'
import fs from 'node:fs'
const originalImage =
'w:\\share\\work\\sb528990\\data\\ВістаменЛібідо\\IMG_1928_Crop.JPG'
if (!fs.existsSync(originalImage)) {
const sizes = [360, 640, 1024]
for (const i in sizes) {
const size = sizes[i]
const outImage = `w:\\share\\work\\sb528990\\data\\ВістаменЛібідо\\vistamen-libido-feature-${size}x${size}.jpg`
im.resize(
{
srcPath: originalImage,
dstPath: outImage,
quality: 0.84,
format: 'jpg',
width: size,
height: size,
filter: 'sinc',
strip: true
},
function (err: any) {
if (err) throw err
console.log(`resized IMG_1928_Crop.JPG to fit within ${size}x${size}px`)
}
)
}
}