-
Notifications
You must be signed in to change notification settings - Fork 28
How To Write A New Thumbnailer
benjaminpick edited this page Jun 4, 2012
·
9 revisions
A Thumbnailer is a class that handles the creation of thumbnail files (PNG) of a certain input format (identified by MIME Types). So if you need to add the support of a specific file format, you can follow this guide.
- First, create a developing environment by forking this Github project, checking out your copy of it, and following the steps explained in Building from source.
- Create a new class implementing the Thumbnailer interface - easier, extend AbstractThumbnailer. You can check DummyThumbnailer or other Thumbnailers to see how they work.
- Register the thumbnailer:
- Regain Version: at ThumbnailerPlugin.java
- Standalone Version: at Main.java
-
Testing: Copy a file of your input file type into test/testfiles. Add your thumbnailer to ThumbnailerFileTestDummy. Then run
ant test
and see if something fails, especially ThumbnailGeneratorBasicTest/ThumbnailGeneratorMIMETest. - When finished, send me a pull request so that everybody can profit from your improvement!