ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Convert RGB TIFF to TIFF G4

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JanN Posted - Oct 30 2012 : 08:59:24
Hi,

I already could build TIFF G4 files out of JPEG files. But somehow my code doesn't work in this particular case. I have an RGB TIFF file and want to convert it to BW. But whatever I do, it seems there is no difference between input and output file.

I tried two approaches:


Tiff.IO.LoadFromFile(inputfile, ioTIFF);
Tiff.IO.Params.TIFF_Compression := TIOTIFFCompression.ioTIFF_G4FAX;
Tiff.IO.Params.TIFF_PhotometInterpret := ioTIFF_BLACKISZERO;
Tiff.IO.Params.BitsPerSample := 1;
Tiff.IO.Params.SamplesPerPixel := 1;
Tiff.IO.Params.ImageIndex := i-1;
Tiff.IO.SaveToFileTIFF(outputfile)


Tiff.IO.LoadFromFile(inputfile, ioTIFF);
Tiff.Proc.ConvertToBW_FloydSteinberg;
Tiff.IO.SaveToFileTIFF(outputfile)


Is there anything wrong with my code? Could it be the original TIFF file which causes problems?

Regards,
Jan
2   L A T E S T    R E P L I E S    (Newest First)
JanN Posted - Oct 30 2012 : 10:25:14
William, thank you very much for your support. It seems I had an error in my code which led to a wrong output file.
w2m Posted - Oct 30 2012 : 09:51:39
I tested your code here and found that the both approaches worked as expected. Send me your tif file and I'll test it with your image.


William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html