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
 The problem while saving a file with 256 colors.

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
graph_man Posted - Feb 01 2022 : 18:59:58
The problem while saving a TIFF file with 256 colors.
The resulting file is greater than when saving 24 bits.
I can send a file to Nigel.
8   L A T E S T    R E P L I E S    (Newest First)
graph_man Posted - Feb 07 2022 : 04:36:52
Thank you
xequte Posted - Feb 06 2022 : 21:18:13
Hi

The image (KM num-bw.tif) contains an unused Alpha channel, so ImageEn auto-fixes your TIFF properties to ensure it is compatible.

You can prevent this by removing the unused alpha channel (which we will do automatically in the next update).

If ImageEnView1.IEBitmap.HasAlphaChannel(True) = False then
  ImageEnView1.IEBitmap.RemoveAlphaChannel();


Nigel
Xequte Software
www.imageen.com
graph_man Posted - Feb 03 2022 : 04:09:24
My code is

ImageEnView1.IO.LoadFromFile('d:\KM num-bw.tif');
Imageendialog - colors = 8bit - save
ImageEnView1.IO.SaveToFile('d:\KM num-bw_8bit.tif');
xequte Posted - Feb 02 2022 : 20:52:41
Hi

What is your code? The following gave me expected results:

  ImageEnView1.IO.LoadFromFile('d:\KM num-bw.tif');
  ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_LZW;
  IEGlobalSettings().AutoSetBitDepth := true;
  ImageEnView1.IEBitmap.PixelFormat := ie24RGB;
  ImageEnView1.IO.SaveToFile('d:\KM num-bw_24bit.tif');         // 707 KB

  ImageEnView1.IO.LoadFromFile('d:\KM num-bw.tif');
  ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_LZW;
  IEGlobalSettings().AutoSetBitDepth := true;
  ImageEnView1.IEBitmap.PixelFormat := ie8g;
  ImageEnView1.IO.SaveToFile('d:\KM num-bw_8bit.tif');          // 325 KB

  ImageEnView1.IO.LoadFromFile('d:\KM num-bw.tif');
  ImageEnView1.IO.Params.TIFF_Compression := ioTIFF_LZW;
  IEGlobalSettings().AutoSetBitDepth := true;
  ImageEnView1.IEBitmap.PixelFormat := ie1g;
  ImageEnView1.IO.SaveToFile('d:\KM num-bw_1bit.tif');          // 100 KB


Nigel
Xequte Software
www.imageen.com
graph_man Posted - Feb 02 2022 : 07:06:27
I sent you my file.
graph_man Posted - Feb 02 2022 : 03:52:54
Compression is the same for all tested colors - LZW.

Try saving your file in 16, 256 and 24k colors and you will see the problem.
xequte Posted - Feb 01 2022 : 19:42:10
Hi

Some compression types, like JPEG, cannot be used with 256 colors, so an alternative compression is substituted. This can make the file size larger.

Nigel
Xequte Software
www.imageen.com
graph_man Posted - Feb 01 2022 : 19:10:03
Although the Advanced dialog box shows a completely different file size.