Skip to content

Commit

Permalink
Fix an off-by-one error in function exportImageAlpha.
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel committed Oct 13, 2014
1 parent cf86978 commit c3fb6c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/vigra/impexalpha.hxx
Expand Up @@ -789,7 +789,7 @@ namespace vigra

encoder->setPixelType(pixel_type);

vigra_precondition(isBandNumberSupported(encoder->getFileType(), image_accessor.size(image_upper_left)),
vigra_precondition(isBandNumberSupported(encoder->getFileType(), image_accessor.size(image_upper_left) + 1U),
"exportImageAlpha(): file format does not support requested number of bands (color channels)");

const range_t image_source_range(find_source_value_range(export_info,
Expand Down

0 comments on commit c3fb6c9

Please sign in to comment.