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 keep metadata #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

gtuk
Copy link

@gtuk gtuk commented Oct 17, 2020

This PR adds the option to preserve the image metadata. More explanation https://manpages.debian.org/stretch/optipng/optipng.1.en.html

'-clobber',
'-o',
options.optimizationLevel,
'-out',
execBuffer.output
];

if (options.strip) {
arguments_.unshift('all');
arguments_.unshift('-strip');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use .push. And one call is enough.

@@ -93,6 +93,13 @@ Default: `true`

A reasonable amount of effort will be spent to try to recover as much data as possible of a broken image, but the success cannot generally be guaranteed.

##### strip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
##### strip
##### stripMetadata

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but wouldn't that strip metadata? Or would that be too simple

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you're asking. I'm saying the option should be named better as it only strips metadata.

@straub
Copy link

straub commented May 17, 2022

Hey folks, -strip all causes optipng to break my APNG files, so it would be very nice to be able to turn this off. Would anybody mind if I resubmitted this PR with the changes requested?

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 this pull request may close these issues.

4 participants