hello
I have a gray image in Qimage like this:
imgGray.jpg
and I need to apply a mask to change the color but without changing the image. For example...
imgColor.jpg
Any idea how I can do this????
thanks
hello
I have a gray image in Qimage like this:
imgGray.jpg
and I need to apply a mask to change the color but without changing the image. For example...
imgColor.jpg
Any idea how I can do this????
thanks
How is the "mask" defined? Is it an image? How exactly do you want to "mask" the image?
I have an image in gray and I want you to see color.
How I can do that????
that is, change the pixels of the image grayscale to RGB
There is a number of algorithms you can use and depending which one you choose, you'll get a different result.
can you give me an example of one of these algorithms?
Launch Gimp or Photoshop and take a look at the different layer compositing modes.
I may not explain well, my English is terrible.
anyway I solved the problem by doing this:
QVector<QRgb>color; //vector must be completed
QImage img1("image.jpg");
QImage img2(img.width(), img.height(), QImage::Format_RGB32);
int n;
for(int x=0; x<img.width();x++)
{
for(int y=0; y<img.height();y++)}
{
n=img1.pixel(x,y);}
img2.setPixel( x, y, color[n] );
thanks
Bookmarks