Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Non transparent PNGs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Non transparent PNGs

 Post Reply Post Reply
Author
Message
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: Non transparent PNGs
    Posted: 26 January 2012 at 6:07am
Hello,

if I use png pictures with only 3 channels (rgb), is it possible that this pictures are always invisible?
I wondering about following code in CXTPGraphicBitmapPng::ConvertToBitmap:


        for (xImg = 0; xImg < szImage.cx; xImg++)
        {
            r = *src++;
            g = *src++;
            b = *src++;
            *dst++ = b;
            *dst++ = g;
            *dst++ = r;
            a = 0;

            if (cImgChannels == 4)
            {
                a = *src++;
            }
            *dst++ = a;
        }

0 is treated as "fully transparent", is that right?
Should this value not be 255 (0xFF)?

Michael
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.