Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Is there a method to enlarge/upscale image without increasing the pixel thickness of the edge

I have a image need to upscale, I use sharp(node.js) to execute this action. the pixel count of the original image edge in a line of the vertical direction is about 3, after upscaling by 4 times, the result pixel count is more than 10. how can I keep the pixel thickness of the edge after scaling operation. I tried many methods and failed, the only ideal result is from the webpage service (AI Image Enlarger). can I do this on my local machine? any help would be great appreciated. Below is my code

sharp_resize(`/Users/cc/Desktop/alpha.png`, `/Users/cc/Desktop/alpha_x4.png`)
function sharp_resize(srcPath, targetPath) {

    const dimensions = sizeOf(srcPath)
    let width = dimensions.width
    let height = dimensions.height

    sharp(srcPath)
        .resize(width*4,height*4,{
            kernel: sharp.kernel.lanczos3,
        })
        .toFile(targetPath, (err, info) => { 
            console.log(`sharp resize ${targetPath}`);
        });
}

the upscaling effects

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda