BMP looks terrible in Navision

Saint-SageSaint-Sage Member Posts: 92
Hello Everyone,

I have made a BMP in Fireworks and have tried to create a splash screen for navision. I am reading the file directly as a BLOB into the Picture table, then displaying into a picture box.

I have tried both 8bit and 24bit BMP's. They look fine in fireworks and in windows picture viewer, but when I display them in Navision they look grainy and of very poor quality.

Is this a weakness of Navision interfacing with the GDI or what?

Thanks in advance for any tips, as it stands it is almost worthless to do a splash screen if you cannot go beyond this quality.
#-o

No one loves you like the one who created you...

Answers

  • kinekine Member Posts: 12,562
    And which resolution and picture size you are using?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Saint-SageSaint-Sage Member Posts: 92
    Hello everyone,

    Thanks for the responses.

    The download you linked was great Waldo, but unfortunatly I don't have the ability to install this on every client machine.

    So I am back to trying to get a decent looking picture in Navision...

    The image size is 8.1 cm wide and 7.1 cm high. This is the equivalent of the size of the picturebox in Navision which records somewhere around 8122 and 7143 100/mm i.e. 81mm or 8.1cm.

    The resolution is 128 pixels/inch.

    I tried both 8bit and 24bit color depths. They looked similarly poor.

    Any clue as to what values Navision is expecting here?

    Thanks!

    No one loves you like the one who created you...
  • kinekine Member Posts: 12,562
    Shall you post example of the bitmap somewhere or PM me and I will send you my e-mail...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Saint-SageSaint-Sage Member Posts: 92
    Thanks go out to Kine for all his help on this subject who helped via email as well!


    Basically everyone thought it was a problem with Navision resizing the bmp, as it turns out, this was not the case.

    The picture box on the form was exactly 8.14cm Wide by 7.15cm High (reported in the properties tab of Navision). The image I created were those exact dimensions.

    Basically if I reduced the size of the image and tried to import, it showed a smaller image in the picture box, it did not expand it to fill the picturebox.

    However I think the problem was this, my default resolution was 128 pixels per inch or around 50pix per centimeter. When I increased the resolution to 256 pixels per inch, it expanded the size of the image to around 800x700. When I then imported this file into Navision, it resized perfectly to the picturebox, and the quality was much improved.

    So the problem was not with the size of the bitmap, but the resolution.

    I would suggest a resolution of at least 256 or 512 for high quality BMP's in Navision.

    No one loves you like the one who created you...
  • kinekine Member Posts: 12,562
    Or best is to use BMP with same resolution as your display (72DPI or 96DPI are common displays). It means that the size of one pixel in your BMP will have same size as one pixel on desktop. In this case, you can create the BMP exactly how it will be displayed because NAV do not need to resize the bitmap. If you will use another DPI (bigger), each Nth pixel will be lost (N = BMP DPI / DESKTOP DPI) and if you have some detail smaller than this, it can happen that the detail will be lost. It is the case of thiny lines on the bitmap. It is like detailed textures in games. And it is why games are using bi/tri/anisotropic filtering to reduce detail loss. 8)

    Just some theory for others about bitmaps, resolutions and resizing.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Saint-SageSaint-Sage Member Posts: 92
    So what you are saying is that I needed to set my resolution to 96 pixels per inch because my display is 96DPI? Any other settings will cause degradation?

    What happens if the image is moved to another display with a different DPI such as 72?

    I think I exported it with Bi Cubic filtering, would Bi Linear have been any better?

    Thanks again Kine!

    No one loves you like the one who created you...
  • kinekine Member Posts: 12,562
    edited 2007-03-29
    So what you are saying is that I needed to set my resolution to 96 pixels per inch because my display is 96DPI? Any other settings will cause degradation?
    It is much easier/complex (depends on point of view). Best thing is to find out the pixel size and DPI by experiment. Target is to have BMP with exact same pixel size as the the taget region where it will be displayed. The DPI is just needed to say NAV how is needed to resize the bitmap. The target DPI for NAV is fixed. If display has bigger DPI (you have for example 15'' LCD display with big resolution), target region will be much smaller on the display but pixel size will be same.

    How to find out the pixel size of the target region:
    Add black rectangle on the form in same size and position as you Image control. Run the form, make screenshot (for example with SnagIt), check the pixel size of the black rectangle in the bitmap. This is pixel size for your bitmap.

    How to find out the DPI:
    Set the DPI of you bitmap to 72. Import bitmap, run the form, if the bitmap don't fill whole region, use smaller DPI, if no whole bitmap is displayed, use bigger DPI. I assume that 72 will be the target DPI... (if you are not using Windows display setting for bigger fonts in applications).

    What happens if the image is moved to another display with a different DPI such as 72?
    Windows is using DPI just for recalculation of pixels into centimeters or inches (for example when displaying some ruler), but NAV is displaying the forms still in same size (it means when display has another DPI, the form will be smaller/bigger on the screen, but still same size in pixels)
    I think I exported it with Bi Cubic filtering, would Bi Linear have been any better?
    No, Bicubic is better than Bi linear because bicubic is calculating new value from pixels neighbouring on both axis (2D). Bilinear is calculating the value just in one direction (1D). Trilinear is in 3D (games etc.).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Saint-SageSaint-Sage Member Posts: 92
    :D YOU DA MAN!!!! =D>

    No one loves you like the one who created you...
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    This download can be used to modify the DPI-value of a BMP-file from inside Navision: Bitmap Resolution Convertor
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Sign In or Register to comment.