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

Forced output format can sometimes be ignored when chained #1528

Closed
lovell opened this issue Jan 1, 2019 · 3 comments
Closed

Forced output format can sometimes be ignored when chained #1528

lovell opened this issue Jan 1, 2019 · 3 comments

Comments

@lovell
Copy link
Owner

lovell commented Jan 1, 2019

As reported in #1156 (comment)

Use of the following:

sharp
  .png({
    force: true
  })
  .jpeg({
    force: false
  })

should produce PNG output for JPEG input, but instead produces JPEG output.

Need to modify the logic in the internal _updateFormatOut function to only update when force: true.

@lovell
Copy link
Owner Author

lovell commented Jan 1, 2019

Commit 30ca424 adds the fix plus a test that would previously have failed.

@polarathene
Copy link

@lovell awesome thanks for this :)

I see that the v0.21.2 milestone is slowly growing with linked issues(all presently marked ready-to-ship), do you have any plans on when to release?(if it's a while away I guess I could build from the commit for now).

@lovell
Copy link
Owner Author

lovell commented Jan 13, 2019

v0.21.2 now available.

@lovell lovell closed this as completed Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants