canvas.backdrop retina

Hello,
I’m having trouble assigning a picture to a canvas.backdrop when Retina is enabled:

//select a picture in the usual openDialog
if f <> nil then
dim origPct as picture = picture.open(f)
Dim p as new picture(origPct.Width/ScaleFactor, origPct.Height/ScaleFactor )
p.graphics.drawPicture origPct, 0, 0, p.width, p.height, 0, 0, origPct.width, origPct.height
Canvas1.Backdrop = p
end if

The result I get is not as crisp as when I disable Retina.
I read Greg’s doc, but I guess I’m not able to implement it.
Suggestions welcome. Thanks.

Hello,
sorry, I’ve forgotten to mention that if I set canvas1.backdrop = origPct, then in retina mode the dimension of the picture is 64x64, while in non-retina mode dim. is 32x32.
That’s why I create a new pict half the size of origPct :
Dim p as new picture(origPct.Width/ScaleFactor, origPct.Height/ScaleFactor )
p.graphics.drawPicture origPct, 0, 0, p.width, p.height, 0, 0, origPct.width, origPct.height
Canvas1.Backdrop = p

does this work?

dim origPct as picture = picture.open(f) origPct.VerticalResolution = 144 origPct.HorizontalResolution = 144 Canvas1.Backdrop = origPct

Make sure you’ve also read
http://blog.xojo.com/advanced-retina/hidpi-bitmapforcaching-and-scalefactorchanged
http://blog.xojo.com/a-journey-of-a-thousand-pixels

Sorry, that won’t work. see https://forum.xojo.com/conversation/post/262662
You need to create an indexed image picture

[code]dim origPct as picture = picture.open(f)

dim p As new Picture(32, 32, Array(origPct))

Canvas1.Backdrop = p[/code]

@Will Yes, I had already tried your first snippet (and other snippets you had offered in the last days).
As for the last one, I had tried making a pict array after reading Greg’s doc; but the results were not satisfactory. Now things are OK. Thank you very very much.

@Norman Yes, Norman. I read them over and over again, but unfortunately I was not able to put them into practice. Thanks.