Store Images...

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!!
 
G

Guest

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.
 
S

Sergey Bogdanov

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/
 
G

Guest

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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top