Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

brighten differs from pre v1

Aperta
#1,371 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, nodejs, typescript

Direzione di ricerca

Inizia dall'API della luminosità di Jimp e riproduci i valori riportati con Jimp 1.6.0, confrontandoli con il comportamento di v0.x descritto nell'issue. Traccia come vengono interpretati i valori da -1 a 1 e verifica che i valori zero, positivi e frazionari corrispondano al comportamento atteso indicato quando il fix è completo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Has the parameter value definition changed from Jimp 0.x to 1.x?

Expected Behavior

Brightness with a value of 0 should not affect image like it did in v0.x
Brightness with a value of 1 should fully lighten an image like it did in v0.x
Brightness with a value of -1 should fully darken an image like it did in v0.x
Brightness with a value of -0.5 should half darken an image like it did in v0.x
Brightness with a value of 0.5 should half lighten an image like it did in v0.x

Using Jimp V0.x (using Node-RED to simplify testing)
image

Current Behavior

Brightness with a value of 0 in v1.6 behaves differently - it darkens the image
Brightness with a value of 1 in v1.6 behaves differently - it has little affect on the image
Brightness with a value of -1 correctly fully darkens an image like it did in v0.x
Brightness with a value of -0.5 in v1.6 behaves differently - it FULLY darkens the image
Brightness with a value of 0.5 in v1.6 behaves differently - it half darkens the image

image

Failure Information (for bugs)

Steps to Reproduce

Demonstrating -0.5 brightness
  1. load image
    1. image
  2. invert
    1. image2
  3. apply brightness -0.5
    1. image3
Demonstrating -0.0 brightness
  1. load image
    1. image
  2. invert
    1. image2
  3. apply brightness -0.0
    1. image3
Demonstrating 1.0 brightness
  1. load image
    1. image
  2. invert
    1. image2
  3. apply brightness 1.0
    1. image3

Context

  • Jimp Version: 1.6.0
  • Operating System: Win 11
  • Node version: 18

Failure Logs

Lingua principale
TypeScript
Stelle
14.7k
Fork
777
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jimp-dev/jimp

Tutte le issue di jimp-dev/jimp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.