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
 TIFF - LZW compression - 16 bit

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
graphman Posted - Oct 12 2011 : 02:51:17
Is there a way to save file to TIFF format with LZW compression and 16 bit color depth?

How?
4   L A T E S T    R E P L I E S    (Newest First)
graphman Posted - Oct 12 2011 : 06:56:00
Thanks.
fab Posted - Oct 12 2011 : 04:28:02
quote:
ImageEnView1.LegacyBitmap := false;

It tells ImageEn to use TIEBitmap instead of TBitmap. TIEBitmap can handle 16 bit per channel RGB images, while TBitmap cannot.

quote:
ImageEnView1.IEBitmap.PixelFormat := ie48RGB;

It converts current image (8 bit per channel RGB) to 16 bit per channel RGB.
graphman Posted - Oct 12 2011 : 03:51:26
Thanks.

BUT

What these strings for?

// convert image to 48 bit RGB
ImageEnView1.LegacyBitmap := false;
ImageEnView1.IEBitmap.PixelFormat := ie48RGB;
fab Posted - Oct 12 2011 : 03:04:59
You have to set BitsPerSample=16 and set the compression.
This example converts input file to 16 bit per channel and compress it using LZW:

  // load input.jpg
  ImageEnView1.IO.LoadFromFile('input.jpg');

  // convert image to 48 bit RGB
  ImageEnView1.LegacyBitmap := false;
  ImageEnView1.IEBitmap.PixelFormat := ie48RGB;
  
  // save as LZW, 16 bit per channel
  ImageEnView1.IO.Params.TIFF_Compression := IoTIFF_LZW;
  ImageEnView1.IO.Params.TIFF_PhotometInterpret := ioTIFF_RGB;
  ImageEnView1.IO.Params.BitsPerSample := 16;
  ImageEnView1.IO.Params.SamplesPerPixel := 3;
  ImageEnView1.IO.SaveToFile('output.tif');