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

Add support for mirroring in the URL #2

Open
jackwilsdon opened this issue Oct 15, 2018 · 1 comment
Open

Add support for mirroring in the URL #2

jackwilsdon opened this issue Oct 15, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jackwilsdon
Copy link
Owner

Currently the Generate and GenerateImage methods accept arguments specifying whether or not the image should be mirrored on the X and Y axis, but it is hard-coded to mirror only on the X axis in the server request handler.

It'd be nice to have support for specifying how to mirror the image in the URL, much like how image size is specified;

https://ppic.now.sh/example.png?mirror=x,y

Or possibly;

https://ppic.now.sh/example.png?mirrorX=false&mirrorY

(where no value is true)

We should probably still default to mirroring on the X to preserve images as they are now.

@jackwilsdon jackwilsdon added help wanted Extra attention is needed good first issue Good for newcomers enhancement New feature or request labels Oct 15, 2018
@jackwilsdon jackwilsdon added this to the Version 1.0.0 milestone Oct 22, 2018
@jackwilsdon jackwilsdon removed this from the Version 1.0.0 milestone Dec 3, 2018
@jackwilsdon jackwilsdon added this to the Version 1.0.0 milestone Jul 20, 2019
@jackwilsdon
Copy link
Owner Author

I think a good implementation of this would be the first example I gave (with a slight alteration):

# No mirroring
https://ppic.now.sh/example.png?mirror=
# Mirroring along the X axis (default)
https://ppic.now.sh/example.png?mirror=x
# Mirroring along the Y axis
https://ppic.now.sh/example.png?mirror=y
# Mirroring along both axes
https://ppic.now.sh/example.png?mirror=xy

Any invalid axes passed with the mirroring option should probably cause an error to be returned.

@jackwilsdon jackwilsdon self-assigned this Jul 30, 2019
@jackwilsdon jackwilsdon removed good first issue Good for newcomers help wanted Extra attention is needed labels Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant