Store Images...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Now I am working on a Pocket PC image processing software. I need to store
images after they have been modified. Realizing Compact Framework doesn't
support the "Image.Save" method, I bring in a jpeg encoder (in C++), which is
able to encode a BMP file into a JPG file, and modify it to accept a byte[]
as the input instead of a BMP file.

I planed to use to "Bitmap.GetPixel" method to get every pixel's color and
generate a byte[]. However, I am very sad to find that my programme doesn't
respond once get started. I think this problem may due to the slow speed of
the "Bitmap.GetPixel" method and the large amount of pixels (640*480).

Please tell me how to solve this problem, or tell me some other ways to
store a Image.

Any help is greatly appreciated!!
 
I have just checked this BBS and found many similiar cases. However I still
cannot find a solution to my problem... What has drawed my attention is the
method to save a Image object to a BMP file. If anyone can provide more
detailed information on this method, I think I can find a way to get through
my problem.

Best Regards.
 
Using Bitmap.GetPixel is really slow method. The better solution would
be to use an array of pixels for processing. To retrieve the pointer to
the first pixel use BitmapEx.LockBits in the OpenNETCF.Drawing namespace:
http://www.opennetcf.org/sdf/
 
Thanks Mr.Bogdanov, I will try it later today.

P.S. I have checked the past messages and found you are a very kind person
who always help other people to solve their problems. Glad yo meet you,
Mr.Bogdanov. :-)

Sergey Bogdanov said:
Using Bitmap.GetPixel is really slow method. The better solution would
be to use an array of pixels for processing. To retrieve the pointer to
the first pixel use BitmapEx.LockBits in the OpenNETCF.Drawing namespace:
http://www.opennetcf.org/sdf/

--
Sergey Bogdanov
http://www.sergeybogdanov.com


Chase said:
Hi,

Now I am working on a Pocket PC image processing software. I need to store
images after they have been modified. Realizing Compact Framework doesn't
support the "Image.Save" method, I bring in a jpeg encoder (in C++), which is
able to encode a BMP file into a JPG file, and modify it to accept a byte[]
as the input instead of a BMP file.

I planed to use to "Bitmap.GetPixel" method to get every pixel's color and
generate a byte[]. However, I am very sad to find that my programme doesn't
respond once get started. I think this problem may due to the slow speed of
the "Bitmap.GetPixel" method and the large amount of pixels (640*480).

Please tell me how to solve this problem, or tell me some other ways to
store a Image.

Any help is greatly appreciated!!
 
Back
Top