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
 How to redimention a documento in inches?

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
jccruz Posted - Nov 27 2018 : 04:33:26
Hello!

I need to scan a document using a smartphone (mobile).
I am using the App Office Lens with 13.0MP (4160px x 3120px).
After scan, when I check the saved file (JPG), its properties are:

Width: 30.75in x Height: 45.70in
Width: 2952px x Height: 4394px
96 DPI
24bits

I need to redimension the document size to exact W: 8.5" x H: 11.7" keeping the aspect radio.

I too need to change the bit depth from 24bits to 8bits.

How can I do these two operation using Imageen?

Thanks everybody!

Jose Carlos

JCC
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 27 2018 : 22:29:27
Hi Jose

> I need to redimension the document size to exact W: 8.5" x H: 11.7"

The formulas for DPI are as follows:

dpiX := widthPixels div widthInches;
dpiY := heightPixels div heightInches;

widthPixels := widthInches * dpiX ;
heightPixels := heightInches * dpiY;

widthInches := widthPixels div dpiX ;
heightInches := heightPixels div dpiY;

// Set image dimensions to 8.5 x 11.7" 
ImageEnView1.IO.Params.DpiX := Round( ImageEnView1.IO.Params.Width / 8.5 );
ImageEnView1.IO.Params.DpiY := Round( ImageEnView1.IO.Params.Height / 11.7 );



> I too need to change the bit depth from 24bits to 8bits.


// Set pixel format to 8bit gray-scale
ImageEnView1.IEBitmap.PixelFormat := ie8g;
ImageEnView1.Update();


Nigel
Xequte Software
www.imageen.com