Hello,
I would like to do a product personnalisation system where we can put on a product an image / text simulation with picture-size / picture-emplacement managed (maybe with a sql database).
i found something's looking what i want but it's in PHP :
http://www.shirtcity.com/shop/
i want do the same but in ASP.Net / VB..
I did already something to change color of a picture (png) and place it on another product picture, here's the function that paint a picture :
Public Function ChangerCouleur(ByVal Img As Image, ByVal Couleur As Color) As Bitmap
'Création d'un 'Graphics' à partir du 'Bitmap' passée en paramètre
Dim gr As Graphics = Graphics.FromImage(Img)
'Création d'un mappage
Dim map(0) As System.Drawing.Imaging.ColorMap
map(0) = New System.Drawing.Imaging.ColorMap()
map(0).OldColor = Color.Black
map(0).NewColor = Couleur
'Création d'attributs d'image, avec le mappage créer juste avant comme contenu
Dim myAttributs As New ImageAttributes()
myAttributs.SetRemapTable(map)
'Dessin du motif à la couleur passée en paramètre
Dim Rect As New Rectangle(0, 0, Img.Width, Img.Height)
gr.DrawImage(Img, Rect, 0, 0, Img.Width, Img.Height, GraphicsUnit.Pixel, myAttributs)
'Redimensionnement
Dim Final As Image
Final = ScaleByPercent(Img, 20)
'Libération des objets de la mémoire
gr.Dispose()
Img.Dispose()
Return Final
End Function
But maybe do u have better ideas than me ? Or links to follow ?
Thanks :)