Skip to content

Commit

Permalink
Merge branch 'master' of http://itk.org/ITK
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis ibanez committed Oct 5, 2010
2 parents 22a7e53 + b55c3a5 commit 10dbe37
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Code/Review/itkJPEG2000ImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,30 @@ ::Write(const void *buffer)
w = this->m_Dimensions[0];
h = this->m_Dimensions[1];


// Compute the proper number of resolutions to use.
// This is mostly done for images smaller than 64 pixels
// along any dimension.
unsigned int numberOfResolutions = 0;

int tw = w >> 1;
int th = h >> 1;

while( tw && th )
{
numberOfResolutions++;
tw >>= 1;
th >>= 1;
}

// Clamp the number of resolutions to 6.
if( numberOfResolutions > 6 )
{
numberOfResolutions = 6;
}

parameters.numresolution = numberOfResolutions;

OPJ_COLOR_SPACE color_space = CLRSPC_GRAY;
opj_image_cmptparm_t cmptparm[3];

Expand Down
2 changes: 1 addition & 1 deletion Utilities/kwsys/kwsysDateStamp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010)
SET(KWSYS_DATE_STAMP_MONTH 10)

# KWSys version date day component. Format is DD.
SET(KWSYS_DATE_STAMP_DAY 02)
SET(KWSYS_DATE_STAMP_DAY 05)

0 comments on commit 10dbe37

Please sign in to comment.