Click here to Skip to main content
15,887,435 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: copying a .txt file to a .tif file Pin
Hamid_RT3-Aug-06 23:32
Hamid_RT3-Aug-06 23:32 
AnswerRe: copying a .txt file to a .tif file Pin
Kiran Pinjala3-Aug-06 23:41
Kiran Pinjala3-Aug-06 23:41 
GeneralRe: copying a .txt file to a .tif file Pin
Hamid_RT4-Aug-06 1:00
Hamid_RT4-Aug-06 1:00 
GeneralRe: copying a .txt file to a .tif file Pin
Kiran Pinjala4-Aug-06 2:48
Kiran Pinjala4-Aug-06 2:48 
GeneralRe: copying a .txt file to a .tif file Pin
Hamid_RT4-Aug-06 4:10
Hamid_RT4-Aug-06 4:10 
AnswerRe: copying a .txt file to a .tif file Pin
Ed.Poore3-Aug-06 23:38
Ed.Poore3-Aug-06 23:38 
AnswerRe: copying a .txt file to a .tif file Pin
David Crow4-Aug-06 2:50
David Crow4-Aug-06 2:50 
AnswerRe: copying a .txt file to a .tif file Pin
Viorel.4-Aug-06 2:54
Viorel.4-Aug-06 2:54 
We suppose your problem is "how to create a TIFF image file which contains just a white background and a simply formatted black text, loaded from a text file?"

As a hypothetical solution I would suggest you to try the CxImage library (http://www.codeproject.com/bitmap/cximage.asp[^], light source files).

I think a part of solution may look like this:

CxImage image(1024, 1024, 8, CXIMAGE_FORMAT_TIF);
HDC dc = ::GetWindowDC(NULL);
image.DrawString(hdc, 10, 10, "a line of text", RGB(0, 0, 0), "Arial"); // (repeat this for all of the lines of text, varying y)
::ReleaseDC(hdc, NULL);
image.Encode("file-name.tiff", CXIMAGE_FORMAT_TIF);

I hope it works.
GeneralRe: copying a .txt file to a .tif file Pin
Kiran Pinjala4-Aug-06 3:12
Kiran Pinjala4-Aug-06 3:12 
GeneralRe: copying a .txt file to a .tif file Pin
Viorel.4-Aug-06 3:33
Viorel.4-Aug-06 3:33 
QuestionPlaying audio in 5.1 multi channel sound card. Pin
jyoti_manoj3-Aug-06 22:43
jyoti_manoj3-Aug-06 22:43 
Questionstrange error in ostream Pin
sach!!3-Aug-06 22:08
sach!!3-Aug-06 22:08 
AnswerRe: strange error in ostream Pin
sunit53-Aug-06 23:42
sunit53-Aug-06 23:42 
GeneralRe: strange error in ostream Pin
sach!!4-Aug-06 0:19
sach!!4-Aug-06 0:19 
GeneralRe: strange error in ostream Pin
sunit54-Aug-06 0:23
sunit54-Aug-06 0:23 
Question.txt to .tiff? Pin
Kiran Pinjala3-Aug-06 21:46
Kiran Pinjala3-Aug-06 21:46 
AnswerRe: .txt to .tiff? Pin
Sebastian Schneider3-Aug-06 22:31
Sebastian Schneider3-Aug-06 22:31 
GeneralRe: .txt to .tiff? Pin
Neville Franks3-Aug-06 23:12
Neville Franks3-Aug-06 23:12 
GeneralRe: .txt to .tiff? Pin
ThatsAlok3-Aug-06 23:19
ThatsAlok3-Aug-06 23:19 
JokeRe: .txt to .tiff? Pin
Hamid_RT3-Aug-06 23:26
Hamid_RT3-Aug-06 23:26 
QuestionCoCreateGuid problem Pin
harsha_12343-Aug-06 21:23
harsha_12343-Aug-06 21:23 
AnswerRe: CoCreateGuid problem Pin
harsha_12343-Aug-06 21:32
harsha_12343-Aug-06 21:32 
AnswerRe: CoCreateGuid problem Pin
Hamid_RT3-Aug-06 22:14
Hamid_RT3-Aug-06 22:14 
Questionhow to get table when mouse moves over a button Pin
Manjunath S3-Aug-06 21:11
Manjunath S3-Aug-06 21:11 
AnswerRe: how to get table when mouse moves over a button Pin
Hamid_RT3-Aug-06 22:05
Hamid_RT3-Aug-06 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.