On Friday, 10 July 2015 at 04:26:49 UTC, Vladimir Panteleev wrote:
On Monday, 6 July 2015 at 13:48:53 UTC, Rikki Cattermole wrote:
Docs: http://cattermole.co.nz/phobosImage/docs/html/
Source: http://cattermole.co.nz/phobosImage/
If reviewing the code itself is too much of a hassel, please
review the specification document.
http://cattermole.co.nz/phobosImage/docs/html/std_experimental_image_specification.html
Some example code using this library would be much more concise
than the above. Can you provide some?
I haven't really gotten to that point.
But currently what I want it to support is:
write("output.png", image
.flipHorizontalRange
.flipVerticalRange
.rotate90Range
.copyInto(new TheImage!RGB8(2, 2))
.asPNG().toBytes);
I have an idea similar to copyInto except:
.copyIntoTemporary!TheImage(allocator) // return
SwappableImage!(ImageColor!TheImage)(allocator.make!TheImage,
allocator); // auto ref return type
Basically SwappableImage can already deallocate the original
storage instance when it's destructor gets called. If provided
with the allocator. Same with RangeOf.