You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need some help changing pixel colors on SKBitmap images in my app. I am using ColorTable functionality right now, but it changes all pixels to be the new color, and I only want a specific color replaced.
`var targetColor = color;
var tableRed = new byte[256];
var tableGreen = new byte[256];
var tableBlue = new byte[256];
for (int i = 0; i < 256; i++)
{
tableRed[i] = targetColor.Red;
tableGreen[i] = targetColor.Green;
tableBlue[i] = targetColor.Blue;
}
paint.ColorFilter =
SKColorFilter.CreateTable(null, tableRed, tableGreen, tableBlue);
canvas.DrawBitmap(Image,new SKPoint( drawX, drawY), paint);`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Need some help changing pixel colors on SKBitmap images in my app. I am using ColorTable functionality right now, but it changes all pixels to be the new color, and I only want a specific color replaced.
`var targetColor = color;
How can I best achieve this?
Beta Was this translation helpful? Give feedback.
All reactions