merging image, need help !!

Targos

New member
Joined
Sep 9, 2003
Messages
1
ive got an white image of 128*128 px, an another smaller image.
I want to put my smaller image in the white image, then put the result in an imagelist to show it in a listview.

this is my code :

Dim img128 As Image

img128 = Image.FromFile("c:\test\128.jpg")

Dim g As Graphics = Graphics.FromImage(img128)

w = imgRedim.Width
h = imgRedim.Height

g.DrawImage(imgRedim, 1, 1, w, h)
g.Save()
g.Dispose()

imgRedim = img128
imgRedim.Save("c:\test\test.jpg")

If PictureBox1.Image Is Nothing Then
PictureBox1.Image = imgRedim
End If

ilLarge.Images.Add(imgRedim)

My result image seems good.Its readable in a picturebox, the jpg files created is openable with photoshop but i cant see it in the listview !! jpg file or memory image .......... Why ???
 
Try putting the Image from the ImageList into a Bitmap object before you set it as a listview item.
 
Last edited by a moderator:
Back
Top