Skip to content

Commit

Permalink
oiiotool --point fix problem when there's no alpha (#3684)
Browse files Browse the repository at this point in the history
We were over-allocating the color vector, and that was throwing off
the operation of IBA::render_point for cases where the image had no
alpha channel.
  • Loading branch information
lgritz authored Nov 21, 2022
1 parent c0bbf87 commit f782db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/oiiotool/oiiotool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5065,7 +5065,7 @@ OIIOTOOL_OP(point, 1, [](OiiotoolOp& op, span<ImageBuf*> img) {
const ImageSpec& Rspec(img[0]->spec());
std::vector<int> points;
Strutil::extract_from_list_string(points, op.args(1));
std::vector<float> color(Rspec.nchannels + 1, 1.0f);
std::vector<float> color(Rspec.nchannels, 1.0f);
Strutil::extract_from_list_string(color, op.options().get_string("color"));
bool ok = true;
for (size_t i = 0, e = points.size() - 1; i < e; i += 2)
Expand Down

0 comments on commit f782db6

Please sign in to comment.