Comments (4)
We can use https://www.npmjs.com/package/node-exiftool to help with this (this library can read & write exif)
Edit: this library requires another one to be installed top level. So this is a no go.
What about https://github.com/hometlt/png-metadata or https://github.com/kujirahand/node-png-metadata? it's not really about exif data but other kind of metadata. It only works for PNG but jest-image-snapshot
also only supports them
from jest-image-snapshot.
If that's something we want to do, I can propose a PR
from jest-image-snapshot.
I look a bit into it, and manipulate EXIF can be tricky: there is plenty we can do and I don't think there is much we'd like to do from the jest-image-snapshot
point of view.
One thing we could do is expose a hook for just before writing a file to the FS:
type OnBeforeWriteToDisk = (arguments: {
buffer: Buffer; testPath: string; destination: string; /* others */
}) => Buffer
So that people could be free to do what they want with it, and while keeping the full control on how to write to disk
from jest-image-snapshot.
I opened #337 to solve this
from jest-image-snapshot.
Related Issues (20)
- The "path" argument must be of type string. Received undefined HOT 3
- Advice for handling visual discrepancies between Intel and Apple Silicon images HOT 11
- Screenshot name for received image HOT 9
- support jest 29 HOT 1
- TypeError: Cannot read properties of undefined (reading '_counters') HOT 1
- Please add optional peer dependency HOT 1
- [Feature Request]: would it be possible to make the inline image diff size configurable?
- failureThresholdType=percent is confusing HOT 1
- `updatePassedSnapshot` updates all snapshot regardless of jest `--updatesnapshot` value HOT 1
- Allow custom comparisonMethod
- Reporting a vulnerability HOT 1
- storeReceivedOnFailure refuses to store received images in a CI environment HOT 1
- Always generate diff snapshots HOT 1
- Scrolled to bottom element screenshot clips bottom HOT 1
- [BUG] Outdated-snapshot-reporter fails with custom snapshot ids
- Vitest currentTestName causing ENAMETOOLONG HOT 2
- snapshot fails ignoring diff failureThreshold HOT 1
- Could customSnapshotDir be a callback?
- Clarify what "unique customSnapshotIdentifier" means when using with jest.retryTimes()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-image-snapshot.