0

I know few about this and i'm trying to keep building upon it. My goal is to do image stacking with some criteria using C language, as i came upon some cool ideas i think i should be capable of doing with my photos. My C background should be enough to understand what i may need. That being said...

So far i've learned how to read an existing .TIFF file and save it into a char array. The problem is i don't know in which way its data is contained so that i can then be able to analize individual pixels and modify them, or build another .TIFF file from data i previously read. I've read some things about (a so called) libtiff.h which may be usefull but i can't find where to get it, neither how to install it.

Does anyone know how a .TIFF file data is stored so that i can read it and apply changes to it?

Also, Does anyone have any experience with handling image files and editing in C? Where did you learn it from? Do you know of any place i could search for information/tutorials?

Any help will be very usefull, Thanks in advance.

Marc
  • 1
  • 1
  • 2
    perhaps consider a different language. Python, with `numpy`, makes custom manipulation of images/arrays a lot easier than you could ever do with C. – Christoph Rackwitz Feb 12 '22 at 18:33

1 Answers1

1

You can do an enormous amount of very sophisticated processing on TIFFs, or any one of 190+ other formats with ImageMagick without any need to understand TIFF format or write any C. Try searching on Stack Overflow for [imagemagick]

If you want to do processing yourself, consider https://cimg.eu

Another option might be to convert your TIFFs to NetPBM which is much, much simpler to read and write in C. That would be as follows with ImageMagick:

magick INPUT.TIFF -compress none OUTPUT.PPM
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Or possibly convert to raw format? What do you think Mark? Is ascii format PPM better? – fmw42 Feb 12 '22 at 20:48
  • @fmw42 You're probably right. We could do with some input/feedback from OP. Is his data float or integer? 8-bit or 16-bit? Greyscale or RGB? I was just trying to help with a few ideas. Let's see if there's some feedback... – Mark Setchell Feb 12 '22 at 21:48