Closed
Description
When I do the following (upscaling an image from 300 to 400 px), i get a thin black border on top and right. When I add premultiply and unpremultiply, that border is gone. I though that's only needed when the picture has an alpha channel? Wrong assumption? Should I premultiply always? Or just when upscaling? But always when with alpha channel?
$pixel = \Jcupitt\Vips\Image::black(1, 1)->add([255 , 255, 255])->cast(BandFormat::UCHAR);
$vips = $pixel->embed(0, 0, 300, 300, ['extend' => Extend::COPY]);
$vips = $vips->copy(['interpretation' =>\Jcupitt\Vips\Interpretation::SRGB]);
//$vips = $vips->premultiply();
$vips = $vips->resize(400/$vips->width);
//$vips = $vips->unpremultiply();
$vips->jpegsave("image.jpg");