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 get ImageEn to output image in exact DPI

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
yogiyang Posted - Dec 08 2015 : 23:43:18
Hello,

In our software we allow users to load multiple images. Each image is on a separate layer.

We save such files as layer files.

Till there things work just great.

But when we Merge all Layers and try to save the file in JPG we want the final output file to be of 200 DPI. Tried everything that I know about ImageEn to cannot get expected result.

Setting parameters is not getting expected result...
For example I am setting following with hope to get expected DPI output in the final JPG file saved:

ImageEnViewMain.DpiX := 200
ImageEnViewMain.DpiY := 200;
ImageEnViewMain.IO.Params.JPEG_Quality := 100;
ImageEnViewMain.IO.Params.JPEG_Smooth := 3;
ImageEnViewMain.IO.Params.JPEG_Progressive := False;
ImageEnViewMain.IO.Params.JPEG_ColorSpace := ioJPEG_RGB;

ImageEnViewMain.IO.SaveToFileJpeg(FlName);


The above code does not yield expected result.

Please help me.

TIA


Yogi Yang
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 10 2015 : 14:12:55
Hi Yogi

You need to be setting the image params, not the display DPI:

ImageEnView1.IO.Params.DpiX := 200;
ImageEnView1.IO.Params.DpiY := 200;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
yogiyang Posted - Dec 09 2015 : 22:26:56
Hello Nigel,

When ImageEn saves a JPG file using the code I have posted in my first post it saves it in 300 DPI. Not only that it also shrinks the width and height of the image.

I confirmed this using Irfan View as well as Photoshop.

What I want to achieve is set the file DPI to 200.

TIA


Yogi Yang
yogiyang Posted - Dec 09 2015 : 22:23:18
Hi Bill,

Thanks for the tip.



Yogi Yang
xequte Posted - Dec 09 2015 : 21:15:35
Hi Yogi

In what way does it not "yield the expected result"?


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Dec 09 2015 : 08:06:36
Hi Yogi,

Try SetDPI...

Declaration
procedure SetDPI(dpiX, dpiY: integer);

Description
The SetDPI method sets the horizontal (DpiX) and vertical (DpiY) dots per inch of the current image. These values will be saved together with the image.
ImageEnViewMain.SetDPI(200, 200)

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development