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
 DPI of scanner changes when saving to file

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
pssien Posted - Oct 02 2015 : 06:26:29
This is a fragment of the coda that I am using for scanning a color document at 100 DPI.
After scanning the image, if I look at Params[0].DpiY property, it continues to be 100 DPI, but the saved image, it has 300 DPI.
Why IESaveToFile does not follow the properties of the original image, or in another way, how can I adjust the image to 100 DPI before saving.


  // Scanner params
  ImageEnMView1.MIO.TwainParams.YResolution.CurrentValue := 100;
  ImageEnMView1.MIO.TwainParams.XResolution.CurrentValue := 100;
  gbStat := ImageEnMView1.MIO.Acquire

  // Thumbnail of the scanned document
  ImageEnMView1.CopyToIEBitmap(0, ImageEnView1.IEBitmap);
  ImageEnView1.AutoFit := True;
  ImageEnView1.Fit;
  ImageEnMView1.ScrollBars := ssNone;
  ImageEnView1.Update;

  // Save to file
  ImageEnMView1.SelectedImage := 0;
  iIEBitmap := ImageEnMView1.GetTIEBitmap(0);
  iIEBitmap.IESaveToFile('C:\TEST.JPG', 90);
2   L A T E S T    R E P L I E S    (Newest First)
pssien Posted - Oct 05 2015 : 03:58:19
Thanks for your explanation, now it is working as expected.
xequte Posted - Oct 02 2015 : 15:55:57
Hi

An image has both its content (bitmap) and its image properties (params). You have filled your IEBitmap with the content, but not the params, so when you call iIEBitmap.IESaveToFile() it is saving with the default params.


Either retrieve the params as well, or use a method that includes the params:

http://www.imageen.com/help/TImageEnMView.GetImageToFile.html

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