Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. join pieces in an image

join pieces in an image

Scheduled Pinned Locked Moved C#
csharphelptutorial
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Umangj
    wrote on last edited by
    #1

    heyyy pls help me... i need to join these puzzle pieces in an image..... the gap in b/w the pieces is the transparent color where alpha component of the pixel is 0, for example: i need to change an image from this: http://www.freeimagehosting.net/uploads/th.61647e9923.jpg to this: http://www.freeimagehosting.net/uploads/th.11322f3595.jpg

    N C F L 4 Replies Last reply
    0
    • U Umangj

      heyyy pls help me... i need to join these puzzle pieces in an image..... the gap in b/w the pieces is the transparent color where alpha component of the pixel is 0, for example: i need to change an image from this: http://www.freeimagehosting.net/uploads/th.61647e9923.jpg to this: http://www.freeimagehosting.net/uploads/th.11322f3595.jpg

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      First up learn where the shift key is, it will help you. Secondly you haven't actually asked a question. I can infer from your message that you can't work out how to do this. But what I am not sure is if this is due to not understanding a nuance of c# that has caused you to go in circles with an implimentation problem or because you are thick. Please can you let us know!


      Panic, Chaos, Destruction. My work here is done.

      U 1 Reply Last reply
      0
      • N Nagy Vilmos

        First up learn where the shift key is, it will help you. Secondly you haven't actually asked a question. I can infer from your message that you can't work out how to do this. But what I am not sure is if this is due to not understanding a nuance of c# that has caused you to go in circles with an implimentation problem or because you are thick. Please can you let us know!


        Panic, Chaos, Destruction. My work here is done.

        U Offline
        U Offline
        Umangj
        wrote on last edited by
        #3

        For You: I just want to know how should i move the pixels so tht transparency between the pieces is gone.I have tried shifting the pixels row by row and also column by column but that is not working.... jus tell me any other way to do this....

        N 1 Reply Last reply
        0
        • U Umangj

          heyyy pls help me... i need to join these puzzle pieces in an image..... the gap in b/w the pieces is the transparent color where alpha component of the pixel is 0, for example: i need to change an image from this: http://www.freeimagehosting.net/uploads/th.61647e9923.jpg to this: http://www.freeimagehosting.net/uploads/th.11322f3595.jpg

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          You need to read my image processing articles. As the lines are not straight, you need to iterate over each row, and then build a new row using only non transparent pixels. If you can't see which are transparent, you may need to match based on color alone.

          Christian Graus Driven to the arms of OSX by Vista.

          U 1 Reply Last reply
          0
          • C Christian Graus

            You need to read my image processing articles. As the lines are not straight, you need to iterate over each row, and then build a new row using only non transparent pixels. If you can't see which are transparent, you may need to match based on color alone.

            Christian Graus Driven to the arms of OSX by Vista.

            U Offline
            U Offline
            Umangj
            wrote on last edited by
            #5

            Here, I can see which pixels are transparent... Now, if I build each row again using only non transparent pixels then there will be problem at the last rows of each puzzle piece as the transparent color there need not to be shifted as the puzzle piece below it will fill it..... Thank you for replying...

            1 Reply Last reply
            0
            • U Umangj

              heyyy pls help me... i need to join these puzzle pieces in an image..... the gap in b/w the pieces is the transparent color where alpha component of the pixel is 0, for example: i need to change an image from this: http://www.freeimagehosting.net/uploads/th.61647e9923.jpg to this: http://www.freeimagehosting.net/uploads/th.11322f3595.jpg

              F Offline
              F Offline
              fred_
              wrote on last edited by
              #6

              Umangj wrote:

              heyyy pls help me...

              Hey PLEASE stop begging

              U 1 Reply Last reply
              0
              • F fred_

                Umangj wrote:

                heyyy pls help me...

                Hey PLEASE stop begging

                U Offline
                U Offline
                Umangj
                wrote on last edited by
                #7

                Its not begging, its called manners while asking for some help.... And it will be better if you can reply to the question asked and not how it is asked....

                F 1 Reply Last reply
                0
                • U Umangj

                  Its not begging, its called manners while asking for some help.... And it will be better if you can reply to the question asked and not how it is asked....

                  F Offline
                  F Offline
                  fred_
                  wrote on last edited by
                  #8

                  Over runme pz urgent

                  1 Reply Last reply
                  0
                  • U Umangj

                    heyyy pls help me... i need to join these puzzle pieces in an image..... the gap in b/w the pieces is the transparent color where alpha component of the pixel is 0, for example: i need to change an image from this: http://www.freeimagehosting.net/uploads/th.61647e9923.jpg to this: http://www.freeimagehosting.net/uploads/th.11322f3595.jpg

                    L Offline
                    L Offline
                    Luc Pattyn
                    wrote on last edited by
                    #9

                    Hi, if I had a single pixel with alpha=0 where I would like it to be 255, I would probably open up my toolbox and modify that pixel somehow. And if I had several, I would consider a loop, maybe even two of them. Of course, if the information happens to be absent, I am not a magician. BTW: your hardest problem may well be that one image is 150*106 while the other is 150*107 :)

                    Luc Pattyn [Forum Guidelines] [My Articles]


                    - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


                    1 Reply Last reply
                    0
                    • U Umangj

                      For You: I just want to know how should i move the pixels so tht transparency between the pieces is gone.I have tried shifting the pixels row by row and also column by column but that is not working.... jus tell me any other way to do this....

                      N Offline
                      N Offline
                      Nagy Vilmos
                      wrote on last edited by
                      #10

                      Great, now you've asked a question and it looks like you've got spelling mastered. If you haven't read Christian's article do so. The basic premise is that you must know the transparancy colour. Will the blocks always move on just on plane or can they move on both? You need to identify each block of image and move it enmase. Otherwise you will not know if you're going left/right or up/down. Have a go and see where it's going wrong. Then come back and ask for some help at the next stage. Unfortunately, without knowing the method you are trying to employ it is rather difficult to help just yet. Now read Christian's article (he's v. clever) then have a go at a solution. If you get, come back and ask for some help where you are not sure. And have a Gin'n'Tonic, that helps as well. ;)


                      Panic, Chaos, Destruction. My work here is done.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups