Skip to content

Commit f782db6

Browse files
authored
oiiotool --point fix problem when there's no alpha (#3684)
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.
1 parent c0bbf87 commit f782db6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oiiotool/oiiotool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5065,7 +5065,7 @@ OIIOTOOL_OP(point, 1, [](OiiotoolOp& op, span<ImageBuf*> img) {
50655065
const ImageSpec& Rspec(img[0]->spec());
50665066
std::vector<int> points;
50675067
Strutil::extract_from_list_string(points, op.args(1));
5068-
std::vector<float> color(Rspec.nchannels + 1, 1.0f);
5068+
std::vector<float> color(Rspec.nchannels, 1.0f);
50695069
Strutil::extract_from_list_string(color, op.options().get_string("color"));
50705070
bool ok = true;
50715071
for (size_t i = 0, e = points.size() - 1; i < e; i += 2)

0 commit comments

Comments
 (0)