Hello,
I compare the rendering of the resampling filters and to do this, I use an image that is modified by the 11 classic filters (Box, Linear, etc.) and I noticed that when converting with The Gimp, always in the same way, the .png generated by the graphics tool to bmp's for the comparison tool, 2 files have an alpha channel (I don't know where it comes from) and the 9 other files don't have one :
9+2_layers.png
Here is what I use to convert the base image:
img.Width := Wd;
img.Height := Hd;
image.ResampleFilter := SelectedFilter; // image is a TBGRABitmap;
// SelectedFilter is coming from another procedure,
procedure TForm1.radiogroupResFiltersClick(Sender: TObject);// radiogroup Items host the 11 filters
begin
SelectedFilter := TResamplefilter(radiogroupResFilters.ItemIndex);
imgPaint(nil);
end;
//
stretched := image.Resample(Wd, Hd) as TBGRABitmap;
That's all.
Of course, to watch the result, I then use
copy := image.MakeBitmapCopy(clNone);
img.Picture.Assign(copy); // and img is a TImage
copy.Free;
This gives me a different rendering depending on the presence or absence of the alpha channel, and depending on the display tool used, one version or the other:
4resample.gif
Lanczos3--Lanczos4(or2).png
Is it a bug or a feature ?
Thanks,