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
 Scan with JPEG compression results in empty PDF

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
proethl Posted - Oct 28 2020 : 06:02:57
After updating from IEvolution 3.1.1.0 to 8.0.0.0 the following code results in empty PDFs


using (var imgTool = new IEImage())
{
	var ext = Path.GetExtension(filename).ToLower();

	img.IOParams.FileFormat = IEFileFormats.PDF;
	
	var resolution = Math.Max(TwainParams.XResolution.CurrentValue, TwainParams.YResolution.CurrentValue)
	img.IOParams.JPEG_ColorSpace = IOParams.JPEGColorSpace.RGB;
	
	if (resolution <= 150)
	{
		img.IOParams.JPEG_Quality = 50;
	}
	else if (resolution <= 300)
	{
		img.IOParams.JPEG_Quality = 65;
	}
	else
	{
		img.IOParams.JPEG_Quality = 80;

	}
	
	img.IOParams.PDF_Compression = IOParams.PDFCompression.JPEG;
	imgTool.CreatePDFFile(filename);

	for (var i = 0; i < _imgThumbnails.ImageList.ImageCount; i++)
	{
		_imgThumbnails.ImageList.CopyTo(i, imgTool);
		imgTool.SaveToPDF();
	}
	imgTool.ClosePDFFile();
	
}


Changing the compression from IOParams.PDFCompression.JPEG to IOParams.PDFCompression.LZW works, but the resulting files are much larger.

Is JPEG compression broken? Any hints?
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 29 2020 : 01:58:07
Hi

It does seem like there is an issue there. We'll need to investigate when we do our next IEvolution update.



Nigel
Xequte Software
www.imageen.com