Error in 2016 R4

Hello guys.

          I have a code that always worked well and that gives error in the 2016 R4 version, does anyone know why ?

The error is : This item does not exist (for NewPicture)

[code]p=launchFile.openaspicture
imageatual=launchFile.Nativepath
factor = Min( maxWidth / p.Width, maxHeight / p.Height )
factor = Min( factor, 1.0 ) // (don’t scale it up if it’s too small!)
factor= factor * 8

pic = NewPicture( p.Width * factor, p.Height * factor, 32 ) < < < < < < < < < < < < < Error is Here

pic.graphics.DrawPicture p, 0,0,pic.width,pic.height, 0,0,p.width,p.height
Janela_Preview.Canvas6.backdrop=pic[/code]

What kind of error do you get?

Hello Robert
The error is : This item does not exist (for NewPicture)

Newpicture has been removed It’s been marked as deprecated for a while)

Use pic = new picture( p.Width * factor, p.Height * factor, 32 ) instead

Whether you want to move to the new constructor which allows alpha channels is another question…

pic = new picture( p.Width * factor, p.Height * factor )

Lee

[quote=301883:@Lee Badham]Newpicture has been removed It’s been marked as deprecated for a while)

Use pic = new picture( p.Width * factor, p.Height * factor, 32 ) instead

Whether you want to move to the new constructor which allows alpha channels is another question…

pic = new picture( p.Width * factor, p.Height * factor )

Lee[/quote]

Tank You, Lee Badham.
Works fine !