Sign in to follow this  
Followers 0
supersonic

PNG only partly displayed

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

UEZ,

I used _GDIPlus_GraphicsDrawImageRect before - same result...

Share this post


Link to post
Share on other sites

Ahh!!! My fault. PNG data is read from a XML file and a node can max. store ~ 32k. So the image is cropped... Sorry for bothering...

Share this post


Link to post
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
Sign in to follow this  
Followers 0