Hi
I have some problems with the transparent color
when using the imaging to resize and rotate
It is just a simple bitmap drawing with white backcolor created in MS Paint
Call Imaging1.CreateImageFromPicture(Picture2.Picture)
Call Imaging1.ResizeImage(width, height, InterpolationModeHighQuality)
Call Imaging1.RotateAngleBackColor(Angle, White)
' Then loading the picture in to my windowless user control
MaskColor = &H80000005& ' (= White)
Picture = Imaging1.GetPicture
MaskPicture = Imaging1.GetPicture
Then the white color is not longer transparent
If I just load the picture direct then no problem to have the white color
transparent
MaskColor = &H80000005& ' (= White)
Picture = Picture2.Picture
MaskPicture = Picture2.Picture
It seems that the white color code is being changed
Anything I do wrong ??
Finn
Transparent color when resize and rotate in VB6
Hi finn.
The problem come from vb wich seems to doesn't support all the properties of the picture objects returned by the GDI+ API.
I can suggest you to proceed like that:
Regards,
Loïc
The problem come from vb wich seems to doesn't support all the properties of the picture objects returned by the GDI+ API.
I can suggest you to proceed like that:
Code: Select all
Call Imaging1.CreateImageFromPicture(Picture2.Picture)
Call Imaging1.ResizeImage(Width, Height, InterpolationModeHighQuality)
Call Imaging1.RotateAngleBackColor(Angle, White)
' Then loading the picture in to my windowless user control
Call Imaging1.SaveAsBmp("tmpbitmap.tmp")
Imaging1.CloseNativeImage
MaskColor = &H80000005 ' (= White)
Picture = LoadPicture("tmpbitmap.tmp")
MaskPicture = Picture
Regards,
Loïc
Who is online
Users browsing this forum: No registered users and 0 guests