SAJ2K is an ImgSource extension library
which provides JPEG-2000 reading and writing capabilities. It is available as both a DLL (in either Win32 or x64) and a
set of static libraries (for VC6 or VS.Net, ).
- Write JPEG-2000 images with 8, 24, 16 or 48 bits per pixel.
- Variable compression settings
- Variable resolution levels
- Choose from five different progression schemes
- Read JPEG-2000 images with 8, 16, 24, 32, 48 or 64 bits per pixel.
- Read images scaled
- Read directly to DIB
- Query an image's dimensions and bit depth
Because SAJ2K is tightly integrated into ImgSource's source and destination manager system, reading and
writing JPEG-2000 images is as easy as reading or writing any of the formats that ImgSource supports natively.
Here's a sample:
// get ImgSource extension hook
HISEXTHK hHk = IS3GetExtHook(0);
// set the hook in SAJ2K
// clean up
// open JPEG2000 file via ImgSource
HISSRC hSrc = IS3OpenFileSource("dragonfly.jp2");
// read the image to RGB-24
UINT32 w, h;
HGLOBAL hImg = _SAJ2K_ReadJ2K(hSrc, &w, &h, 24, 1, 0);
// check for error
if (hImg == NULL)
// test the error code.
// SAJ2K will set its errors into ImgSource.
// so, you test for errors here.
UINT error = IS3GetLastError();
// close the file
// clean up
The download package includes
- _SAJ2K.DLL - the image library
- _SAJ2K.H - the main header file
- _SAJ2K.LIB - the library file, used for static linking of the DLL
- The SAJ2K source code (VC 6.0 / VS.Net) is not included but a 6-month source code subscription can be purchased seperately.
The static library is available separately.
The DLL you download is a full, working version. However, to use it properly, you will need an access key,
which you will use when you initialize the DLL. The access key is what you get when you register. Without the
key, all images will have a big red "X" drawn on them.
Once registered, you are free to use SAJ2K however you wish, with the following restrictions :
- You may not use SAJ2K in a product which directly competes with SAJ2K
- You may not explicitly distribute SAJ2K access keys to persons who are not registered SAJ2K users.
Specifically, this applies to companies who wish to distribute the source of their applications to users. SAJ2K access
keys must not be included in this source.
- Each team that uses SAJ2K within a company or organization should acquire their own SAJ2K license.
- There are no royalties associated with SAJ2K.
- If there is opportunity for you to credit Smaller Animals Software with writing SAJ2K, you should feel free to mention us.
Registration cost: $25.00 U.S.
Contact & Bug Reports
Use at your own risk. There are no guarantees as to the suitablility of this software for any particular use. We cannot anticipate all uses to which people might try to put this. Any bugs, if reported , will be fixed as soon as possible. Smaller Animals Software can not be held responsible for any bugs or the consequences of any bugs which were not reported.
We know Visual C++. We don't know Visual BASIC or Borland's C++. But, we will try to help you as much as we can. You should always search the discussion board to see if your question has been answered there.
Please do not send question about SAJ2K to anyone who's code is included as part of SAJ2K; they have provided their code with no obligations to support what we do with it.
If you use this package with a platform other than VC++, and would like to tell us how you did it, please do. If you have any hints or tips or code snippets that could help others, please feel free to share this on the ImgSource discussion board
Note : Borland C++ Builder uses a different object file format than MicroSoft. You will have to use IMPLIB to create a static .LIB, if you want to statically link to the SAJ2K package. See your complier's manual for help with this.
If you have ideas about functionality that you'd like but don't see here, let us know. Many of the features included are the result of people asking if we could figure out how to do it.
Copyright © 2013, Smaller Animals Software, Inc.