Thank you for your prompt response and efforts to help me find an answer to this frustrating problem.
I am doing multiple things with these images - I CANNOT LOAD them as 32 bit from the begining (or the middle, or the end)
the background images are in a library of existing 24 bit images that have various images combined with them along the way - the logo is the 2nd or 3rd step of 3-5 steps in compositing an image.
I don't really need the opacity value in the AlphaFeatherBlend and Alpha blend functions - I need to use the alpha channel as a MASK for the logo.
Once again - my goal is to:
Load the background into a Lead control
Load the logo into a Lead control
Copy the bitmap in the alpha channel into a second Lead as a mask
Combine the mask with an op_min flag
Combine the logo with an op_max flag
For example:
strPath = App.Path & "\logotest\"
iLogoHeight = 600
iLogoWidth = 600
leadBuilder.Load strPath & "blue frame.tif", 0, 0, 1
leadLogo.Load strPath & "cardinal logo alpha.tif", 0, 0, 1
leadLogoMask.Bitmap = leadLogo.BitmapAlpha
leadLogoMask.Size CDbl(iLogoWidth), CDbl(iLogoHeight), RESIZE_NORMAL
leadLogoMask.ColorRes 24, 0, 0, 0
leadBuilder.Combine 800, 200, iLogoWidth, iLogoHeight, leadLogoMask.Bitmap, 0, 0, CB_OP_MIN
leadLogo.Size CDbl(iLogoWidth), CDbl(iLogoHeight), RESIZE_NORMAL
leadLogo.ColorRes 24, 0, 0, 0
leadBuilder.Combine 800, 200, iLogoWidth, iLogoHeight, leadLogo.Bitmap, 0, 0, CB_OP_MAX
Fit leadBuilder
This call works:
leadBuilder.AlphaBlend 800, 200, iLogoWidth, iLogoHeight, leadLogoMask.Bitmap, 0, 0, 255
but this call gives me an error:
leadBuilder.Combine 800, 200, iLogoWidth, iLogoHeight, leadLogoMask.Bitmap, 0, 0, CB_OP_ADD
Why does the combine function not work with these images once they are changed to the same bits-per-pixel?
Is there any way to change my call to ColorRes to change the images so that they CAN be combined - (the resultant image in builder MUST end up 24 bits and able to combine with other images
Is there some other function I need to call to change the logo into a format that will Combine correctly with my background image?
Thanks for your time -