Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Add rotate pipe#39

Open
TheDelta wants to merge 2 commits intoMarcusCemes:mainfrom
TheDelta:feat/rotate-pipe
Open

Add rotate pipe#39
TheDelta wants to merge 2 commits intoMarcusCemes:mainfrom
TheDelta:feat/rotate-pipe

Conversation

@TheDelta
Copy link
Contributor

Checklist

  • read and understood the contributing guidelines
  • updated tests
  • updated documentation (skipped, all pipes must be documented later on)
  • npm run build and npm test passes

Affected core subsystem(s)
core

Description of change
Added a basic rotate pipe (https://sharp.pixelplumbing.com/api-operation#rotate) because images (from Smartphone for example) will loose rotation information due to compress. In order to fix this, a rotate will be made before which takes the EXIF data into account if no arguments are provided. (see https://stackoverflow.com/questions/48716266/sharp-image-library-rotates-image-when-resizing)

It was a copy paste from the resize pipe, but it does it's job nicely.
Eventually in the future it would be great to offer an advanced pipe, which exposes a sharp instance and allows to chain multiple sharp operations together. ;)

@MarcusCemes is this sharp.concurrency(1); needed in each core pipe at the top? Is this used because ipp already exposes it's own concurrency?

@TheDelta
Copy link
Contributor Author

@MarcusCemes does this look fine to you?
Should there be maybe a generic pipe which exposes sharp to allow more advanced steps?

I did only test with with TypeScript / CLI. The rotate pipe should work with yaml / json fine tough.

Also this:

@MarcusCemes is this sharp.concurrency(1); needed in each core pipe at the top? Is this used because ipp already exposes it's own concurrency?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant