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
 resizing and dpi
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tcardinal

27 Posts

Posted - Feb 10 2012 :  17:57:25  Show Profile  Reply
How is dpi used in ImageEN? I know dpi is a printing measure and obviously doesn't relate to the actual quality of the image but how big you print it, but a client is hung up on this. I have an image created out of an A1 sized pdf which is at 72dpi. I need to resize it to A4 and retain the 72dpi. I resize it to 595 x 842 pixels (which apparently is A4 at 72 dpi) but when I look at the params it is 300dpi. Thansk for any pointers

fab

1310 Posts

Posted - Feb 11 2012 :  06:12:38  Show Profile  Reply
A1 (23.4 × 33.1 inches) at 72dpi corresponds to an image of 23.4*72 x 33.1*72 = 1684 x 2383 pixels
A4 (8.3 × 11.7 inches) at 72dpi corresponds to an image of 8.3*72 x 11.7*72 = 597 x 842 pixels

So, yes, you have to resize the image to 597 x 842 with:

ImageEnView.Proc.Resample(597, 842, rfTriangle);

Now you have to change DPI info, with:

ImageEnView.IO.Params.Dpi := 72;

Finally you can save the image (choose a format that supports DPI tags):

ImageEnView.IO.SaveToFile('output.jpg');

Hope this helps.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: