Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to convert a RGB Tiff image into its negative image? The original Tiff image stored into an unsigned char type 2-D array f[x][y] in standard ANSI C++ program.
Posted

1 solution

If you already have this array, it means it has nothing to do with TIFF, the data is already unpacked from TIFF, or this is not TIFF at all.

You pixel type must be byte per color component, 3 bytes per pixel. If this is RGB data, the inversion of the pixel value for such pixel type is 255 − value, for each color component. If you also have alpha channel, leave it as is.

But the image representation types can be very different. The final answer depends on what it is. What I described above is the most likely thing.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900