Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't issue "+" options? #33

Open
michael-ts opened this issue May 28, 2018 · 4 comments · May be fixed by #39
Open

Can't issue "+" options? #33

michael-ts opened this issue May 28, 2018 · 4 comments · May be fixed by #39

Comments

@michael-ts
Copy link

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?

@michael-ts
Copy link
Author

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 "-"...

@eivindfjeldstad
Copy link
Owner

eivindfjeldstad commented May 30, 2018

That's interesting. I've never actually used the + operators myself. Would allowing something like .op('+repage', ...) be enough for your use case?

@michael-ts
Copy link
Author

@eivindfjeldstad I think so... Probably a simple change like this would work:

op (key, val) {
  this[operators].push(`${key[0]!='+'?'-':''}${key}`);

@eivindfjeldstad
Copy link
Owner

I don't have a lot of spare time right now, but PR is welcome:)

marcusteh1238 added a commit to marcusteh1238/imagemagick-stream that referenced this issue Apr 26, 2021
@marcusteh1238 marcusteh1238 linked a pull request Apr 26, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants