Problem with PNG pictures on Windows

  1. 3 months ago

    Marc C

    is not verified Jul 10 Pre-Release Testers, Xojo Pro near Lyon, France

    How to make a PNG image not crenellated / pixelated on Windows 10?

    Here is the same PNG image drawn by DrawPicture in a Canvas :
    on MacOS 10.14 : -image-
    on Windows 10 : -image-

    Is there a solution to improve rendering on Windows?

    Xojo 2018r4 or 2019r11

    Put this before the g.drawpicture

    g.AntiAliasMode = Global.Graphics.AntiAliasModes.HighQuality

    Additional info here http://docs.xojo.com/Graphics.AntiAliasMode

  2. Horst J

    Jul 10 Pre-Release Testers, Xojo Pro Europe, Germany, Stuttgart

    First, you must take a look on your graphics file. Is ist a HiDPI picture? Then you must check your display settings. Has you Mac a Retina display? For Windows10 there is a problem if your system has 2 displays with different resolutions. If your Windows10 notebook has a HiDPI display and your external display is not a HiDPI display, the graphic looks different, if you move your application window from display 1 to display 2. Also you must check, if your display settings has a zoom factor of 100% or more.

  3. Julian S

    Jul 14 Pre-Release Testers, Xojo Pro UK

    It look like anti-aliasing is off, could you link the image so we can try it here?

  4. Kevin G

    Jul 14 Pre-Release Testers, Xojo Pro Gatesheed, England

    If you are scaling the picture when drawing it could be that interpolation isn’t being used.

    I would maybe also check to see if the PNG is interlaced. If it is try resaving it as non interlaced to see if that helps.

  5. Derek D

    Jul 14 Pre-Release Testers Newnan, GA. USA

    I use .PNGs routinely on Xojo and I don't have this issue. Make sure the image is scaled outside of Xojo to what you want to use, and that it isn't interlaced.

  6. Marc C

    is not verified Jul 15 Pre-Release Testers, Xojo Pro near Lyon, France
    Edited 3 months ago

    Here is the original PNG image http://www.marinelabel.com/xo/PIC1617.png

    How do you see that it is interlaced or not?

    The picture is resized in Xojo, because in this program we do not know how the user will display it.

  7. Julian S

    Jul 15 Pre-Release Testers, Xojo Pro Answer UK
    Edited 3 months ago

    Put this before the g.drawpicture

    g.AntiAliasMode = Global.Graphics.AntiAliasModes.HighQuality

    Additional info here http://docs.xojo.com/Graphics.AntiAliasMode

  8. Marc C

    is not verified Jul 17 Pre-Release Testers, Xojo Pro near Lyon, France

    yes, it's much better, thank you Julian !

or Sign Up to reply!