mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02: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:
parent
4589b15dea
commit
2de062a34a
@ -55,7 +55,7 @@ sharp({
|
|||||||
width: 300,
|
width: 300,
|
||||||
height: 200,
|
height: 200,
|
||||||
channels: 4,
|
channels: 4,
|
||||||
background: { r: 255, g: 0, b: 0, alpha: 128 }
|
background: { r: 255, g: 0, b: 0, alpha: 0.5 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.png()
|
.png()
|
||||||
|
@ -81,7 +81,7 @@ const debuglog = util.debuglog('sharp');
|
|||||||
* width: 300,
|
* width: 300,
|
||||||
* height: 200,
|
* height: 200,
|
||||||
* channels: 4,
|
* channels: 4,
|
||||||
* background: { r: 255, g: 0, b: 0, alpha: 128 }
|
* background: { r: 255, g: 0, b: 0, alpha: 0.5 }
|
||||||
* }
|
* }
|
||||||
* })
|
* })
|
||||||
* .png()
|
* .png()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user