WebImageViewer in retina resolution?

Is it possible to get a webImageViewer to display an image that is at 2x resolution in the new Web 2.0 framework?

I have a javascript hack solution which works, but causes a screen flash as the image chnages size.

Are you using an image set in the IDE or a multi-res image in your code?

Neither, my code is basically this:

dim f as folderitem = ... // PNG file on disk
dim p as picture = Picture.open(f)
dim wp as new WebPicture(p)
webImageViewer1.Picture = wp

I just tried to do this as an Picture / Image set, but this is crashing the IDE:

working with an imageSet to webPicture conversion:

dim p1 as picture = // a 300x200 picture
dim p2 as picture = // a 600x400 picture
dim parray() as Picture = array(p1,p2)
dim pImageSet as Picture = new picture(300,200, parray)
dim p3 as new WebPicture(pImageSet)  <-- the IDE is crashing on this line

Reported as feedback://showreport?report_id=66505

Edit: i uploaded a tiny project to reproduce the issue.

Crashing the IDE? or raising an exception in your app?

Oh yeah, don’t try to put it into a WebPicture. Assign it directly to the Picture property of the WebImageViewer. It should handle that automagically.

The IDE thforws an exception:
Framework failed assertion at CppExtras.h:73

Did you mean “assign the Picture directly to the WebImageViewer.picture property” ? If so, this doesn’t work: the IDE still throws the same exception.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.