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

A variety of minor documentation fixups #3869

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/doc/imagebuf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ Strategy 2: Template your iterating functions based on buffer type
Consider the following alternate version of the `make_black` function
from Section `Example: Set all pixels in a region to black`_ ::

template<type BUFT>
template<typename BUFT>
static bool make_black_impl (ImageBuf &buf, ROI region)
{
// Clamp the region's channel range to the channels in the image
Expand Down Expand Up @@ -497,7 +497,7 @@ from Section `Example: Set all pixels in a region to black`_ ::
return make_black_impl<unsigned short> (buf, region);
else {
buf.error ("Unsupported pixel data format %s", buf.spec().format);
retrn false;
return false;
}
}

Expand All @@ -512,7 +512,7 @@ chapter). You could rewrite the example even more simply::

#include <OpenImageIO/imagebufalgo_util.h>

template<type BUFT>
template<typename BUFT>
static bool make_black_impl (ImageBuf &buf, ROI region)
{
... same as before ...
Expand Down
4 changes: 2 additions & 2 deletions src/doc/imageinput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Individual scanlines may be read using the ``read_scanline()`` API call:
auto inp = ImageInput::open (filename);
const ImageSpec &spec = inp->spec();
if (spec.tile_width == 0) {
std::vector<unsigned char> scanline (spec.width*spec.channels);
std::vector<unsigned char> scanline (spec.width * spec.nchannels);
for (int y = 0; y < yres; ++y) {
inp->read_scanline (y, 0, TypeDesc::UINT8, &scanline[0]);
// ... process data in scanline[0..width*channels-1] ...
Expand Down Expand Up @@ -230,7 +230,7 @@ scanline image and you should read pixels using ``read_scanline()``, not
} else {
// Tiles
int tilesize = spec.tile_width * spec.tile_height;
std::vector<unsigned char> tile(tilesize * spec.channels);
std::vector<unsigned char> tile(tilesize * spec.nchannels);
for (int y = 0; y < yres; y += spec.tile_height) {
for (int x = 0; x < xres; x += spec.tile_width) {
inp->read_tile(x, y, 0, TypeDesc::UINT8, &tile[0]);
Expand Down
Loading