Results 1 to 3 of 3

Thread: AlphaImgCtrl | Save Icon | Transparency | LaVolpe

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    100

    AlphaImgCtrl | Save Icon | Transparency | LaVolpe

    Using AlphaImgCtrl to try to do a quick and dirty icon save with transparency.

    I have a bitmap loaded in a VB picturebox and the mask color I'm using is vbCyan. It seems like I should be able to call some function and pass it the mask color and then save as icon with tranparency but I can't find it.

    Can anyone fill in the code below?

    Code:
        If .Picture Then
            Set objGDIpImage = LoadPictureGDIplus(.Picture.Handle)
    
            If Not (objGDIpImage Is Nothing) Then
                With frm_test.AlphaImgPic
                    .Picture = objGDIpImage
            
                    '************************************************
                    ' What goes here to save icon with transparency?
                    '************************************************
                    
                    SavePictureGDIplus .Picture, sFileIco, lvicSaveAs_HICON
                End With
            End If
        End If

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    100

    Re: AlphaImgCtrl | Save Icon | Transparency | LaVolpe

    It's a 64bit bitmap and 256 colors in case that matters.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2007
    Posts
    100

    Re: AlphaImgCtrl | Save Icon | Transparency | LaVolpe

    I also have FreeImage installed and would be happy to use that instead but so far I've not been able to coax it into performing the task. FreeImage has a number of functions with Transparency parameters but I think I have to build a transparency table first and that I can't figure out how to do.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width