Bug in new SetItemBitmap() routine?
Bug in new SetItemBitmap() routine?
I have recently upgraded to V8 (yea!).
I noticed that you were true to your word and added the ThumbnailMgr.SetItemBitmap() routine
as I requested in the "How to update an already displayed Thumbnail?" thread.
Great, thanks !!
So, I already had an ugly (but working) work around (as you had suggested) but I was eager to change to using this API.
My testing seems to show that the routine does not work as advertized.
The issue is with the passed in index. It APPEARS that:
- the index is validated to be in the 0 .. ThumbCount-1 range
- however, a request to set the bitmap at index = N affects the bitmap at index = N + 1
(as long as N+1 is in the range of 0 to ThumbCount-1)
This means that even if I pass in Index+1 (as a hack), I can get all bitmaps properly updated EXCEPT for the last one,
because the validation range check seems to occur BEFORE the bitmaps are updated.
Can you please confirm this?
thanks
I noticed that you were true to your word and added the ThumbnailMgr.SetItemBitmap() routine
as I requested in the "How to update an already displayed Thumbnail?" thread.
Great, thanks !!
So, I already had an ugly (but working) work around (as you had suggested) but I was eager to change to using this API.
My testing seems to show that the routine does not work as advertized.
The issue is with the passed in index. It APPEARS that:
- the index is validated to be in the 0 .. ThumbCount-1 range
- however, a request to set the bitmap at index = N affects the bitmap at index = N + 1
(as long as N+1 is in the range of 0 to ThumbCount-1)
This means that even if I pass in Index+1 (as a hack), I can get all bitmaps properly updated EXCEPT for the last one,
because the validation range check seems to occur BEFORE the bitmaps are updated.
Can you please confirm this?
thanks
Re: Bug in new SetItemBitmap() routine?
Hi,
I am not able to reproduce the problem.
Here what I tried:
- Step1: load itemsfrom a directory
- Step2, the the loading is done, apply a dummy image on all items:
let me know if the problem persists.
Loïc
Note: Tested with 8.0.3
I am not able to reproduce the problem.
Here what I tried:
- Step1: load itemsfrom a directory
Code: Select all
ThumbnailEx1.LoadFromDirectory("D:\folder", True)
Code: Select all
Dim bm As Image
bm = Bitmap.FromFile("c:\dummy.bmp")
ThumbnailEx1.SetItemBitmap(0, CType(bm, Bitmap))
For i As Integer = 0 To ThumbnailEx1.ItemCount - 1
ThumbnailEx1.SetItemBitmap(i, CType(bm, Bitmap))
Next
let me know if the problem persists.
Loïc
Note: Tested with 8.0.3
Re: Bug in new SetItemBitmap() routine?
I appreciate the effort (and I'm trying not to whine) but that's not the API that I'm talking about.
You tested:
and I am using:
Thank you.
You tested:
Code: Select all
Public Sub SetItemBitmap(
ByVal ItemIdx As Integer,
ByVal Image As Bitmap
)
Code: Select all
Public Sub SetItemBitmap(
ByVal ItemIdx As Integer,
ByVal ImageID As Integer
)
Re: Bug in new SetItemBitmap() routine?
And, reading back, I can see that I DID NOT specify which one I was using.
So, bad on me for making a non-specific request.
And, to be clear, I appreciate all your efforts.
Thanks.
So, bad on me for making a non-specific request.
And, to be clear, I appreciate all your efforts.
Thanks.
Re: Bug in new SetItemBitmap() routine?
Hi,
No problem
Here what I tried:
This works like a charm.
Does the problem persists on your side ?
Kind regards,
Loïc
No problem
Here what I tried:
Code: Select all
Dim bm As Integer
bm = oGdPictureImaging.CreateGdPictureImageFromFile("c:\test.jpg")
For i As Integer = 0 To ThumbnailEx1.ItemCount - 1
ThumbnailEx1.SetItemBitmap(i, bm)
Next
Does the problem persists on your side ?
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest