Actually, I don't really understand what you are doing. I know you are experimenting around with GIF files but what I don't know is exactly how or what it is that you want to acompolish.
Question: What is the end results of what you are doing? Are you just making a gif animator?
The TransparentBlt API is for copying a picture to another DC and when it "sees" a transparent color on the original picture it wont copy it to the other but you are using this API to copy the background color at location 0,0 of the original picture and that is what I don't understand why you are doing this.
Do me a favor and post the results of Case 1 but only for the first time. I want to see how it looks.
Code:For i = 1 To aimg.Count - 2 Select Case fraFrame(i).GCGraphicControl.Disposal Case 0 ' No Action ' Case 1 ' Leave 'ActualFrame = PreviousFrame + TransparentActualFrame ' BitBlt aimg(aimg.Count - 1).hdc, 0, 0, aimg(i - 1).ScaleWidth, aimg(i - 1).ScaleHeight, aimg(i - 1).hdc, 0, 0, vbSrcCopy If fraFrame(i).GCGraphicControl.BackColor <> LSDLogicalScreenDescription.BackColor Then TransparentBlt aimg(aimg.Count - 1).hdc, fraFrame(i).IDImageDescription.FrameLeft, fraFrame(i).IDImageDescription.FrameTop, aimg(i).ScaleWidth, aimg(i).ScaleHeight, aimg(i).hdc, 0, 0, aimg(i).ScaleWidth, aimg(i).ScaleHeight, GetPixel(aimg(i).hdc, 0, 0) Else BitBlt aimg(aimg.Count - 1).hdc, fraFrame(i).IDImageDescription.FrameLeft, fraFrame(i).IDImageDescription.FrameTop, aimg(i).ScaleWidth, aimg(i).ScaleHeight, aimg(i).hdc, 0, 0, vbSrcCopy End If aimg(i).Picture = aimg(aimg.Count - 1).Image aimg(aimg.Count - 1).Cls Case 2 ' Restore Background ' Case 3 ' Restore Previous ' Case Else ' Error ' End Select Next i




Reply With Quote