[quote]WebPicture has a new Constructor for creating multi-resolution pictures for files on disk.
Constructor(width As Integer, height As Integer, files() As FolderItem)
This results in a file-based WebPicture which saves on memory and is only loaded/delivered to a browser when it is requested.
WebImageView, WebCanvas and WebToolbar have all been updated to use the new WebPicture format and deliver high resolution images to browsers that support them.[/quote]
I tried :
1- Method for pre-loading all my pictures
WHLogo is an app.WebPicture
[code]Private Sub LoadGlobalPictures()
Dim iPath As String = “…/Graphics/”
WHLogo = LoadPic(iPath, “80x80WHLogoSmall@1x.png,80x80WHLogoSmall@2x.png,80x80WHLogoSmall@3x.png”)
End Sub[/code]
2- Method for making a webpicture from multiple folderitems
[code]Private Function LoadPic(path As String, picNames As String) As WebPicture
Dim fs() As FolderItem
Dim picNamesArray() As String = Split(picNames, “,”)
For i As Integer = 0 To picNamesArray.Ubound
Dim f As FolderItem = GetFolderItem(path + picNamesArray(i), FolderItem.PathTypeNative)
If f <> Nil Then
fs.Append f
End If
Next i
If fs.Ubound <> -1 Then
Dim w As WebPicture = New WebPicture(fs)
Call w.Preload
Return w
Else
Return Nil
End If
End Function
[/code]
3- On Open
Sub Open()
Me.Picture = app.WHLogo
End Sub
I get into two issues :
1- In debug mode, the app stalls showing “event loop” in the “stack” part of the debugger when the Image Well open event is triggered
2- The image doesn’t show…
Any Idea about what I’m doing wrong?
Thanks!