Re: PNG image displayed larger in wx widget without any scale change

Alexandra Grigoras <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hi Maarten,

Indeed the display difference I see between my wxPython based tool and my 
eclipse based tool/Paint/other image editors is from scale and layout 
settings of my display of 125%. I have changed setting to 100% and now 
wxPython image display size is aligned with the rest of tools. I have 
noticed that when scale and layout settings higher than 100% only  wxPython 
image display size is larger, the rest of the tools display image at same 
size. Is there a way to keep same size for wxPython image display when 
changing display DPI?

Regards,
Alexandra

Pe vineri, 12 mai 2023, la 16:46:21 UTC+3, Maarten Bent a scris:

> Hi,
>
> Do you use a non-standard DPI? Like 125% or 150% scaling in Windows.
> The 100% in paint is really unreliable with this. See my attached picture 
> where I made a screenshot of the widgets sample (fullscreen 1920x1040 on a 
> monitor with normal/100% scaling).
> Then I past it in paint (same monitor, also fullscreen 1920x1040). You 
> would expect it to fill (even overfill) the entire paint window, but it 
> fills only 2/3ths.
> Even though it shows the correct number of pixels, and 100%, it is too 
> small. This probably happens because the scaling of my main monitor is 150%.
>
> tldr: you can't trust the 100% in paint.
>
> Secondly, images in wxStaticBitmap will automatically scale to the 
> display DPI when per-monitor DPI is enabled.
>
> Maarten
>
>
> On 12-5-2023 13:19, Alexandra Grigoras wrote:
>
> Hi all,
>
> I have a problem figuring out why PNG image is displayed larger in a wx 
> widget than its actual size without making any scale change(Python 3.10, 
> wxpython 4.2.0, Windows 10). I have tried wx.ScrolledWindow/wx.Panel with 
> wxStaticBitmap, wx.lib.statbmp.GenStaticBitmap and overwrite of 
> wx.lib.statbmp.GenStaticBitmap's OnPaint method and debugged height, width 
> and scale members on every object up to wx.DC and I have not found any 
> explanation: height and width are actual height and width  the image and 
> scale is 1.0. I have attached picture where in left size is image with its 
> real size and in right side is how it is displayed in wx.ScrolledWindow.
> I would need first to understand why PNG image is displayed larger in a wx 
> widget than its actual size and second to display PNG image in 
> wx.ScrolledWindow at its actual real size. 
>
> Regards and thank you in advance,
> Alexandra
>
> -- 
> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "wx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/wx-users/3eb7390c-6e26-4169-85b9-084b284f8eaen%40googlegroups.com 
> <https://groups.google.com/d/msgid/wx-users/3eb7390c-6e26-4169-85b9-084b284f8eaen%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/9cb0102a-3002-442b-a28b-df3215ec4497n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.