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
 IETextLayer Convert to Image DPI problem (IEVolution .NET)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Deeron

67 Posts

Posted - Jan 31 2022 :  08:41:49  Show Profile  Reply
Hi Nigel,

Earlier you sent me a beta fix for my DPI problem (ievolutionBeta22119), but now I noticed a strange thing. But it is possible that I need to set something in the C# code below. I think I need help.

I load an image into ieViewer (this is the layer with index 0, the image is DpiX = 300 and DpiY = 300) and then create a layer of type IEText:


            //I load the base image (layer index: 0)
            ieViewer1.Image.LoadImage(ieViewer1.Image.ExecuteOpenDialog("", "", false, 1));
            ieViewer1.Image.CurrentLayer.Locked = true;
            ieViewer1.Image.CurrentLayer.Selectable = false;

            //I create a simple type of IEText layer
            ieViewer1.Image.LayersAdd(IELayerKind.Text);
            IETextLayer iETextLayer = (IETextLayer)ieViewer1.Image.CurrentLayer;
            iETextLayer.Text = "TEST";
            ieViewer1.Image.CurrentLayer.ConvertToImageLayer();
            Image img = ieViewer1.Image.GetNetImage();

            MessageBox.Show("Loaded ieViewer1.Image (layer index 0) DpiX: " + ieViewer1.Image.DpiX.ToString() + 
                "\r\nLoaded ieViewer1.Image (layer index 0) DpiY: " + ieViewer1.Image.DpiY.ToString() + 
                "\r\n\r\n Converted Text to Image DpiX: " + img.HorizontalResolution.ToString() + 
                "\r\n Converted Text to Image DpiY: " + img.VerticalResolution.ToString());


When I convert the layer of type IEText to image type and get it with the GetNetImage method, why are DpiX and DpiY 96?
As I noticed, any layer type (IEShape, IELine, etc.) I convert to an image has 96 DpiX and DpiY.
How can I tell the conversion to take the DpiX and DpiY values of the layer with index 0 (base image)?

Thanks,
Deeron

xequte

38198 Posts

Posted - Jan 31 2022 :  22:59:18  Show Profile  Reply
Hi Deeron

How about if you set the ieViewer1.Image.DpiX/DpiY to 300 before calling ieViewer1.Image.GetNetImage()

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Deeron

67 Posts

Posted - Feb 01 2022 :  11:27:09  Show Profile  Reply
Hi Nigel,

I tried, but the result was still 96 DPI after calling the GetNetImage() method.
There seems to be something wrong. :((


            ieViewer1.Image.LoadImage(ieViewer1.Image.ExecuteOpenDialog("", "", false, 1));
            ieViewer1.Image.CurrentLayer.Locked = true;
            ieViewer1.Image.CurrentLayer.Selectable = false;


            ieViewer1.Image.LayersAdd(IELayerKind.Text);
            IETextLayer iETextLayer = (IETextLayer)ieViewer1.Image.CurrentLayer;
            iETextLayer.Text = "TEST";
            ieViewer1.Image.CurrentLayer.ConvertToImageLayer();
            ieViewer1.Image.DpiX = 300;
            ieViewer1.Image.DpiY = 300;
            Image img = ieViewer1.Image.GetNetImage();

            MessageBox.Show("Loaded ieViewer1.Image (layer index 0) DpiX: " + ieViewer1.Image.DpiX.ToString() + 
                "\r\nLoaded ieViewer1.Image (layer index 0) DpiY: " + ieViewer1.Image.DpiY.ToString() + 
                "\r\n\r\n Converted Text to Image DpiX: " + img.HorizontalResolution.ToString() + 
                "\r\n Converted Text to Image DpiY: " + img.VerticalResolution.ToString());


Regards,
Deeron
Go to Top of Page

xequte

38198 Posts

Posted - Feb 07 2022 :  21:48:57  Show Profile  Reply
Hi Deeron

We'll have a fix for this in the upcoming release.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Deeron

67 Posts

Posted - Feb 09 2022 :  09:45:38  Show Profile  Reply
Hi Nigel,

OK, I look forward to the next release.

Thanks.

Regards,
Deeron
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: