При рисовании изображения в формате PNG оно отображается с синим оттенком. Пожалуйста, помогите, я застрял на этом более 4 часов.
Код
обновлен, чтобы показать, как создается холст
Код: Выделить всё
SKImageInfo info = new SKImageInfo(2000, 2000);
SKBitmap bitmap = new SKBitmap(info);
Texture texture = new Texture((uint)bitmap.Width, (uint)bitmap.Height);
Sprite sprite = new Sprite(texture);
var surface = SKSurface.Create(bitmap.Info, bitmap.GetPixels(), bitmap.RowBytes);
var canvas = surface.Canvas;
var X = 0;
var Y = 0;
var paint = new SKPaint {
IsAntialias = true,
Color = SKColors.White,
BlendMode = SKBlendMode.SrcOver,
IsDither = true,
ColorFilter = SKColorFilter.CreateBlendMode(SKColors.White, SKBlendMode.Modulate)
}
var cursorImage = SKImage.FromEncodedData("my_yellow_file.png");
var cursorPositionSrc = new SKRect(0, 0, cursorImage.Width, cursorImage.Height);
var cursorPositionDest = new SKRect(
X,
Y - (cursorImage.Height / 2),
X + cursorImage.Width,
Y + (cursorImage.Height / 2)
);
// canvas is a large surface to draw on
canvas.DrawImage(this.cursorImage, cursorPositionSrc, this.cursorPositionDest, this.cursorPaint);
Подробности метаданных изображения

Рендеринг/Рисование изображения

Характеристики компьютера
ОС: Win11
Подробнее здесь: https://stackoverflow.com/questions/792 ... llow-color
Мобильная версия