Initial feedback for std.experimental.image
Rikki Cattermole via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 3 06:18:50 PDT 2015
On Thursday, 3 September 2015 at 10:28:50 UTC, Suliman wrote:
> Hi! Is there any progress?
Update, during todays stream.
Instead of adding scew manipulation instead adding range clever
support functions (createImageFrom and assignTo).
ImageImpl image1; // input
ImageImpl[2] image2; // buffers
write("myfile.png",
image1.rangeOf
.map!(p => {
p.y += p.x * addY;
p.height = addY * p.height;
})
.createImageFrom!ImageImpl(image2[0], theAllocator())
.assignTo(image2[0], RGB8(255, 255, 255))
.rangeOf
.flipHorizontalRange
.rotate90Range
.flipVerticalRange
.createImageFrom!ImageImpl(image2[1], theAllocator())
.copyInto(image2[1])
.asPNG.toBytes()
);
theAllocator().dispose(image[0]);
theAllocator().dispose(image[1]);
More information about the Digitalmars-d
mailing list