Using an image as palette
Moderator: Alex
-
- Posts: 2
- Joined: Sat Feb 27, 2021 8:08 pm
Using an image as palette
Is it possible to use one image as a palette to replace colors in another with approximation? If yes, how?
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Using an image as palette
Hello,
For solving your task you need to do the following steps:
ChangePixelFormatToPaletteCommand class allows to convert image to palette image with specified color palette.Is it possible to use one image as a palette to replace colors in another with approximation? If yes, how?
For solving your task you need to do the following steps:
- Get color palette from image.
- Convert an input image to the palette image with specified color palette.
-
- Posts: 2
- Joined: Sat Feb 27, 2021 8:08 pm
Re: Using an image as palette
I am getting Unsupported pixel format error. On top of that BGR32 does not support palette as i found out, and one of the parameters is just that, a palette. It might be possible to use ReplaceColor comand.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Using an image as palette
Hello,
VintaSoft Imaging .NET SDK allows to open image and get/set pixel in image. All other functionality must be developed by yourself.
Best regards, Alexander
If you have BGR32 image, you need to get unique colors from first BGR32 image, get unique colors from second BGR32 image, create algorithm that allows to convert color from second image into color from first image, change pixels in second image.I am getting Unsupported pixel format error. On top of that BGR32 does not support palette as i found out, and one of the parameters is just that, a palette.
VintaSoft Imaging .NET SDK allows to open image and get/set pixel in image. All other functionality must be developed by yourself.
Best regards, Alexander