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
 TImageENView - PDF to Bitmap blurry issue

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
PamN Posted - Jan 07 2022 : 20:17:04
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.
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 08 2022 : 16:14:26
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
PamN Posted - Jan 08 2022 : 14:42:48
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.
PamN Posted - Jan 07 2022 : 22:27:34
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;
xequte Posted - Jan 07 2022 : 22:17:22
Hi

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

Nigel
Xequte Software
www.imageen.com