Poser une questionPoser une question
 

TraitéeC#.net

  • vendredi 3 juillet 2009 08:34shraddhak99 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Since each pixel of an image is stored as byte......... how can we retrieve/read each byte and do some operation on it....?

    And  can we store image (pixels) in binary form (bytes) in an array...?


    if anybody knows please provide the code.

Réponses

  • vendredi 3 juillet 2009 18:00litdevAuteur de réponseMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Are you on the right forum, this is SmallBasic only?  Judging by your title C#.net, you might try a C# forum.

    If you are using SB, then color = GraphicsWindow.GetPixel(x,y) and GraphicsWindow.SetPixel(x,y,color), where color is an RGB byte (e.g. ffffff for white) may be used to manipulate the graphics window, but not an image that is not currently displayed.   You would have to display an image first (graphicsWindow.DrawImage or GraphicsWindow.DrawResizedImage) then manipulate the display directly, not the image.

Toutes les réponses

  • vendredi 3 juillet 2009 18:00litdevAuteur de réponseMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Are you on the right forum, this is SmallBasic only?  Judging by your title C#.net, you might try a C# forum.

    If you are using SB, then color = GraphicsWindow.GetPixel(x,y) and GraphicsWindow.SetPixel(x,y,color), where color is an RGB byte (e.g. ffffff for white) may be used to manipulate the graphics window, but not an image that is not currently displayed.   You would have to display an image first (graphicsWindow.DrawImage or GraphicsWindow.DrawResizedImage) then manipulate the display directly, not the image.