Rank: Member
Groups: Member
Joined: 8/10/2004(UTC) Posts: 2
|
I'm having a problem setting a a background in an overlay image to transparent before calling DrawOnBitmap. After I import the image to be overlayed, I skew it (it must be skewed), and the resulting overlay image has an opaque white background which shows when it is drawn on the base bitmap image. Here is the relevent portions of my code: Code:imgBase.LoadFromFile Server.MapPath("base.tif")
imgBorder.LoadFromFile Server.MapPath("product.tif")
imgBorder.Transforms.Resize ,30
imgBorder.Transforms.Skew ,-13
imgBorder.Transparentize &hFFFFFFFF
imgBorderPalette.SetTransparentColor &hFFFFFFFF
If imgBorder.HasAlphaChannel Then
For i = 1 to 3
imgBorder.DrawOnBitmap imgBase, varX, varY, , , , , , ,CombineModeAlpha
varX = varX + varBorderWidth
varY = varY - 32
Next
End If
imgBase.Formats.SelectCurrent "JPEG"
imgBase.SaveToFile Server.MapPath("combined.jpg")
Edited by user Monday, December 24, 2007 5:05:29 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Could you submit case with base.tif and product.tif files in order we tested it? Edited by user Friday, May 23, 2008 3:55:45 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 8/10/2004(UTC) Posts: 2
|
Thank you, Fedor, but I found the problem.. I was not including the constants file, so my use of 'CombineModeAlpha' was gibberish to the object...I changed the setting to a vlaue of '1' and voila, it worked.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.