Skip to Content
avatar image
Former Member

Problem with EMF (Enhanced Metafile) image sizing displayed with Crystal Runtime

Hi,

I have modified some reports to include our company logo and other vector graphics in EMF (enhanced metafile) format rather than a raster/bitmap format as before. These have the advantage of small file sizes and high quality.

These images display ok in Crystal Reports (designer) 2016, and look perfect when printed or exported to PDF. However, when being opened in our business application on a machine with the latest runtime (13.0.20) installed, the metafile images are slightly squashed vertically and do not fill the full height of the bounding box (visible when hovering the mouse over the image). The same result happens when printed or exported to PDF.

This did not happen with version 13.0.18, however the problem with that version was that some of the metafile graphics were heavily pixelated when printed. Version 13.0.19 fixed the pixelation issue but introduced the vertical squashing issue.

I have tested and for some reason the images seem to be more squashed on Windows 7 than Windows 10. I made sure the test PCs had all Windows updates installed.

Are there any plans to fix this issue in a future runtime release?

Many thanks,
James

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 22, 2017 at 05:06 PM

    Hi James,

    Can you upload the report, no data just the image and image file to a file share so I can test it?

    Have you tried using the InterpolationMode API?

    LstInterpolationMode.Enabled = true;
    Array CRinterpolationMode = Enum.GetValues(typeof(System.Drawing.Drawing2D.InterpolationMode));
    foreach (object obj in CRinterpolationMode)
    {
    //CRInterpolMode.GetTypeCode(CRinterpolationMode);
    LstInterpolationMode.Items.Add(obj);
    }
    LstInterpolationMode.SelectedItem = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;

    The default is set to NearestNeighbor, either of the HighQuality modes should fix things for you.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2017 at 04:38 PM

    Hi Don,

    Thanks for you reply. I've uploaded my test report here: https://ufile.io/bose7

    Unfortunately this is a third-party business application and I am not the developer so I wouldn't be able to try using the API as you suggest but it might be something I can pass along to the application developers.

    I am curious as to what has changed between 13.0.18 and 13.0.19 that would have upset the sizing of EMF images. It only seems to be affecting vertical sizing and after testing on a few machines, the result is different in each case.

    Below is my machine which seems to display the images ok. I have put a black box around the first logo to show the area it should be filling. The second logo is a bitmap version to show the correct size, and this never gets squashed or stretched.

    Below is shown on another machine which shrinks the logo vertically

    reportwin7-3-0-20.png

    Other machines shrink it even more and one I have tested expands it vertically so it gets cropped off at the bottom.

    Seems very strange and inconsistent in any case!

    Thanks,
    James

    Add comment
    10|10000 characters needed characters exceeded