{"id":15946243,"url":"https://github.com/mike10004/jpeg-segment-finder","last_synced_at":"2025-04-03T22:26:16.189Z","repository":{"id":52543007,"uuid":"111030005","full_name":"mike10004/jpeg-segment-finder","owner":"mike10004","description":"Java library to determine the offsets and lengths of metadata segments in a JPEG file.","archived":false,"fork":false,"pushed_at":"2021-04-26T17:19:57.000Z","size":216,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T10:28:16.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mike10004.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}},"created_at":"2017-11-16T22:36:55.000Z","updated_at":"2019-08-13T19:26:16.000Z","dependencies_parsed_at":"2022-09-10T14:01:20.092Z","dependency_job_id":null,"html_url":"https://github.com/mike10004/jpeg-segment-finder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fjpeg-segment-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fjpeg-segment-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fjpeg-segment-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fjpeg-segment-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike10004","download_url":"https://codeload.github.com/mike10004/jpeg-segment-finder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247087788,"owners_count":20881459,"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","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":[],"created_at":"2024-10-07T09:20:49.947Z","updated_at":"2025-04-03T22:26:16.167Z","avatar_url":"https://github.com/mike10004.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis build status](https://img.shields.io/travis/mike10004/jpeg-segment-finder.svg)](https://travis-ci.org/mike10004/jpeg-segment-finder)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.mike10004/jpeg-segment-finder.svg)](https://repo1.maven.org/maven2/com/github/mike10004/jpeg-segment-finder/)\n\n# jpeg-segment-finder\n\nJava library to determine the offsets and lengths of metadata segments in \na JPEG file. This library is intended to be small and not pull in a lot of\nexternal dependencies. Use it if you want to *parse* JPEG metadata yourself\nbut don't want to *find* JPEG metadata yourself.\n\n## Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.mike10004\u003c/groupId\u003e\n        \u003cartifactId\u003ejpeg-segment-finder\u003c/artifactId\u003e\n        \u003cversion\u003e0.5\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## Usage\n\nFind IPTC segments marked by byte 0xED:\n\n    JpegSegmentFinder finder = new JpegSegmentFinder();\n    List\u003cJpegSegmentSpec\u003e segments;\n    try (InputStream in = new FileInputStream(jpegFile)) {\n        segments = finder.findSegments(in, Collections.singleton((byte) 0xED));\n    }\n    JpegSegmentSpec iptc = segments.get(0);\n    byte[] jpegBytes = Files.readAllBytes(jpegFile.toPath());\n    int from = (int) iptc.contentOffset;\n    int to = from + (int) iptc.contentLength;\n    byte[] segmentBytes = Arrays.copyOfRange(jpegBytes, from, to);\n    // ...analyze those segments bytes as you please...\n\n## Credits\n\nThank you to Drew Noakes for [metadata-extractor][metadata-extractor]. This \nlibrary is a hack on some classes in that library. The test image is from \nthat project's test resources.\n\n[metadata-extractor]: https://github.com/drewnoakes/metadata-extractor\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike10004%2Fjpeg-segment-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike10004%2Fjpeg-segment-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike10004%2Fjpeg-segment-finder/lists"}