mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Docs: update the "make a transparent image" example (#1316)
Alpha for colour is between 0-1, not 0-255.
This commit is contained in:
@@ -55,7 +55,7 @@ sharp({
|
||||
width: 300,
|
||||
height: 200,
|
||||
channels: 4,
|
||||
background: { r: 255, g: 0, b: 0, alpha: 128 }
|
||||
background: { r: 255, g: 0, b: 0, alpha: 0.5 }
|
||||
}
|
||||
})
|
||||
.png()
|
||||
|
||||
Reference in New Issue
Block a user