How can i write text in a tif picture?
-
Hello! I wanna write a Text in a tif picture. It can be intern in the tif File (if it's possible) or the text can also stay in a corner of the picture... Or if you know another (easyer) way to save a text into the tif picture, please tell me!! I have no idea how i could do this! Please Help me! Thanks! Greetings Ronny
-
Hello! I wanna write a Text in a tif picture. It can be intern in the tif File (if it's possible) or the text can also stay in a corner of the picture... Or if you know another (easyer) way to save a text into the tif picture, please tell me!! I have no idea how i could do this! Please Help me! Thanks! Greetings Ronny
Have you read the TIFF Format[^] specs? If yes, then the easiest way I know about is: 01. Create your character matrices (these can be simple 2D byte arrays specifying the on/off status of a pixel) e.g 00011000 00100100 00100100 00111100 01000010 01000010 10000001 10000001 can be 'A' 02. now, create your image data using these. 03. Then create your tiff specification Tags. 04. Write all the data into a file. I Hope this helps "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.
-
Have you read the TIFF Format[^] specs? If yes, then the easiest way I know about is: 01. Create your character matrices (these can be simple 2D byte arrays specifying the on/off status of a pixel) e.g 00011000 00100100 00100100 00111100 01000010 01000010 10000001 10000001 can be 'A' 02. now, create your image data using these. 03. Then create your tiff specification Tags. 04. Write all the data into a file. I Hope this helps "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.
-
Hello and thanks for your answer! But sorry that was a little bit to fast for me! I have a tif picture wich already exists, and i want to inser a text anyway..... Or can you tell me what functions i have to use? Thanks! Ronny
Ok, Try taking a look at the LibTiff[^] library. It is an opensource library for working with tiff images. You'll get usage intructions on the site too. What I was trying to say earlier was, that one way I found for writing text into image files is to create 2D pixel-value matrices for each character. i.e. each element in the matrix will be a pixel value. Then when you want to write a character in to an image, you just need to pick up the correct matrix and copy the pixel values in the correct positions. I'm not too sure even this explaination was good enough, well, I've never been too good at explaining things :)... just take a look at libtiff, it should help a bit. Also, searching google will give you a lot of great tuts. I hope this helps "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.
-
Ok, Try taking a look at the LibTiff[^] library. It is an opensource library for working with tiff images. You'll get usage intructions on the site too. What I was trying to say earlier was, that one way I found for writing text into image files is to create 2D pixel-value matrices for each character. i.e. each element in the matrix will be a pixel value. Then when you want to write a character in to an image, you just need to pick up the correct matrix and copy the pixel values in the correct positions. I'm not too sure even this explaination was good enough, well, I've never been too good at explaining things :)... just take a look at libtiff, it should help a bit. Also, searching google will give you a lot of great tuts. I hope this helps "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.
Hello! That was a great Link! The Library supports really gut functions.... I have already tried many of these functions, but there is also a big problem. When i create a tif File with Photoshop i can open the file without any problems but if i open the File who i have in my application it don't works. Is it possible to load the tif file as bmp, so i can work with the bmp File and save it after as tif? If it is possible how can i load it, to write in the bmp i should use the GDI (or not?), and how can i convert after the bmp in a tif file? And it is very importand that the pic don't lose quality, is it possible with out losing quality? I thank you very much for your help! Ronny
-
Hello! That was a great Link! The Library supports really gut functions.... I have already tried many of these functions, but there is also a big problem. When i create a tif File with Photoshop i can open the file without any problems but if i open the File who i have in my application it don't works. Is it possible to load the tif file as bmp, so i can work with the bmp File and save it after as tif? If it is possible how can i load it, to write in the bmp i should use the GDI (or not?), and how can i convert after the bmp in a tif file? And it is very importand that the pic don't lose quality, is it possible with out losing quality? I thank you very much for your help! Ronny
I think the libtiff library gives you the image data... which you can work with. I'm not sure. "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.