Issues:
1. Arguments for LinearStretch() influence not the same way as for bin/convert.
2. Cant make LinearStretch(xxx) result to be the same as for bin/convert by visual perception.
2. black-point for LinearStretch() somehow works but different if set by levels= or black-point=.


Tests for LinearStretch() vs bin/convert for the same (AxB) but with different how-to-call function.

perl:
my $img0 = Image::Magick->new;
$img0->Read($fin);
$img0->Set('quality' => 100);
...
# test
$img = $img0->Clone();
$img->LinearStretch(@args);
$img->Write(filename => $fout, 'quality' => 100, 'compression' => 'None');


bin/convert:
bin/convert $fin -quality 100 -linear-stretch AxB $fout


Test with args (50, 1), (50%, 1), (50, 1%), (50%, 1%).
Groups by dst.img.size
dst.img.size orig dst perl/convert args
51313 $img->LinearStretch(50x1)
$img->LinearStretch(levels, 50x1)
51503 convert ... -quality 100 -linear-stretch 50x1
$img->LinearStretch(black-point, 50, white-point, 1)
$img->LinearStretch(black-point, 50, white-point, 1%)
$img->LinearStretch(black-point, 50%, white-point, 1)
$img->LinearStretch(black-point, 50%, white-point, 1%)
53322 convert ... -quality 100 -linear-stretch 50%x1
convert ... -quality 100 -linear-stretch 50%x1%
convert ... -quality 100 -linear-stretch 50x1%
55902 $img->LinearStretch(50%x1)
$img->LinearStretch(50%x1%)
$img->LinearStretch(50x1%)
$img->LinearStretch(levels, 50%x1)
$img->LinearStretch(levels, 50%x1%)
$img->LinearStretch(levels, 50x1%)


Test with args (1, 50), (1%, 50), (1, 50%), (1%, 50%).
Groups by dst.img.size
dst.img.size orig dst perl/convert args
54404 convert ... -quality 100 -linear-stretch 1x50
$img->LinearStretch(1x50)
$img->LinearStretch(black-point, 1, white-point, 50)
$img->LinearStretch(black-point, 1, white-point, 50%)
$img->LinearStretch(black-point, 1%, white-point, 50)
$img->LinearStretch(black-point, 1%, white-point, 50%)
$img->LinearStretch(levels, 1x50)
58196 $img->LinearStretch(1%x50)
$img->LinearStretch(1%x50%)
$img->LinearStretch(1x50%)
$img->LinearStretch(levels, 1%x50)
$img->LinearStretch(levels, 1%x50%)
$img->LinearStretch(levels, 1x50%)
58812 convert ... -quality 100 -linear-stretch 1%x50
convert ... -quality 100 -linear-stretch 1%x50%
convert ... -quality 100 -linear-stretch 1x50%


Test with args (30, 70), (30%, 70), (30, 70%), (30%, 70%).
Groups by dst.img.size
dst.img.size orig dst perl/convert args
49982 $img->LinearStretch(30%x70)
$img->LinearStretch(30%x70%)
$img->LinearStretch(30x70%)
$img->LinearStretch(levels, 30%x70)
$img->LinearStretch(levels, 30%x70%)
$img->LinearStretch(levels, 30x70%)
51313 convert ... -quality 100 -linear-stretch 30%x70
convert ... -quality 100 -linear-stretch 30%x70%
convert ... -quality 100 -linear-stretch 30x70%
54503 $img->LinearStretch(30x70)
$img->LinearStretch(levels, 30x70)
54553 convert ... -quality 100 -linear-stretch 30x70
$img->LinearStretch(black-point, 30, white-point, 70)
$img->LinearStretch(black-point, 30, white-point, 70%)
$img->LinearStretch(black-point, 30%, white-point, 70)
$img->LinearStretch(black-point, 30%, white-point, 70%)


Test with args (70, 30), (70%, 30), (70, 30%), (70%, 30%).
Groups by dst.img.size
dst.img.size orig dst perl/convert args
54112 $img->LinearStretch(70x30)
$img->LinearStretch(levels, 70x30)
54172 convert ... -quality 100 -linear-stretch 70x30
$img->LinearStretch(black-point, 70, white-point, 30)
$img->LinearStretch(black-point, 70, white-point, 30%)
$img->LinearStretch(black-point, 70%, white-point, 30)
$img->LinearStretch(black-point, 70%, white-point, 30%)
54919 convert ... -quality 100 -linear-stretch 70%x30
convert ... -quality 100 -linear-stretch 70%x30%
convert ... -quality 100 -linear-stretch 70x30%
60904 $img->LinearStretch(70%x30)
$img->LinearStretch(70%x30%)
$img->LinearStretch(70x30%)
$img->LinearStretch(levels, 70%x30)
$img->LinearStretch(levels, 70%x30%)
$img->LinearStretch(levels, 70x30%)