imagemagick-stream
imagemagick-stream copied to clipboard
Can't issue "+" options?
I'm trying to do a crop, followed by a rotate, followed by another crop. However, for the last crop to work, I need a "+repage" right before it. I can't see any way to do this, as both "set" and "op" insert a "-" and nothing I can see inserts a "+" before the command.
Is there some other way I can get it to work?
As a workaround, op("repage", "0x0+0+0") gets rid of the "Error: convert: geometry does not contain image" exception, but there may be other "+" options that don't have an equivalent "-"...
That's interesting. I've never actually used the +
operators myself. Would allowing something like .op('+repage', ...)
be enough for your use case?
@eivindfjeldstad I think so... Probably a simple change like this would work:
op (key, val) {
this[operators].push(`${key[0]!='+'?'-':''}${key}`);
I don't have a lot of spare time right now, but PR is welcome:)