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

Option to save png without date #369

Closed
Artoria2e5 opened this Issue Mar 29, 2018 · 3 comments

Comments

2 participants
@Artoria2e5
Copy link

Artoria2e5 commented Mar 29, 2018

Despite having called .strip() on the images, wand always saves pngs with date-create and date-modify timestamps. This introduces a nondeterministic element into the files.

According to this post, convert can accept a -define png:exclude-chunks=date setting to modify its behavior. The equivalent call for C would be MagickSetImageArtifact(wand, "png:exclude-chunks", "date").

@Artoria2e5

This comment has been minimized.

Copy link

Artoria2e5 commented Mar 29, 2018

(It would be great to have a general-purpose interface for setting artifacts too, since there are so many good things you can use from there. The API appears just enough for making a dict-like interface.)

@emcconville

This comment has been minimized.

Copy link
Owner

emcconville commented Nov 2, 2018

The refactor/library_loading may already support this. Checkout the branch, and try the following

from wand.image import Image
with Image(...) as img:
    img.options['png:exclude-chunks']='date'
@emcconville

This comment has been minimized.

Copy link
Owner

emcconville commented Nov 20, 2018

Created a general-purpose interface for image artifacts. Don't think it'll work for global date attributes (at least not on my local IM version), but will work for other Artifacts.

with Image(filename='input.png') as img:
        img.artifacts['png:exclude-chunks'] = 'tIME'
        img.save(filename='output.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment