Results 1 to 3 of 3

Thread: Editing images pixel by pixel in CE

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Editing images pixel by pixel in CE

    I am writing software in Windows CE for my Win Mobile 5 handheld PC. The reason why I am using CE is I have very little (next to none) experience in .NET and I feel more comfortable writing in a VB6 environment (and I have a CE development system installed to allow me to do this in VB6).

    A piece of code I am writing displays a map on-screen (taken from streetmap) in an image box. It loads a BMP file (seems CE items can only load BMP or even less efficient image formats) and displays it in the image box which I will then use for navigation (not through a GPS system...I'm not writing that sort of program). I want to then read in the values of specific pixels within that image and perform a filter on the pixel and re-draw it on the image...I basically want to highlight specific streets and will have co-ordinate data on each street in the program.

    Has anyone got suggestions on how I would be able to manipulate pixels in an image like that?

    Another aspect of this program I am working on is a more efficient way to store map-style images by reducing the number of colours...in theory I could get the maps I am displaying into about 5k or so...I'm looking for a method that could manipulate an image fast enough in CE, but the priority here is the above (editing specific pixels rather than the whole image :-))
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Editing images pixel by pixel in CE

    I'm glad to see the helping spirit hasn't left this place
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Editing images pixel by pixel in CE

    Frankly, I had no idea that you could write for Mobile 5 using VB6 syntax. That shocks me. I thought eVB was pretty bad, especially since it was VBScript behind the scenes. The mobile dev forum doesn't get nearly the traffic the main languages get, and you're asking about something I have never heard of. If I'm a representative sample (which may or may not be true), then you can't be expecting anything too quick here.

    Obviously, you want to take the pixel as a four byte integer, and use a mask to alter it. This would be easiest if done in place. I have no familiarity with a BMP format in an imagebox in VB6. In fact, I have only a casual understanding of BMP format, and no familiarity of imageboxes in VB6. However, it seems that if you have a BMP, you should also have an array of pixels. If you have that array, and they are not already a four byte integer (a long in VB6), it seems that VB6 had the functions to convert other formats to the four byte integer (though it has been years, so I may be remembering .NET functions, instead).

    What you may have to do, depending on how the control works, is have the control, and a duplicate image in memory. You would then alter the duplicate image, and replace the one on the control.

    That's as far as I get with my limitted knowledge of those controls and file formats. I'd do better at the masking part, but that's the easy part.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width