Available in the LEADTOOLS Imaging toolkit. |
J2KROIControl Example for C++ 4.0 and later
m_LEAD1.J2KSetDefaults();
// Set our options
m_LEAD1.SetJ2KCompressionRatio(1000);
m_LEAD1.SetJ2KCompressionControl(J2K_COMP_RATIO);
m_LEAD1.SetJ2KUseROI(TRUE);
m_LEAD1.SetJ2KROIControl(J2K_USEOPTION_RECT);
m_LEAD1.SetJ2KROILeft(200);
m_LEAD1.SetJ2KROITop(200);
m_LEAD1.SetJ2KROIWidth(600);
m_LEAD1.SetJ2KROIHeight(600);
m_LEAD1.SetJ2KXTsiz(100);
m_LEAD1.SetJ2KYTsiz(100);
// Save the bitmap to disk
m_LEAD1.Save("c:\\image1.j2k", FILE_J2K, 24, 2, SAVE_OVERWRITE);