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
 .NET IEvolution2 and PDF or TIFF compression

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
rlange Posted - Jul 02 2014 : 04:49:56
In the .NET Version (IEvolution2), setting the compression has no effect. The written file is always uncompressed in TIFF or PDF export.

C# code:


for (int i = 0; i < ieMulti1.ImageList.ImageCount; i++)
{
    ieMulti1.ImageList.GetIOParams(i).TIFF_Compression = AC.currentStack.ExportTIFFCompression;
}
ieMulti1.ImageList.SaveImages(tiffFileName);



IEImage img = new IEImage();
img.CreatePDFFile(pdfFileName);

for (int i = 0; i < ieMulti1.ImageList.ImageCount; i++)
{
    ieMulti1.ImageList.GetIOParams(i).PDF_Compression = AC.currentStack.ExportPDFCompression;
    ieMulti1.ImageList.CopyTo(i, img);
    img.IOParams.PDF_Compression = AC.currentStack.ExportPDFCompression;
    img.SaveToPDF();
}

img.ClosePDFFile();
img.Dispose();

4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 20 2014 : 18:25:12
Hi

You need to ensure BitsPerSample and SamplesPerPixel contain the right values (1 bit per sample and 1 sample per pixel in this case):

for (int i = 0; i < ieMulti1.ImageList.ImageCount; i++) {
    ieMulti1.ImageList.GetIOParams(i).TIFF_Compression = AC.currentStack.ExportTIFFCompression;
    ieMulti1.ImageList.GetIOParams(i).BitsPerSample = 1;
    ieMulti1.ImageList.GetIOParams(i).SamplesPerPixel = 1; }
ieMulti1.ImageList.SaveImages(tiffFileName);



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
rlange Posted - Aug 12 2014 : 14:23:14
Now i know why the TIFF compression failed.
Maybe you can help me how i can solve this problem.

First i load a 1bit TIFF Image into ieMultiScan (IEMulti).
After this, i copy this image to another IEMulti, here ieMulti1.
When i try to write the ieMutli1 with TIFF compression G4FAX (see code above) it is not compressed. The pixel format of the output file is suddenly 24bit.
Why? And how can i keep the original format?

Here the source for copying the images between the two IEMulti:

IEImage sourceImage = ieMultiScan.ImageList.GetImage(i);
IEImage image = new IEImage(sourceImage);
image.DpiX = sourceImage.DpiX;
image.DpiY = sourceImage.DpiY;
ieMultiScan.ImageList.ReleaseImage(sourceImage, i);
ieMulti1.ImageList.AppendImage(image);


Thank you in advance.
rlange Posted - Jul 28 2014 : 00:57:21
This seems to be the solution. When i use LZW compression it works for TIFF + PDF.
Thank you.
xequte Posted - Jul 09 2014 : 22:51:38
Hi

Is the selected compression suitable for the image pixel format? (e.g. "jpeg" compression doesn’t work with black/white images, G3/G4 compressions do not work with RGB images, etc).

Please try:

      ieViewer1.Image.LoadImage(@"test.jpg");

      ieViewer1.Image.IOParams.PDF_Compression = IOParams.PDFCompression.JPEG;
      ieViewer1.Image.CreatePDFFile(@"test.pdf");
      ieViewer1.Image.SaveToPDF();
      ieViewer1.Image.ClosePDFFile();


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com