Image Difference Generator avatar
Image Difference Generator
Try for free

No credit card required

View all Actors
Image Difference Generator

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.

The 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

Node.js

Python

curl

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
  • 4 monthly users
  • 96.7% runs succeeded
  • days response time
  • Created in Oct 2018
  • Modified 7 months ago
Categories