{"id":23920724,"url":"https://github.com/wannabeog/snipit","last_synced_at":"2025-10-09T18:10:20.441Z","repository":{"id":76194117,"uuid":"128742232","full_name":"wannabeOG/SnipIt","owner":"wannabeOG","description":"C++ implementation of ELA to detect any external changes made to an image through an image editing software","archived":false,"fork":false,"pushed_at":"2019-11-18T09:43:55.000Z","size":3709,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T22:11:30.666Z","etag":null,"topics":["c-plus-plus","cython-wrapper","image-processing","opencv"],"latest_commit_sha":null,"homepage":"https://fotoforensics.com/tutorial-ela.php","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wannabeOG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-09T08:49:59.000Z","updated_at":"2024-04-04T05:27:36.000Z","dependencies_parsed_at":"2023-03-11T21:44:25.277Z","dependency_job_id":null,"html_url":"https://github.com/wannabeOG/SnipIt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wannabeOG/SnipIt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wannabeOG%2FSnipIt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wannabeOG%2FSnipIt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wannabeOG%2FSnipIt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wannabeOG%2FSnipIt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wannabeOG","download_url":"https://codeload.github.com/wannabeOG/SnipIt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wannabeOG%2FSnipIt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001951,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","cython-wrapper","image-processing","opencv"],"created_at":"2025-01-05T15:53:37.683Z","updated_at":"2025-10-09T18:10:20.436Z","avatar_url":"https://github.com/wannabeOG.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Error Level Analysis using C++ and OpenCV #\n\n## About the Project ##\n\n### The Algorithm ###\nError Level Analysis (ELA) permits identifying areas within an image that are at different compression levels. With JPEG images, \nthe entire picture should be at roughly the same level. If a section of the image is at a significantly different error level, \nthen it likely indicates a digital modification. ELA highlights differences in the JPEG compression rate. Regions with uniform \ncoloring, like a solid blue sky or a white wall, will likely have a lower ELA result (darker color) than high-contrast edges.\n\n### Implementation Details ###\nTo run the code you need to have the following requirements installed in your system\n\n* opencv 2.4\n* cython 0.28.1\n* python 2.7 (fails with python3, haven't figured out the reason yet)\n* g++ any version\n\n### Description of the folders and files in the repository ###\n1. **Initial_Test**: Contains the images on which I tested the implementation of the algorithm in C++ sans the python wrapper\n2. **Photoshop_Test**: Contains the images on which I tested the implementation of the wrapper and in a sense the working of thw whole \nproject.\n3. **Wrapper_Files**:\n  * ela.hpp: Contains the function definitions that were used in the file ela_cython.cpp.\n  * setup.py: Builds the wrapper.cpp file which makes the function callable from a python scripts.\n  * wrapper.pyx: Cython file which acts as the interface between the C++ code and the python interpreter.\n4. **ela.cpp**: The first implementation of the algorithm in C++. Works fine on it's own \n5. **ela_cython.cpp**: The actual code for the algorithm modified to make it compatible with the cython compiler.\n6. **run.py** : The file to run on your python interpreter.\n\n### Using it on your own system ###\n1. Clone this repository onto your own local system.\n2. Collapse the **Wrapper_Files** folder and bring them into the main project. \n3. Open a python interpreter and pass the name of the image you want to test out the algorithm as an argument to the **run.py** file.\n\nYou should get the following images\n* **compressed.jpeg**: This is the image which was compressed from the original image.\n* **diff.jpeg**: This image illustates the difference in the compressed and the original image.\n* **ela_implemented_jpeg**: Scales up the diff.jpeg image to better illustrate the differences in the two images.\n\n## Results ##\n\n### Original Photos ###\n\nTest Image             |  Photoshopped image\n:-------------------------:|:-------------------------:\n![](https://github.com/wannabeOG/image/blob/master/Photoshop_Test/test.jpeg)  |  ![](https://github.com/wannabeOG/image/blob/master/Photoshop_Test/photoshopped_test.jpeg)\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n### After Applying ELA on Test image and Photoshopped image ###\nTest Image after ELA            |  Photoshopped image after ELA\n:-------------------------:|:-------------------------:\n![](https://github.com/wannabeOG/image/blob/master/Photoshop_Test/ela_implemeneted_test.jpg)  |  ![](https://github.com/wannabeOG/image/blob/master/Photoshop_Test/ela_implemented_img.jpg)\n\nThe strong presence of rainbowing near the ballon regions only suggests that an Adobe product, like Photoshop or Lightroom, was used to save the image. It does not identify intentional modifications. \n\n## Terminal Screenshots ##\n\n### Building the wrapper ###\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://github.com/wannabeOG/image/blob/master/Initial_Test/Screenshot%20from%202018-04-11%2015-40-15.png\" alt=\"Size Limit example\"\n       width=\"1300\" height=\"500\"\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n The bottom right and top right terminal show the contents of the folder before and after applying ELA on the image\n \n ### Running ELA through the python interface ###\n \u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://github.com/wannabeOG/image/blob/master/Initial_Test/Screenshot%20from%202018-04-11%2016-49-12.png\" alt=\"Size Limit example\"\n       width=\"1300\" height=\"500\"\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n \n\n## References ##\n1. Tutorial on ELA  (https://fotoforensics.com/tutorial-ela.php)\n2. Creating the cython wrapper (https://studywolf.wordpress.com/2012/09/14/cython-journey-part-1/)\n3. Countless people on Stack Overflow\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannabeog%2Fsnipit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwannabeog%2Fsnipit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannabeog%2Fsnipit/lists"}