Page 2 of 2 FirstFirst 12
Results 41 to 61 of 61

Thread: animated gif files problem

  1. #41

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    i'm sorry, but see my code(in my last post)...
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #42
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    What is disposal code 2?
    "2 - Restore to background color. The area used by the
    graphic must be restored to the background color."

    So, you just simply fill a rectangle with the uc's background color. The position & size of the rectangle are the dimensions of the frame about to be replaced. Try it.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #43

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    Quote Originally Posted by LaVolpe
    What is disposal code 2?
    "2 - Restore to background color. The area used by the
    graphic must be restored to the background color."

    So, you just simply fill a rectangle with the uc's background color. The position & size of the rectangle are the dimensions of the frame about to be replaced. Try it.
    i'm trying, but without sucess
    Code:
    Load aImg(aImg.Count)
        For I = 0 To aImg.Count - 2
            Select Case DisposalCode(I)
                Case 2:
                    aImg(aImg.Count - 1).Cls
                    aImg(aImg.Count - 1).BackColor = GetPixel(aImg(I - 1).hdc, 0, 0)
                    TransparentBlt aImg(aImg.Count - 1).hdc, 0, 0, aImg(I - 1).Width, aImg(I - 1).Height, aImg(I - 1).hdc, 0, 0, aImg(I - 1).Width, aImg(I - 1).Height, GetPixel(aImg(I).hdc, 0, 0)
                    aImg(I).Picture = aImg(aImg.Count - 1).Image
            End Select
        Next I
        Unload aImg(aImg.Count - 1)
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #44
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    How can transparentblt fill a rectangle with background color???
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #45

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    Quote Originally Posted by LaVolpe
    How can transparentblt fill a rectangle with background color???
    Code:
    aImg(aImg.Count - 1).BackColor = GetPixel(aImg(I - 1).hdc, 0, 0)'for change the backcolor
    TransparentBlt aImg(aImg.Count - 1).hdc, 0, 0, aImg(I).Width, aImg(I).Height, aImg(I).hdc, 0, 0, aImg(I).Width, aImg(I).Height, aImg(I).BackColor ' for copy the intire image without backcolor
    aImg(I).Picture = aImg(aImg.Count - 1).Image 'for copy the rigth image for picturebox
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  6. #46

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    for start i have a problem:
    Code:
    Debug.Print DisposalCode(I)
    why i don't recive any value?
    i recive nothing/empty
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  7. #47

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    now i recive the values...
    i will continue test it...
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  8. #48

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    ok... now i plus the code....
    but i'm reciving an error
    Code:
     For i = aImg.Count To aImg.Count + 3
            Load aImg(i)
        Next i
        For i = 1 To aImg.Count - 1
            Select Case DisposalCode(i)
                Case 0, 1:
                    aImg(i).BackColor = vbWhite
                    Call CreateMaskImage(aImg(i), aImg(aImg.Count - 3))
                    aImg(i).BackColor = 0
                    CreateMaskImage aImg(i), aImg(aImg.Count - 4)
                    BitBlt aImg(aImg.Count - 3).hdc, 0, 0, aImg(0).Width, aImg(0).Height, aImg(aImg.Count - 4).hdc, 0, 0, vbSrcAnd
                    BitBlt aImg(aImg.Count - 2).hdc, 0, 0, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 3).hdc, 0, 0, vbSrcCopy
                    BitBlt aImg(aImg.Count - 2).hdc, 0, 0, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(i).hdc, 0, 0, vbSrcErase
                    BitBlt aImg(aImg.Count - 1).hdc, aImg(i).Left, aImg(i).Top, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 3).hdc, 0, 0, vbSrcAnd
                    BitBlt aImg(aImg.Count - 1).hdc, aImg(i).Left, aImg(i).Top, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 2).hdc, 0, 0, vbSrcPaint
                    aImg(i).Cls
                    aImg(i).Picture = aImg(aImg.Count - 1).Image
                    aImg(aImg.Count - 1).Picture = Empty
                Case 2:
                    aImg(aImg.Count - 1).Line (aImg(i).Left, aImg(i).Top)-Step(aImg(i).Width - 1, aImg(i).Height - 1), aImg(aImg.Count - 1).BackColor, BF
                    aImg(i).BackColor = vbWhite
                    CreateMaskImage aImg(i), aImg(aImg.Count - 3)
                    aImg(i).BackColor = 0
                    CreateMaskImage aImg(i), aImg(aImg.Count - 4)
                    BitBlt aImg(aImg.Count - 3).hdc, 0, 0, LogicalWidth, LogicalHeight, aImg(aImg.Count - 4).hdc, 0, 0, vbSrcAnd
                    BitBlt aImg(aImg.Count - 2).hdc, 0, 0, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 3).hdc, 0, 0, vbSrcCopy
                    BitBlt aImg(aImg.Count - 2).hdc, 0, 0, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(i).hdc, 0, 0, vbSrcErase
                    BitBlt aImg(aImg.Count - 1).hdc, aImg(i).Left, aImg(i).Top, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 3).hdc, 0, 0, vbSrcAnd
                    BitBlt aImg(aImg.Count - 1).hdc, aImg(i).Left, aImg(i).Top, aImg(i).ScaleWidth, aImg(i).ScaleHeight, aImg(aImg.Count - 2).hdc, 0, 0, vbSrcPaint
            End Select
        Next i
        For i = aImg.Count - 1 To aImg.Count - 4 Step -1
            Unload aImg(i)
        Next i
    Call CreateMaskImage(aImg(i), aImg(aImg.Count - 3)) 'error in aimg(i)
    "byref argument type mismatch"
    can anyone explain to me what isn't right?
    ps.:the entire code is in text file.
    Attached Files Attached Files
    Last edited by joaquim; Nov 23rd, 2008 at 06:06 AM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  9. #49

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    i resove that error.... the problem was here:
    Code:
    Public Function LoadGif(sFile As String, aImg As PictureBox) As Boolean
    i was using variant type instead picturebox...
    but now i continue with a problem(but without a msgbox error)...
    can anyone test the code and see where is problem(i know that the problem is in little code, but i don't understand what isn't right)?
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  10. #50

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    LaVolte i have 1 new code:
    Code:
     Load aImg(aImg.Count)
        For i = 1 To TotalFrames - 1
            aImg(aImg.Count - 1).Cls
            If DisposalCode(i) = 1 Then
                aImg(aImg.Count - 1).Cls
                aImg(aImg.Count - 1).Picture = aImg(i - 1).Image
                TransparentBlt aImg.Count - 1, 0, 0, aImg(i).Width, aImg(i).Height, aImg(i).hdc, 0, 0, aImg(i).Width, aImg(i).Height, GetPixel(aImg(i).hdc, 0, 0)
            End If
            aImg(i).Picture = aImg(aImg.Count - 1).Image
        Next i
        Unload aImg(aImg.Count - 1)
    how these works:
    1-the 1st image is still igual. is why the cicle for starts in 1 instead 0;
    2-the if condicional is only for test if the disposalcode(i) is 1;
    3-i created 1 more picturebox for put the result;
    4-put the previous image(i-1) in last picturebox;
    5-i copy the image(i), but transparent(is why i use the transparentblt() API function to the last picturebox(plus the 2 images);
    6-then i copy these last picturebox image in image(i).
    but i don't have the right results.
    can you tell me where is the error?
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  11. #51

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    ok.. i found 1 error:
    Code:
    If TotalFrames > 1 Then
            Load aImg(aImg.Count)
            For i = 1 To TotalFrames - 1
                aImg(aImg.Count - 1).Picture = Nothing
                If DisposalCode(i) = 1 Then
                    aImg(aImg.Count - 1).Picture = aImg(i - 1).Image
                    TransparentBlt aImg(aImg.Count - 1).hdc, 0, 0, aImg(i).Width, aImg(i).Height, aImg(i).hdc, 0, 0, aImg(i).Width, aImg(i).Height, GetPixel(aImg(i).hdc, 0, 0)
                End If
                aImg(i).Picture = aImg(aImg.Count - 1).Image
            Next i
            Unload aImg(aImg.Count - 1)
        End If
    but something isn't right.
    is like the picture isn't clean
    VB6 2D Sprite control

    To live is difficult, but we do it.

  12. #52

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    sorry bored you, LaVolte.
    but i realy need help to complete these code
    heres what i have...
    i need correct these code, but i don't understand how
    Code:
    If aImg.Count > 2 Then
            Load aImg(aImg.Count)
            For a = 0 To aImg.Count - 2
                Select Case DisposalCode(a)
                    Case 1 Or 2
                        'previous frame + actual frame(transparent) = result frame
                        aImg(aImg.Count - 1).Picture = Nothing
                        aImg(aImg.Count - 1).Picture = aImg(a - 1).Image
                        TransparentBlt aImg(aImg.Count - 1).hDC, aImg(aImg.Count - 1).ScaleWidth \ 2 - aImg(a).ScaleWidth \ 2, aImg(aImg.Count - 1).ScaleHeight \ 2 - aImg(a).ScaleHeight \ 2, aImg(a).ScaleWidth, aImg(a).ScaleHeight, aImg(a).hDC, 0, 0, aImg(a).ScaleWidth, aImg(a).ScaleHeight, GetPixel(aImg(a).hDC, 0, 0)
                        aImg(a).Picture = Nothing
                        aImg(a).Picture = aImg(aImg.Count - 1).Image
                End Select
            Next a
            Unload aImg.Count
        End If
    can you help me?
    thanks
    (moderators: i know that these tread is old.... sorry...., but i need complete these)
    Attached Files Attached Files
    VB6 2D Sprite control

    To live is difficult, but we do it.

  13. #53
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    If no one else assists you, keep working on it and I'll take a look at it this Saturday. If you make any more modifications, be sure to upload the new .bas file and other files/codes we may need to see.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  14. #54

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    Quote Originally Posted by LaVolpe View Post
    If no one else assists you, keep working on it and I'll take a look at it this Saturday. If you make any more modifications, be sure to upload the new .bas file and other files/codes we may need to see.
    ok. i found something in these line(i delete the "on error resume next" and "on error goto 0"):
    Code:
    DisposalCode(TotalFrames) = ((Asc(Mid$(sBuff, lngFind + 4, 1)) \ 4) And 3)
    the error message:
    "run-time error '5':
    invalid procedure call or argument"
    thanks for help me
    VB6 2D Sprite control

    To live is difficult, but we do it.

  15. #55

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    now i put it to work. but the results isn't 100% ok
    Code:
    Dim b As Integer
            b = 1
            If aImg.Count >= 2 Then
                Load aImg(aImg.Count)
                For a = 1 To aImg.Count - 2
                    Debug.Print DisposalCode(a)
                    If DisposalCode(a) = 1 Or DisposalCode(a) = 2 Then
                        If b = 2 Then
                        Else
                            'previous frame + actual frame(transparent) = result frame
                            aImg(aImg.Count - 1).Picture = Nothing
                            aImg(aImg.Count - 1).Picture = aImg(a - 1).Image
                            TransparentBlt aImg(aImg.Count - 1).hDC, aImg(aImg.Count - 1).ScaleWidth \ 2 - aImg(a).ScaleWidth \ 2, aImg(aImg.Count - 1).ScaleHeight \ 2 - aImg(a).ScaleHeight \ 2, aImg(a).ScaleWidth, aImg(a).ScaleHeight, aImg(a).hDC, 0, 0, aImg(a).ScaleWidth, aImg(a).ScaleHeight, GetPixel(aImg(a).hDC, 0, 0)
                            aImg(a).Picture = Nothing
                            aImg(a).Picture = aImg(aImg.Count - 1).Image
                            If b = 2 Then
                                b = 1
                            Else
                                b = b + 1
                            End If
                        End If
                    End If
                Next a
                Unload aImg.Count
            End If
    i have tested these image...
    some images are showed normaly. but i see some problems:
    1 - the last 2 frames are showed incompleted.
    Last edited by joaquim; Mar 17th, 2010 at 04:23 PM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  16. #56

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    1
    1
    1
    1
    0
    these is the method results. but the 3rd isn't correct, because i have a new diferent image(not combined with last image)
    Code:
    If aImg.Count >= 2 Then
                Load aImg(aImg.Count)
                For a = 1 To aImg.Count - 1
                    Debug.Print DisposalCode(a)
                    If DisposalCode(a) = 1 Or DisposalCode(a) = 2 Or DisposalCode(a) = 0 Then
                        'previous frame + actual frame(transparent) = result frame
                        aImg(aImg.Count - 1).Picture = Nothing
                        aImg(aImg.Count - 1).Picture = aImg(a - 1).Image
                        TransparentBlt aImg(aImg.Count - 1).hDC, aImg(aImg.Count - 1).ScaleWidth \ 2 - aImg(a).ScaleWidth \ 2, aImg(aImg.Count - 1).ScaleHeight \ 2 - aImg(a).ScaleHeight \ 2, aImg(a).ScaleWidth, aImg(a).ScaleHeight, aImg(a).hDC, 0, 0, aImg(a).ScaleWidth, aImg(a).ScaleHeight, GetPixel(aImg(a).hDC, 0, 0)
                        aImg(a).Picture = Nothing
                        aImg(a).Picture = aImg(aImg.Count - 1).Image
                    End If
                Next a
                Unload aImg.Count
            End If
    VB6 2D Sprite control

    To live is difficult, but we do it.

  17. #57
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    That line should be modified to:
    Code:
    DisposalCode(TotalFrames) = ((Asc(Mid$(sBuff, lngPreviousFind + 4, 1)) \ 4) And 3)
    If TotalFrames = 0 And DisposalCode(TotalFrames) = 3 Then DisposalCode(TotalFrames) = 0
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  18. #58

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    Quote Originally Posted by LaVolpe View Post
    That line should be modified to:
    Code:
    DisposalCode(TotalFrames) = ((Asc(Mid$(sBuff, lngPreviousFind + 4, 1)) \ 4) And 3)
    If TotalFrames = 0 And DisposalCode(TotalFrames) = 3 Then DisposalCode(TotalFrames) = 0
    i continue with problems
    frame1 is complete.
    frame2 need the frame1 to be completed(frame1 + frame2(transparent)).
    frame3 is complete(but the method value is 1)
    heres the method values(after that change):
    1
    1
    1
    1
    1
    1
    the 3rd frame(i belive) that should(it is right write?) be 0 and not 1.
    and i don't know why i recive\see 1 empty frame(before repeat the animation)
    Last edited by joaquim; Jan 30th, 2010 at 04:40 AM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  19. #59
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    No, those values are correct for the disposal codes in that gif you uploaded.
    I'll take a look at your project today.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  20. #60

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: animated gif files problem

    Quote Originally Posted by LaVolpe View Post
    No, those values are correct for the disposal codes in that gif you uploaded.
    I'll take a look at your project today.
    ok.. thanks for everything... thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  21. #61
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: animated gif files problem

    You will have some serious problems trying to do this without parsing the GIFs palettes and creating a black and white mask from those palettes to use for your uc's MaskPicture.

    1. For your uc to work correctly, your maskpicture must be correct.
    2. Each frame in a GIF can have a different mask and each frame in the GIF can be rendered at different X,Y coords and different widths/heights.
    3. Because of the different disposal codes, you cannot just use the current frame's mask
    4. Masks may need to be combined with previous frames' masks for your uc to draw correctly.

    Simple GIFs where the disposal code is always 0,1,2 and the frames are always the same size are easy. But when you get disposal codes of 3 or a code of 2 and frame is drawn at different width,heights or different X,Y coords, then that affects the mask.

    If you parse out the palette and the transparent index, you can make the palette index for the transparent index White. Then make all other colors in the palette black. This will give you a black & white (B/W) mask where the color white is transparent. That mask can be used for your uc's maskpicture and maskcolor of white.

    But you still have to account for codes of 2 and 3.

    With a code of 2 it means you must erase the last frame's area. With the current B/W mask, that means drawing a black rectangle equal to the x,y,width,height of the last frame. Then combining the new frame's mask to that mask.

    With a code of 3 it means you must save the mask in memory, combine the current mask with the new frame's mask. When that frame is changed, restore the mask from memory and combine the new frame's mask. But code 3 also requires you to save the previous color portion of the image too and replace that when the frame changes.

    As I mentioned in previous posts, the GIF parsing routine you use is not really designed for your needs. It can be modified to parse the palette and it can be modified to get the palette entry of the transparent index.

    Last but not least, I cannot see how you can get TransparentBLT to work for you with transparent GIFs. How will you know what color to make transparent? The background color of the DC? What if that DCs color is in the GIF too? Each GIF frame can have a different transparency color or none at all. Also, each GIF frame can have a different palette too.

    If you choose, you can use GDI+ to process GIFs and since GDI+ draws each frame with all the disposal codes already processed, it would be very easy to create a B/W mask for each frame. But GDI+ does require some learning if you are not familiar with it and GDI+ is installed on XP and above automatically, but on lesser operating systems, it must be downloaded from Microsoft and installed if not already installed.
    Edited: Since VB allows you to have a multicolor mask, GDI+ would allow you then to simply render the frame (with transparency) to a bitmap and use that bitmap as the mask. However, you'd still have an issue because you need to know what bitmap background color to use that isn't in any of the GIF frames. This sounds easy but can be difficult because though GIF palettes are limited 256 colors, each frame can have its own palette and therefore a current image combining more than one frame can theoretically contain 16million colors. A few years ago, I did find a site where someone actually created a GIF that contained millions of colors, using mulitple frames and multiple palettes.
    Last edited by LaVolpe; Jan 30th, 2010 at 04:53 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Page 2 of 2 FirstFirst 12

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