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 option to being able to perform basic transformation on images (rotate/mirror) #421

Open
martonmiklos opened this issue Sep 7, 2024 · 1 comment

Comments

@martonmiklos
Copy link
Contributor

martonmiklos commented Sep 7, 2024

While working on #418 I got an idea: I used to create images in left and right variants for different connector orientations:
kép
kép

It would be great if the wireviz would provide option least for horizontal mirroring of the images. If we there at the implementation rotating vertical mirroring too.

Comments, concerns, ideas welcome in this topic!

@kvid
Copy link
Collaborator

kvid commented Sep 10, 2024

I do see the usefulness in such simple image processing (mirror, rotate, and maybe crop), and it isn't too hard to do each of them, but we also need to create and write the result to a temporary image file with a name that doesn't conflict with other names reachable through the image_paths - and optionally delete it again in a final clean-up step when no longer needed. A similar need is also described in #322 (comment) - a common code should be created.

If more than one processing step should be allowed for the same image, then their order must be specified, and I guess a list of processing steps is the most flexible in that case, e.g. something like this:

    image:
      ...
      process:  # or "processing"?
        - crop: 0-100x0-200
        - flip: left-right
        - rotate: 180

Such a syntax could also allow a single processing step as an alternative to a list, similar to what #292 suggests for the image attribute.

Do you know any other additional image processing steps that might be requested in the future?

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

No branches or pull requests

2 participants