mirror of https://github.com/adamdruppe/arsd.git
Add example to doc comment of Gamut integration
This commit is contained in:
parent
6c9fa81e68
commit
2a6044643c
|
@ -311,6 +311,16 @@ static if (hasGamutIntegration) {
|
||||||
|
|
||||||
/++
|
/++
|
||||||
Creates a Pixmap copying the pixel data from the provided [GamutImage].
|
Creates a Pixmap copying the pixel data from the provided [GamutImage].
|
||||||
|
|
||||||
|
---
|
||||||
|
// Load image using Gamut
|
||||||
|
import gamut;
|
||||||
|
Image img;
|
||||||
|
img.loadFromFile("dunes.jpg");
|
||||||
|
|
||||||
|
// Convert to Pixmap
|
||||||
|
Pixmap pixmap = img.toPixmap();
|
||||||
|
---
|
||||||
+/
|
+/
|
||||||
bool toPixmap(ref GamutImage source, out Pixmap result) @trusted nothrow
|
bool toPixmap(ref GamutImage source, out Pixmap result) @trusted nothrow
|
||||||
in (source.isValid) {
|
in (source.isValid) {
|
||||||
|
|
Loading…
Reference in New Issue