Print Page | Close Window

Problem drawing bitmaps with alphachannel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=15736
Printed Date: 17 May 2024 at 8:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem drawing bitmaps with alphachannel
Posted By: andolo
Subject: Problem drawing bitmaps with alphachannel
Date Posted: 27 November 2009 at 10:11am
Hi,

the following problem:

Drawing an image with semi-transparency (using alpha32 bitmaps / png) f.E. from the Styles works fine.
Now i am changing some pixels to RGB values bigger than 0x80.

(f.E. COLOUR1 0x14001E is ok,  COLOUR2 RGB 0xFFCC00 shows wrong colour and no alpha, both with 30% alpha )
The stripe behind the text:  purple colour is ok on the left   right side colour should be a light pink an transparent

I can't properly draw an image containing pixels of COLOUR2 independent of the alpha channel.


remark: using the same image with CImageList::Draw works fine! Problem: I am unable to change the output size.


Am i using the wrong functions?  i use the following code:


// xtptoolkit 13.x
// class inherited from CXTPRibbonTheme -> calling CXTPOffice2007Theme::LoadImage


CXTPOffice2007Image* pImage = CXTPRibbonTheme::LoadImage(_T("RIBBONTABBACKGROUNDDWM"));         
pImage->DrawImage(pDC, rcDest, pImage->GetSource());



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net