![Image Difference Generator avatar](https://images.apifyusercontent.com/t-8g4uYSKdLR0_ZEyAWwGybwo7kb9mQ2wpog4oy4BHo/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9lWGRwbjlSWmZ4RWhrSEhIci8zUlRaZ205Z2RzalptUFc2Zy1jb21wYXJlLnBuZw.webp)
Image Difference Generator
Try for free
No credit card required
View all Actors![Image Difference Generator](https://images.apifyusercontent.com/t-8g4uYSKdLR0_ZEyAWwGybwo7kb9mQ2wpog4oy4BHo/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9lWGRwbjlSWmZ4RWhrSEhIci8zUlRaZ205Z2RzalptUFc2Zy1jb21wYXJlLnBuZw.webp)
![Image Difference Generator](https://images.apifyusercontent.com/t-8g4uYSKdLR0_ZEyAWwGybwo7kb9mQ2wpog4oy4BHo/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9lWGRwbjlSWmZ4RWhrSEhIci8zUlRaZ205Z2RzalptUFc2Zy1jb21wYXJlLnBuZw.webp)
Image Difference Generator
apify/image-diff
Try for free
No credit card required
Returns a difference of two given images as JPEG or PNG image.
Do you want to learn more about this Actor?
Get a demoThe code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7 "imageUrl1": "https://raw.githubusercontent.com/mapbox/pixelmatch/master/test/fixtures/4a.png",
8 "imageUrl2": "https://raw.githubusercontent.com/mapbox/pixelmatch/master/test/fixtures/4b.png",
9 "pixelmatchOptions": {
10 "threshold": 0.1
11 },
12 "proxy": {
13 "useApifyProxy": true
14 }
15}
16EOF
17
18# Run the Actor using an HTTP API
19# See the full API reference at https://docs.apify.com/api/v2
20curl "https://api.apify.com/v2/acts/apify~image-diff/runs?token=$API_TOKEN" \
21 -X POST \
22 -d @input.json \
23 -H 'Content-Type: application/json'
Developer
Maintained by Apify
Actor metrics
- 3 monthly users
- 4 stars
- 93.8% runs succeeded
- Created in Oct 2018
- Modified 3 months ago
Categories