Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast Thumbnails #66

Open
wordlessly opened this issue Jun 25, 2019 · 0 comments
Open

Fast Thumbnails #66

wordlessly opened this issue Jun 25, 2019 · 0 comments

Comments

@wordlessly
Copy link

To get a thumbnail you need to decode the full picture and then scale it to thumbnail size. To overcome this obstacle the jpeg-format allows you to get a picture 1/2, 1/4, 1/8 or even 1/16 in size of the original picture. E.g. for a factor 1/8, a 5000x5000 picture will be returned as a 625x625 picture. Java does NOT offer this functionality (C++ libs like ijg do).

For jpeg thumbnails you just need the DC components and skip all the AC components. This means you only have to decrypt the DC component. You still have to do the full Huffman decompression, but still it saves a hell lot of time, disk I/O, memory and exceptions.

Pure (but clever) Java, especially multi-threaded Java often beats native performance-wise. This lack of fast thumbnail support shaped the type of apps you could write with Java over the last 20 years. Fast thumbnails are ESSENTIAL!

Please implement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant