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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Image quality pdf to tiff
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ole Ekerhovd

Norway
4 Posts

Posted - Dec 11 2021 :  04:32:01  Show Profile  Reply
Hi

I load a pdf file into a ImageEnmView.

After that I save to a database as Tiff (blob).

for i:=0 to imageenmview1.ImageCount-1 do
begin
imageenmview1.MIO.Params[i].TIFF_Compression:=ioTIFF_JPEG;
imageenmview1.MIO.Params[i].BitsPerSample:=2;
end;

The picture quality gets a bit blurry using above code.

As there are thousands of files saved to the database, size of saved data is important.
(Also client program and the database are at separate locations)

Is it possible to reduce size and at the same time maintain most of the quality?






xequte

38127 Posts

Posted - Dec 12 2021 :  00:26:46  Show Profile  Reply
Hi Ole

What engine are using to load the PDF? iepdf32.dll?

What is the StoreType of TImageEnMView (should be ietNormal).

If size is important and you are using ioTIFF_JPEG compression, why not just save to JPEG file?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ole Ekerhovd

Norway
4 Posts

Posted - Dec 13 2021 :  13:16:29  Show Profile  Reply
Hi Nigel

I use the iepdf32.dll. The pdf is "great looking" in the viewer, it is when I compress/save it gets blurry.

Store Type is ietNormal.

I need to use tiff, often there are several pages.

What are the best settings to reduce size and maintain as much of the quality as possible? Is ioTIFF_JPEG suitable?

Actually what I am working with is invoices, often with small letters and they can be hard to read after I have compressed the image.
Go to Top of Page

xequte

38127 Posts

Posted - Dec 13 2021 :  17:39:52  Show Profile  Reply
Hi Ole

This works well for me:

// Convert a multi-page PDF file to TIFF
// Ensure iepdf.dll is in the EXE folder
mbmp := TIEMultiBitmap.Create( 'D:\multi.pdf' );
mbmp.Params[0].TIFF_Compression := ioTIFF_LZW;
mbmp.DuplicateCompressionInfo();
mbmp.Write( 'D:\Converted.TIFF' );
mbmp.Free;


ioTIFF_JPEG should be good for color PDF files. It gives better compression than ioTIFF_LZW, without significant degredation.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ole Ekerhovd

Norway
4 Posts

Posted - Dec 13 2021 :  23:10:17  Show Profile  Reply
Thanks Nigel

Works great.

Compressed and fully readable :)

Pdf=200kb
ioTIFF_LZW=147kb
ioTIFF_JPEG=76kb

Regards from Norway,
Ole



Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: