You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just ran across a small issue with the -c parameter. Suppose I want to create a JP2 with precincts, with a precinct size of 256 for the two highest resolution levels, and 128 for the remaining resolution levels. The opj_compress help message says:
Multiple records may be supplied, in which case the first record refers
to the highest resolution level and subsequent records to lower
resolution levels. The last specified record is right-shifted for each
remaining lower resolution levels.
So instead of right-shifting the last specified record to all remaining resolution levels, opj_compress successively halves that value for each remaining level.
Of course a simple workaround here is to explicitly set the precinct size for each resolution level:
The help message means to say that the precincts for successive resolutions after last specified are right shifted (halved) successively. The text may be ambiguous, but the library is performing as specified. So, perhaps the message could be made clearer.
@boxerab You're right, I wasn't aware the help message actually refers to a bitwise arithmetic shift (I do wonder how many non-developer users are familiar with this).
@bitsgalore I agree, "division by two" should probably be used instead of the shift terminology. You could open an issue for this if the spirit moves you. Or better, a pull request :)
Just ran across a small issue with the -c parameter. Suppose I want to create a JP2 with precincts, with a precinct size of 256 for the two highest resolution levels, and 128 for the remaining resolution levels. The opj_compress help message says:
So this should work (I'm using v2.3.0):
But if I check the precinct sizes in foo.jp2 with jpylyzer I get this:
So instead of right-shifting the last specified record to all remaining resolution levels, opj_compress successively halves that value for each remaining level.
Of course a simple workaround here is to explicitly set the precinct size for each resolution level:
Result:
Which is as expected.
The text was updated successfully, but these errors were encountered: