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
 TImageENView - PDF to Bitmap blurry issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PamN

USA
3 Posts

Posted - Jan 07 2022 :  20:17:04  Show Profile  Reply
I load a pdf file into an ImageEnmView with ImageENView.IO.LoadFromFilePDF('c:\temp\mypdf.pdf') but when I convert the pdf into a bitmap with:ImageENView.PdfViewer.DrawTo(Bitmap) where Bitmap:TIEBitmap the quality is getting blurry as I scale the ratio of the bitmap. Is it possible to have the bitmap quality maintain the same as what we see in the pdfviewer and how should I do that?
Thanks in advance for your help.

xequte

38610 Posts

Posted - Jan 07 2022 :  22:17:22  Show Profile  Reply
Hi

Please email me for an update that supports sizing when using DrawTo.

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

PamN

USA
3 Posts

Posted - Jan 07 2022 :  22:27:34  Show Profile  Reply
Hi Nigel - I'm using ImageENView v10.0

//Here's how I load pdf into ImageEnView:
ImageEnView.LoadFromFilePDF(mypdf_file);

//Here's how I convert pdf in ImageENView into a bitmap
Bitmap := nil;
try
Bitmap := TIEBitmap.Create;
Bitmap.Resize(0, 0, 0, 0, 0);
Bitmap.ParamsEnabled := True;
Bitmap.Params.JPEG_Quality := 100; //make high quality 100%
Bitmap.Params.JPEG_Smooth := 0;

ImageENView.PdfViewer.DrawTo(Bitmap); //convert to bitmap. it seems drawTo cut down the resolution of bitmap
Bitmap.Write(Stream, ioJPEG); //write bitmap to TMemorystream with jpeq format

//Here's how I load the image from TMemoryStream
TGraphicEditor(FDoc.docEditor).LoadImageStream(Stream); //I got poor quality


finally
FreeAndNil(Bitmap);
end;
Go to Top of Page

PamN

USA
3 Posts

Posted - Jan 08 2022 :  14:42:48  Show Profile  Reply
Nigel - I upgrade ImageENView to 10.3 so I can set the global settings dpi to set to 144 but the drawTo function to return TieBitmap seems not taking dpi into account. I did set bitmap image width and height to large enough but still can't get a good quality image with text in it.
Thanks for quick response.
Go to Top of Page

xequte

38610 Posts

Posted - Jan 08 2022 :  16:14:26  Show Profile  Reply
Hi

Please email me for an update that supports:

procedure TIEPdfViewerInteraction.DrawTo(Bitmap: TIEBitmap; Width: Integer = -1; Height: Integer = -1; MaintainAR: Boolean = True);


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: