Loading ...
Sorry, an error occurred while loading the content.

geting pixel color

Expand Messages
  • gmac717
    Does anyone know how to get the pixel color in a graphics window without using the CallDll #gdi32, GetPixel ? This is because GetPixel only works on the
    Message 1 of 10 , Nov 4, 2012
    • 0 Attachment
      Does anyone know how to get the pixel color in a graphics window without using the "CallDll #gdi32, "GetPixel""?

      This is because "GetPixel" only works on the part of the image seen on the screen. In the graphics editor the image extends below the window height.

      Could this be accomplished with "print #handle, "getbmp bmpName x y width height" where width and height are set to 1? And then if it could how so and would it be just as quick as GetPixel?

      Thanks anyone.
      Glen
    • Stefan Pendl
      ... GETBMP will only work on the visible portion of the image too. I think LBPE includes some information about making a copy of an image in memory, where you
      Message 2 of 10 , Nov 4, 2012
      • 0 Attachment
        Am 04.11.2012 16:56, schrieb gmac717:
        > Does anyone know how to get the pixel color in a graphics window without using the "CallDll #gdi32, "GetPixel""?
        >
        > This is because "GetPixel" only works on the part of the image seen on the screen. In the graphics editor the image extends below the window height.
        >
        > Could this be accomplished with "print #handle, "getbmp bmpName x y width height" where width and height are set to 1? And then if it could how so and would it be just as quick as GetPixel?
        >

        GETBMP will only work on the visible portion of the image too.

        I think LBPE includes some information about making a copy of an image
        in memory, where you can use GetPixel on the invisible portions too.


        --
        Stefan Pendl
        http://stefanpendl.runbasichosting.com/

        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

        LB Community Wiki .............. http://basic.wikispaces.com/
        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

        Books at http://www.lulu.com/ and http://www.amazon.com/
        Alyce Watson ... APIs for Liberty BASIC
        Carl Gundel .... Beginning Programming with Liberty BASIC

        Windows 7 Home Premium 64-bit SP1
        AMD Turion X2 RM-70 2GHz, 4GB RAM
      • Rod
        You would do better opening the .bmp file directly and seeking the color data from there rather than the screen or via API. There are examples posted of how to
        Message 3 of 10 , Nov 4, 2012
        • 0 Attachment
          You would do better opening the .bmp file directly and seeking the color data from there rather than the screen or via API. There are examples posted of how to load and parse .bmp files.

          --- In libertybasic@yahoogroups.com, "gmac717" <jesusforgavemebro@...> wrote:
          >
          > Does anyone know how to get the pixel color in a graphics window without using the "CallDll #gdi32, "GetPixel""?
          >
          > This is because "GetPixel" only works on the part of the image seen on the screen. In the graphics editor the image extends below the window height.
          >
          > Could this be accomplished with "print #handle, "getbmp bmpName x y width height" where width and height are set to 1? And then if it could how so and would it be just as quick as GetPixel?
          >
          > Thanks anyone.
          > Glen
          >
        • Glen McInnis
          Ok, I found out how to successfully accomplish this. I simply redraw the image with a negative y offset, subtract the y of the pixel location in the image by
          Message 4 of 10 , Nov 4, 2012
          • 0 Attachment
            Ok, I found out how to successfully accomplish this. I simply redraw the
            image with a negative y offset, subtract the "y" of the pixel location in
            the image by the offset, and call 32's GetPix. Once done with reading all
            the coordinates I need I redraw the image in its correct position. Works
            great.

            Thanks everyone for their help.


            On Sun, Nov 4, 2012 at 4:13 PM, Rod <rodbird@...> wrote:

            > **
            >
            >
            > You would do better opening the .bmp file directly and seeking the color
            > data from there rather than the screen or via API. There are examples
            > posted of how to load and parse .bmp files.
            >
            >
            > --- In libertybasic@yahoogroups.com, "gmac717" <jesusforgavemebro@...>
            > wrote:
            > >
            > > Does anyone know how to get the pixel color in a graphics window without
            > using the "CallDll #gdi32, "GetPixel""?
            > >
            > > This is because "GetPixel" only works on the part of the image seen on
            > the screen. In the graphics editor the image extends below the window
            > height.
            > >
            > > Could this be accomplished with "print #handle, "getbmp bmpName x y
            > width height" where width and height are set to 1? And then if it could how
            > so and would it be just as quick as GetPixel?
            > >
            > > Thanks anyone.
            > > Glen
            > >
            >
            >
            >


            [Non-text portions of this message have been removed]
          • Lorne Russell
            Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system? Lorne [Non-text portions of this message have been
            Message 5 of 10 , Dec 11, 2012
            • 0 Attachment
              Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system?

              Lorne




              [Non-text portions of this message have been removed]
            • Rod
              Yes, no reason they should not run.
              Message 6 of 10 , Dec 11, 2012
              • 0 Attachment
                Yes, no reason they should not run.

                --- In libertybasic@yahoogroups.com, "Lorne Russell" <lorneokb@...> wrote:
                >
                > Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system?
                >
                > Lorne
                >
                >
                >
                >
                > [Non-text portions of this message have been removed]
                >
              • Stefan Pendl
                ... Anything running on Win7 should work on Win8. See the post by Chris at
                Message 7 of 10 , Dec 11, 2012
                • 0 Attachment
                  Am 11.12.2012 19:51, schrieb Lorne Russell:
                  > Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system?
                  >

                  Anything running on Win7 should work on Win8.

                  See the post by Chris at
                  http://libertybasic.conforums.com/index.cgi?board=api&num=1334742580&action=display&start=15


                  --
                  Stefan Pendl
                  http://stefanpendl.runbasichosting.com/

                  LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                  LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                  LB Community Wiki .............. http://basic.wikispaces.com/
                  LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                  LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                  Books at http://www.lulu.com/ and http://www.amazon.com/
                  Alyce Watson ... APIs for Liberty BASIC
                  Carl Gundel .... Beginning Programming with Liberty BASIC

                  Windows 7 Home Premium 64-bit SP1
                  AMD Turion X2 RM-70 2GHz, 4GB RAM
                • Carl Gundel
                  Hi Lorne, Liberty BASIC v4.04 is officially supported on Windows 8. -Carl Gundel Liberty BASIC for Windows - http://www.libertybasic.com Run BASIC, easy web
                  Message 8 of 10 , Dec 11, 2012
                  • 0 Attachment
                    Hi Lorne,

                    Liberty BASIC v4.04 is officially supported on Windows 8.

                    -Carl Gundel
                    Liberty BASIC for Windows - http://www.libertybasic.com
                    Run BASIC, easy web programming - http://www.runbasic.com

                    On Dec 11, 2012, at 1:51 PM, "Lorne Russell" <lorneokb@...> wrote:

                    > Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system?
                    >
                    > Lorne
                    >
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                    >
                    >
                    > ------------------------------------
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                  • Sarmed N.
                    Dear Carl, This is me Sarmed from Baghdad IRAQ I want to by a LB licence, I can t because I am in IRAQ please find a solution to this problem. SARMED 
                    Message 9 of 10 , Dec 11, 2012
                    • 0 Attachment
                      Dear Carl,

                      This is me Sarmed from Baghdad IRAQ
                      I want to by a LB licence, I can't because I am in IRAQ please find a solution to this problem.

                      SARMED 


                      ________________________________
                      From: Carl Gundel <basicforge@...>
                      To: "libertybasic@yahoogroups.com" <libertybasic@yahoogroups.com>
                      Sent: Wednesday, December 12, 2012 1:08 AM
                      Subject: Re: [libertybasic] Windows 8


                       
                      Hi Lorne,

                      Liberty BASIC v4.04 is officially supported on Windows 8.

                      -Carl Gundel
                      Liberty BASIC for Windows - http://www.libertybasic.com
                      Run BASIC, easy web programming - http://www.runbasic.com

                      On Dec 11, 2012, at 1:51 PM, "Lorne Russell" <lorneokb@...> wrote:

                      > Will the programs I have written in LB run on PC’s and laptops with the Windows 8 operating system?
                      >
                      > Lorne
                      >
                      >
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >
                      > ------------------------------------
                      >
                      > Yahoo! Groups Links
                      >
                      >
                      >



                      [Non-text portions of this message have been removed]
                    • Stefan Pendl
                      ... Have you investigated the possibilities of using Help = Printable order form ? -- Stefan Pendl http://stefanpendl.runbasichosting.com/ LB 4.04 Pro ...
                      Message 10 of 10 , Dec 11, 2012
                      • 0 Attachment
                        Am 11.12.2012 23:31, schrieb Sarmed N.:
                        > Dear Carl,
                        >
                        > This is me Sarmed from Baghdad IRAQ
                        > I want to by a LB licence, I can't because I am in IRAQ please find a solution to this problem.
                        >

                        Have you investigated the possibilities of using "Help => Printable
                        order form"?


                        --
                        Stefan Pendl
                        http://stefanpendl.runbasichosting.com/

                        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                        LB Community Wiki .............. http://basic.wikispaces.com/
                        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                        Books at http://www.lulu.com/ and http://www.amazon.com/
                        Alyce Watson ... APIs for Liberty BASIC
                        Carl Gundel .... Beginning Programming with Liberty BASIC

                        Windows 7 Home Premium 64-bit SP1
                        AMD Turion X2 RM-70 2GHz, 4GB RAM
                      Your message has been successfully submitted and would be delivered to recipients shortly.