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
  1. Home
  2. General Programming
  3. C#
  4. Picture-strange

Picture-strange

Scheduled Pinned Locked Moved C#
helpquestion
13 Posts 3 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.
  • N nc3b

    I mean that other colors appear instead of the ones that were supost to.. and the contours are smudged... the really strange thing is, that if i keep the debug folder opened the picture displays correctlky (it's a picture on a form that loads on startup

    M Offline
    M Offline
    malharone
    wrote on last edited by
    #4

    I think you specified the value of the picturebox image at design time. Instead of that, load and set your image at run time. this will retain the quality. - Malhar

    N 1 Reply Last reply
    0
    • M malharone

      I think you specified the value of the picturebox image at design time. Instead of that, load and set your image at run time. this will retain the quality. - Malhar

      N Offline
      N Offline
      nc3b
      wrote on last edited by
      #5

      OK:) Now, supose i don't want anybody to be able to mofify my picture, what should i do? :) Hope i'm not bugging you too much :D :)

      M 1 Reply Last reply
      0
      • N nc3b

        OK:) Now, supose i don't want anybody to be able to mofify my picture, what should i do? :) Hope i'm not bugging you too much :D :)

        M Offline
        M Offline
        malharone
        wrote on last edited by
        #6

        Rename .jpg to .dll ..!!!! Just kidding!! You can embed the image as a project resource by making image part of the project and extract the image just as you were accessing file. System.Reflection.Assembly asm = GetType().Assembly; StreamReader stream = new StreamReader(asm.GetManifestResourceStream("FULLY_QUALIFIED_NAMESPACE.FileName.jpg"));

        N 2 Replies Last reply
        0
        • M malharone

          Rename .jpg to .dll ..!!!! Just kidding!! You can embed the image as a project resource by making image part of the project and extract the image just as you were accessing file. System.Reflection.Assembly asm = GetType().Assembly; StreamReader stream = new StreamReader(asm.GetManifestResourceStream("FULLY_QUALIFIED_NAMESPACE.FileName.jpg"));

          N Offline
          N Offline
          nc3b
          wrote on last edited by
          #7

          :) Thank you very much:). Hope I'll get it right(:))) )

          1 Reply Last reply
          0
          • M malharone

            Rename .jpg to .dll ..!!!! Just kidding!! You can embed the image as a project resource by making image part of the project and extract the image just as you were accessing file. System.Reflection.Assembly asm = GetType().Assembly; StreamReader stream = new StreamReader(asm.GetManifestResourceStream("FULLY_QUALIFIED_NAMESPACE.FileName.jpg"));

            N Offline
            N Offline
            nc3b
            wrote on last edited by
            #8

            :(( i still can't make that picturebox look good... i managed to embed it, and now i set it's value at run-time.. pls help :)

            M 1 Reply Last reply
            0
            • N nc3b

              :(( i still can't make that picturebox look good... i managed to embed it, and now i set it's value at run-time.. pls help :)

              M Offline
              M Offline
              malharone
              wrote on last edited by
              #9

              Huh .. strange .. is it a very large or a high-DPI picture? I can certainly give it a try if you dont mind uploading the image.

              N 2 Replies Last reply
              0
              • M malharone

                Huh .. strange .. is it a very large or a high-DPI picture? I can certainly give it a try if you dont mind uploading the image.

                N Offline
                N Offline
                nc3b
                wrote on last edited by
                #10

                It's not a large picture... it's quite simple... here-s a link http://www.firefly.go.ro/sn.png[^]

                1 Reply Last reply
                0
                • M malharone

                  Huh .. strange .. is it a very large or a high-DPI picture? I can certainly give it a try if you dont mind uploading the image.

                  N Offline
                  N Offline
                  nc3b
                  wrote on last edited by
                  #11

                  :)) thank you verry much. I solved the problem. The problem was that the form had a transparent color... white! so.... sometimes it showed correctly, sometimes not :)) thnak you again, hope i didn't boder you too much :):-D

                  M 1 Reply Last reply
                  0
                  • N nc3b

                    :)) thank you verry much. I solved the problem. The problem was that the form had a transparent color... white! so.... sometimes it showed correctly, sometimes not :)) thnak you again, hope i didn't boder you too much :):-D

                    M Offline
                    M Offline
                    malharone
                    wrote on last edited by
                    #12

                    Oh .. ok. I tried to reproduce the behavior but couldn't so i was researching to see if it was PNG related issue.. Anyways, glad you found the culprit. - malhar

                    N 1 Reply Last reply
                    0
                    • M malharone

                      Oh .. ok. I tried to reproduce the behavior but couldn't so i was researching to see if it was PNG related issue.. Anyways, glad you found the culprit. - malhar

                      N Offline
                      N Offline
                      nc3b
                      wrote on last edited by
                      #13

                      Again, sorry i have bothered you so much.. Hope you'll help me in the future too, tough.. :) Thank you.

                      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