Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the docs don't describe bpp and prec in opj_image_comp very well #1379

Closed
smason opened this issue Sep 15, 2021 · 6 comments · Fixed by #1383
Closed

the docs don't describe bpp and prec in opj_image_comp very well #1379

smason opened this issue Sep 15, 2021 · 6 comments · Fixed by #1383

Comments

@smason
Copy link

smason commented Sep 15, 2021

as appears in src/lib/openmj2/openjpeg.h:

bpp is described as

image depth in bits

and prec as:

precision

which doesn't help people new to the format, leading to issues like #1343 and stackoverflow qustions like: https://stackoverflow.com/q/66386457/1358308

I'd be happy to make a pull request, but am not sure how to describe them

@smason
Copy link
Author

smason commented Oct 21, 2021

Why you cannot just read the spec??

You can't expect everyone who wants to quickly read/write a file to go through the spec and then figure out how the spec maps onto the API presented by this library, rather than quickly scanning through the docs?

fcd15444-2.pdf file is called.

I'm happy to write something, but what am I searching for? PREC seems to be something else, while BPP isn't mentioned at all. I've also tried searching for precision and bit depth, but am not sure which references are relevant. Certainly not sure enough to write something for the docs.

Even just having the docs link to the spec and use terms that appear in the them would help!

rouault added a commit to rouault/openjpeg that referenced this issue Oct 21, 2021
in opj_image_comp structure (and opj_image_comptparm, but that one is
not used in the public API)

bpp was redundant with prec, and almost never set by the library, except
by opj_image_create(). This change should hopefully not impact existing,
working, users of the API, which should already have used prec to get
things working.

Fixes uclouvain#1379
@rouault
Copy link
Collaborator

rouault commented Oct 21, 2021

#1383 should help clarifying, and cleaning up a bit the lib

rouault added a commit to rouault/openjpeg that referenced this issue Oct 21, 2021
in opj_image_comp structure (and opj_image_comptparm, but that one is
not used in the public API)

bpp was redundant with prec, and almost never set by the library, except
by opj_image_create(). This change should hopefully not impact existing,
working, users of the API, which should already have used prec to get
things working.

Fixes uclouvain#1379
rouault added a commit to rouault/openjpeg that referenced this issue Oct 21, 2021
in opj_image_comp and opj_image_comptparm structures.

bpp was redundant with prec, and almost never set by the library, except
by opj_image_create(). This change should hopefully not impact existing,
working, users of the API, which should already have used prec to get
things working.

Fixes uclouvain#1379
@smason
Copy link
Author

smason commented Oct 21, 2021

@rouault it wasn't obvious to me that bpp was so redundant, thanks for cleaning it up!

@smason smason closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@rouault @smason and others