-
Notifications
You must be signed in to change notification settings - Fork 626
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
Fix formatting of sample exr file in OpenEXRFileLayout.rst #1545
Comments
A helpful addition to this would be to create an image file that corresponds to the example and link it in the documentation for download. |
Also, it would be helpful to change the floating point numbers in the example to values that have an exact correspondence to the bit patterns shown, which would avoid confusion like that described in #1433, where computing the bit pattern of the numbers shown yield slightly different values due to rounding. |
assigning myself this ticket. |
I've updated format in the branch of the fork. |
This is looking good, thanks! An improvement over the previous formatting. For the channel names, I wonder if it would be even more instructive to put each character of the channel name on a separate line, so the ascii character appears next to the hex byte:
As is, it's not entirely clear what the bytes correspond do until you realize it's the characters in the name. If you're so inclined, you can set up an account on readthedocs and create project corresponding to your fork of OpenEXR, then build the documentation there for preview. Not necessary, but that will illuminate a few more of the steps in the process. |
Updated the value column to put the ascii values adjacent to the bytes rows. |
I created the sample.exr file with some python code.
Where should I put the sample.exr file so I can update the rst file to link to it? |
I think I need to verify this sample.exr file and see if float values are readable in a DCC or the API. As well verify the float values in the table. If there is invalid float value values in the documentation. |
Looking at the output after suggesting one ascii character per line, I now wonder if it would be further helpful to put the attribute name itself in the third column, something like:
It's nice to see the annotation of each byte, but not immediately obvious that the column of characters spells a word. Also, I think the Also, the value of the "channels" attribute is a little confusing. It's a string list, but it isn't obvious how the bytes correspond to the value. Could that be further annotated? The And as for the example file itself, I'd suggest putting it in the You can validate the file by running |
Thanks for exrcheck suggestion.. Found out that I had one byte in the in the scan line 1 section wrong.. it was still pointing to scanline 0. So changing that single byte to point to scanline 1 helped it. Since scanline 1 was undefined at the time.
should be the correct python variable to generate the correct sample.exr. I put the sample.exr file in openexr/website/images
Since, one thing I'm not sure is how sphinx is copying the files from website/images to it's website/sphinx/_images directory. |
Okay. I somehow got the download link working with the I think it's ready to for a pull request. |
Created pull request #1586 |
…d attempt (#1587) * Replaced the sample exr file code blocks with a grid table formatted with bytes of the sample file in one column. The value in the second column and the third column being the description of the bytes and value. Signed-off-by: An Nguyen <[email protected]> * * Updated so the ascii values for the bytes are aligned to each byte. * Gave the table a title and reduce the width to 50% Signed-off-by: An Nguyen <[email protected]> * Added missing 4 bytes missing from the dataWindow value and displayWindow value Signed-off-by: An Nguyen <[email protected]> * Added the sample.exr file Signed-off-by: An Nguyen <[email protected]> * Annotated the attribute values more for the header. Should be a bit clearer. Signed-off-by: An Nguyen <[email protected]> * Adding the sample.exr file was documented. Signed-off-by: An Nguyen <[email protected]> * Added download link to the sample.exr file. Signed-off-by: An Nguyen <[email protected]> * Move the download link above the table. Updated the paragraph before the table to describe the table Signed-off-by: An Nguyen <[email protected]> * Move the sample.exr image into the downloads directory to match the target destination naming scheme to avoid confusion where the files go when built Signed-off-by: An Nguyen <[email protected]> * Updated the table to annotate the type and literal as type. Signed-off-by: An Nguyen <[email protected]> --------- Signed-off-by: An Nguyen <[email protected]>
…penEXRFileLayout.rst - 3rd attempt (AcademySoftwareFoundation#1587) * Replaced the sample exr file code blocks with a grid table formatted with bytes of the sample file in one column. The value in the second column and the third column being the description of the bytes and value. Signed-off-by: An Nguyen <[email protected]> * * Updated so the ascii values for the bytes are aligned to each byte. * Gave the table a title and reduce the width to 50% Signed-off-by: An Nguyen <[email protected]> * Added missing 4 bytes missing from the dataWindow value and displayWindow value Signed-off-by: An Nguyen <[email protected]> * Added the sample.exr file Signed-off-by: An Nguyen <[email protected]> * Annotated the attribute values more for the header. Should be a bit clearer. Signed-off-by: An Nguyen <[email protected]> * Adding the sample.exr file was documented. Signed-off-by: An Nguyen <[email protected]> * Added download link to the sample.exr file. Signed-off-by: An Nguyen <[email protected]> * Move the download link above the table. Updated the paragraph before the table to describe the table Signed-off-by: An Nguyen <[email protected]> * Move the sample.exr image into the downloads directory to match the target destination naming scheme to avoid confusion where the files go when built Signed-off-by: An Nguyen <[email protected]> * Updated the table to annotate the type and literal as type. Signed-off-by: An Nguyen <[email protected]> --------- Signed-off-by: An Nguyen <[email protected]>
…d attempt (#1587) * Replaced the sample exr file code blocks with a grid table formatted with bytes of the sample file in one column. The value in the second column and the third column being the description of the bytes and value. Signed-off-by: An Nguyen <[email protected]> * * Updated so the ascii values for the bytes are aligned to each byte. * Gave the table a title and reduce the width to 50% Signed-off-by: An Nguyen <[email protected]> * Added missing 4 bytes missing from the dataWindow value and displayWindow value Signed-off-by: An Nguyen <[email protected]> * Added the sample.exr file Signed-off-by: An Nguyen <[email protected]> * Annotated the attribute values more for the header. Should be a bit clearer. Signed-off-by: An Nguyen <[email protected]> * Adding the sample.exr file was documented. Signed-off-by: An Nguyen <[email protected]> * Added download link to the sample.exr file. Signed-off-by: An Nguyen <[email protected]> * Move the download link above the table. Updated the paragraph before the table to describe the table Signed-off-by: An Nguyen <[email protected]> * Move the sample.exr image into the downloads directory to match the target destination naming scheme to avoid confusion where the files go when built Signed-off-by: An Nguyen <[email protected]> * Updated the table to annotate the type and literal as type. Signed-off-by: An Nguyen <[email protected]> --------- Signed-off-by: An Nguyen <[email protected]>
The formatting here is confusing and hard to read: https://openexr.com/en/latest/OpenEXRFileLayout.html#sample-file
The table show simply annotate each byte of the file, alongside the hex value of the byte. The formatting would probably work better as a single long column.
This task requires some basic familiarity with reStructuredText and sphinx but the concepts are easy to pick up from other examples. See Building the Website for how to test the formatting.
The text was updated successfully, but these errors were encountered: