Sorry for omitting what was clear for me, yes it is.You didn't confirm that mapslist was a Basic4ppc ImageList but it seems so.
At runtime, the list contains 10 maps of 1000*1000, they are assigned by: mapslist.item(i) = [filename]Was the offending image assigned to the ImageList at design or runtime?
- yes.Did this happen with more than one image?
No, all 10 are assigned at runtime.Were there a misture of images in the ImageList assigned at design and runtime?
Yes.Is "compilation to desktop " optimised compiled?
No, I have a small test program in which the problem does not appearYou don't have some example code that produces the problem you could post do you?
I am afraid that is not much help. I, or Erel, need to see the problem. I suspect something in the code of the failing application may be confusing the optimised compiler.No, I have a small test program in which the problem does not appearand I attach it without the map (which is 467 KB).
...
For i = 1 To 10
mapslist.Add(AppPath & "\maps\blank.jpg")
Next
...
Sub replace_all_maps(a,b)
temp = map_header
ind = 0
For i = a-1 To a+1
For j = b+1 To b-1 Step - 1
ind = ind + 1
FN = temp & Format(i,"D2") & Format(j,"D2") & ".jpg"
If FileExist(FN) Then mapslist.Item(ind) = FN Else mapslist.Item(ind) = mapslist.Item(0)
Next
Next
End Sub
...
mapdst.New1(0,0,IW,IH)
mapsrc.New1(left,top,IWZ,IHZ)
'image1.Image = mapslist.item(5)
drx.DrawImage(mapslist.item(5),mapsrc.Value,mapdst.Value,False)
...
If FileExist(FN) Then
mapslist.Item(ind) = FN [COLOR="Red"]' Error! assigning a string not an image[/COLOR]
Else
mapslist.Item(ind) = mapslist.Item(0) [COLOR="SeaGreen"]' OK, this is an image assignment[/COLOR]
End If
form7.DrawImage(maps.Item(5),left,top, lmore ,tmore)
I've had a look at a lot of generated ImageList code over the the last 24 hours and I'm afraid it is unless Erel intended ImageList to only work properly with Form.DrawImage, or the intrinsic Image control, which I doubt.so the problem is not in the compiler only.
Because in that case the ImageLib contained bitmap references which are what DrawImage expects.OK. Why there is no compiler problem in the test program I attached before
Sub App_Start
Form1.Show
img.New4
' image1.Image = AppPath & "\startup.ico"
icn.New1( AppPath & "\startup.ico")
icn.Value = icn.GetIcon0(AppPath & "\startup2.exe",True)
img.Value = icn.ToBitmap(icn.Value)
form1.Text = icn.ValueIsNull
image1.Image = icn.Value
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?