MikeWey/DMagick — Issue #1: format() call hijack and length comparison mismatch
Author: AndrejMitrovic
Created: 2011-11-04 23:12:02+00:00
State: open

dmagick.Image.d, Line 1357:

throw new ImageException(format("Pixel buffer needs more storage for %s channels.", map));

causes:
..\DMagick\dmagick\Image.d(1357): Error: function dmagick.Image.Image.format () const is not callable using argument types (string,string)

Image.format hijacked std.string.format, use this or introduce an alias:

throw new ImageException(std.string.format("Pixel buffer needs more storage for %s channels.", map));

Also, I think this comparison is not right:

if ( pixels.length <= (area.width * area.height) * map.count )

it should be:

if ( pixels.length < (area.width * area.height) * map.count )

There's no reason to fail if the buffer has the exact amount of space needed.