Announcement

Collapse
No announcement yet.

PB and bitmaps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB and bitmaps

    Not really a PB question, but here's the deal.

    I have 18 bitmaps that were extracted from an animated GIF.
    I use a timer to rotate through the bitmaps and draw a new one, hence we have the animated GIF again.

    It's a document going into a folder.

    Now, problem is, because PB requires BMP format, the background on my bitmap is WHITe and I want it to be transparent...


    Any idea how to do this? I realize it may be more of a graphics thing, but It's ugly...


    Thanks,

    Scott

    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Scott --

    You could edit the bitmaps so they have a gray background (using Paint's "flood" feature makes it pretty easy to change a background color) but the problem is that not all versions of Windows use the same gray. Windows 2000, for example, uses a slightly "browner" gray than Windows NT.

    While some of the bitmap APIs do support truly transparent drawing, it would be much easier to convert your graphics to the "icon" format. Icons support both animation and transparent backgrounds. I use and like MicroAngelo (impactsoft.com), and it has the ability to load a bitmap and save it as an icon.

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>
    "Not my circus, not my monkeys."

    Comment


    • #3
      Download The Paint Shop Pro Test Version, they have a program called
      Animation Shop. With that program, convert your animated gif to avi file
      file, (a little biger). then, you'll have no problem to display it.
      HTH




      ------------------

      Comment


      • #4
        I use PSP all the time, bought it years ago!

        I took it apart in Animation shop, hmmm so I can save it as an AVI file, but how do you display an AVI file on the dialog box then?
        Mark had mentioned something about this too..

        And, is there any way of just tapping into MS's AVI that is used in the file copy dialog from Explorer???


        Thanks!


        Scott


        ------------------
        Scott
        mailto:[email protected][email protected]</A>
        Scott Turchin
        MCSE, MCP+I
        http://www.tngbbs.com
        ----------------------
        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

        Comment


        • #5
          Hey Scott,

          Do you want the actual AVI that Explorer uses?

          ------------------
          Cheers

          Comment


          • #6
            Sure!!
            I'd *LIKE* to use the built in one so I don't have to add the overhead to my program but either way is good..


            Scott

            ------------------
            Scott
            mailto:[email protected][email protected]</A>
            Scott Turchin
            MCSE, MCP+I
            http://www.tngbbs.com
            ----------------------
            True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

            Comment


            • #7
              To draw bitmap transparently is very simple.
              There is a lot of samples in MSDN, based on classic way (some BitBlt).

              I posted some times a code, which do this much faster (creation of DIB-section with direct access to bits).

              Well .. For me is interesting a question --
              somebody know a tool (better freeware) to convert GIF to BMP ?

              ------------------
              E-MAIL: [email protected]

              Comment


              • #8
                Wingif will convert it, it's 16 bit but is still available...it's not really FREEWARE but doesn't cut out on you after a certain time...
                I was reading that some BMP's just can't be transparent....


                Scott

                ------------------
                Scott
                mailto:[email protected][email protected]</A>
                Scott Turchin
                MCSE, MCP+I
                http://www.tngbbs.com
                ----------------------
                True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                Comment


                • #9
                  If you need the Windows Explorer AVI File, I can send it to you. I've a collection of 270 Windows Program AVI's

                  ------------------
                  Homepage: http://www.Surf2Flower.de
                  E-Mail: mailto:[email protected][email protected]</A>
                  E-Mail (work): mailto:[email protected][email protected]</A>
                  PGP Key: http://www.Surf2Flower.de/pgp_key.asc

                  Comment


                  • #10
                    You bet, I'd love to take a look at it or them..

                    Thanks!

                    Scott ([email protected]tngbbs.com)


                    ------------------
                    Scott
                    mailto:[email protected][email protected]</A>
                    Scott Turchin
                    MCSE, MCP+I
                    http://www.tngbbs.com
                    ----------------------
                    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                    Comment


                    • #11
                      I would love to display an AVI file during a file copy of so other
                      type of action in a separate dialog (sometimes with a progress bar)
                      but have not found a workable way to do so without the dialog that
                      displays the AVI getting and keeping the focus (modal).

                      I've asked before but since we are on the subject does anyone know
                      how to display a dialog with a running AVI (no sound) like the
                      filecopy.avi and execute some piece of code at the same time. The
                      code executing could even be in the dialog with the AVI but it would
                      be much easier if it did not. I've tried message loops but with out
                      success. Perhaps someone would like to share some code to a small
                      app that works in this manor.

                      ------------------
                      Thanks,

                      Doug Gamble
                      mailto:[email protected][email protected]</A>
                      Thanks,

                      Doug Gamble
                      [email protected]

                      Comment


                      • #12
                        Scott,

                        See my animated bitmap example in the PowerBASIC graphic section.
                        Also WinLIFT has several functions that allow to do this.




                        ------------------
                        Patrice Terrier
                        mailto[email protected][email protected]</A>
                        Patrice Terrier
                        www.zapsolution.com
                        www.objreader.com
                        Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                        Comment


                        • #13
                          To display avi on a dialog

                          In the rsource file add

                          101 AVI "C:\MEDIA\\AVI\\FILES\\PRINTING\\PRINTOUT.AVI"

                          In your code add

                          Code:
                          STATIC Avi  as long
                          
                            SELECT CASE CBMSG
                                 CASE %WM_INITDIALOG
                                    avi = CreateWindowEx(0, "SysAnimate32", "", 6 OR %WS_VISIBLE OR %WS_CHILD, _
                                    72, 110, 80, 80, hDlg, 101, hInstance, BYVAL %NULL)
                                    SendMessage Avi, %WM_USER + 100, 0, 101    
                                 CASE %WM_DESTROY 
                                    SendMessage Avi, %WM_USER + 102, 0, 0
                                    SendMessage Avi, %WM_USER + 100, 0, 0
                                    DestroyWindow Avi
                          HTH


                          ------------------


                          [This message has been edited by Gafny Jacob (edited February 12, 2001).]

                          Comment


                          • #14
                            Lookie at what I found!!

                            http://pjs-inc.com/vb-avi/Microsoft%...s%20Static.htm

                            http://pjs-inc.com/vb-avi/Microsoft%...s%20Static.htm

                            ------------------
                            Scott
                            mailto:[email protected][email protected]</A>
                            Scott Turchin
                            MCSE, MCP+I
                            http://www.tngbbs.com
                            ----------------------
                            True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                            Comment


                            • #15
                              OK There has to be a way to do this with DDT, has to!

                              I'm playing around with this, can anyone else get it to work this way?


                              Control Add "SysAnimate32",pDlg,%PROGRESSIMAGE,"#2020",1,1,20,20

                              #2020 is the 2020 id of the avi file in the resource file.
                              %PROGRESSIMAGE is the id set aside for the AVI (Was for a bitmap).




                              ------------------
                              Scott
                              mailto:[email protected][email protected]</A>
                              Scott Turchin
                              MCSE, MCP+I
                              http://www.tngbbs.com
                              ----------------------
                              True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                              Comment


                              • #16
                                Disregard. Unless someone has a good example of the AVI for future use, but The avi is 56k, my bitmaps total 36k at most.
                                I just use the timer and a static variable to increment the count until it gets to the last bitmap, then switches back to #1 and continues every 75ms, same thing as an animated GIF and/or bitmap..

                                It works, I'm going to just leave it alone.

                                Thanks,

                                Scott


                                ------------------
                                Scott
                                mailto:[email protected][email protected]</A>
                                Scott Turchin
                                MCSE, MCP+I
                                http://www.tngbbs.com
                                ----------------------
                                True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                                Comment


                                • #17
                                  Originally posted by Semen Matusovski:

                                  somebody know a tool (better freeware) to convert GIF to BMP ?
                                  Hi Semen,

                                  on my NT4-PII, I used Microsoft's Photo-Editor(PHOTOED.EXE)

                                  Cheers, Hanns.

                                  ------------------

                                  Comment


                                  • #18
                                    Originally posted by Semen Matusovski:

                                    somebody know a tool (better freeware) to convert GIF to BMP ?

                                    Semen, try searching for LVIEW PRO. They have a free demo version which lets you convert images among many different formats. I'll look up the site for you if you can't find it.



                                    ------------------
                                    Bernard Ertl
                                    Bernard Ertl
                                    InterPlan Systems

                                    Comment


                                    • #19
                                      Hi Semen,
                                      If you're trying to do the GIF to Bitmap from code, can't help.
                                      But if you only need to change one or two GIF's and save as BMP's
                                      The Paint Program that comes with at least Win2000 (don't know
                                      about other versions) will do it. Also, Paint Shop Pro will do
                                      Batch converts. Anyway, hope that helps.

                                      ------------------
                                      [email protected]

                                      Comment


                                      • #20
                                        Oh, this is the Homepage, where most of my AVI's come from. I had just lost the Link!



                                        ------------------
                                        Homepage: http://www.Surf2Flower.de
                                        E-Mail: mailto:[email protected][email protected]</A>
                                        E-Mail (work): mailto:[email protected][email protected]</A>
                                        PGP Key: http://www.Surf2Flower.de/pgp_key.asc

                                        Comment

                                        Working...
                                        X