Jump to content

PNG only partly displayed


Recommended Posts

Hi,

I'm trying to display a PNG (Base64-encoded) after a second GUI is created; code:

Local $hImage = _GDIPlus_BitmapCreateFromMemory(Binary(_WinAPI_Base64Decode($sTmp)))
        Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($__g_hGUI1)
        _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
        _GDIPlus_GraphicsDispose($hGraphic)
        _GDIPlus_ImageDispose($hImage)

The result is an only partly displayed image (proportions are OK). If I display a PNG before I create the second GUI all is fine.

Maybe someone can help me out?

Link to comment
Share on other sites

Use  _GDIPlus_GraphicsDrawImageRect instead.

Seems that the PNG image has a different DPI than the default.

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...