https://github.com/sic2/thumbme
A simple and easy-to-use Java class to get the embedded thumbnail image from a JPEG
https://github.com/sic2/thumbme
Last synced: about 1 month ago
JSON representation
A simple and easy-to-use Java class to get the embedded thumbnail image from a JPEG
- Host: GitHub
- URL: https://github.com/sic2/thumbme
- Owner: sic2
- License: mit
- Created: 2015-06-28T22:56:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T21:30:52.000Z (over 10 years ago)
- Last Synced: 2025-06-04T10:37:23.254Z (9 months ago)
- Language: HTML
- Size: 15.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ThumbMe
A simple and easy-to-use Java class to get the embedded thumbnail image from a JPEG
## How to use it
* Copy the ThumbStream.java into your project
* Then use the stream this way:
``ThumbStream ts = new ThumbStream("test.jpg");``
* The ThumbStream does return the embedded thumbnail in the JPEG image on ``read()`` functions
Some JPEG images do not have any embedded thumbnail. In that case you can check if the thumbnail exists by calling ``ts.hasThumbnail()``
### Example
```
ThumbStream ts = new ThumbStream("test.jpg");
final Path destination = Paths.get("test-thumb.jpg");
Files.copy(ts, destination);
```
## TODO
* Capture thumbnail info (width, height, compression)
* Test against JPEG with thumbnail in TIFF format