Re: Large image

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Chris,
The problem there is just trying to load a 3000x3000 bitmap is very likely
to run the device out of memory long before it's fully in memory.

Correct, that's why I said that he should write a "read and decode" method,
essentially the equivalent of "new Bitmap (filename, x, y, cx, cy)".

SetPixel will be painfully slow if attempting to copy the data. It's
probably better to just lock the destination bitmap and use copy methods
to pull from a stream and write it into the scan0 ptr at an offset.

Right, that's why I suggested to use SetPixel while testing (i.e. just get
it working), then use LockBits (i.e. scan0) to optimize, unless using scan0
initially would be best although i doubt it given the number of BMP formats,
pixel depths, etc.

Hilton


"Hilton" <nospam@xxxxxxxxxx> wrote in message
news:l41pj.10164$hI1.6408@xxxxxxxxxxxxxxxxxxxxxxx
If I recall, you're working with BMP images. If that is the case, you
can write a relatively simply method to read and decode the BMP into a
Bitmap object. use SetPixel while testnig and LockBits to optimize.

Hilton


"Broeden" <hihansson@xxxxxxxxxxx> wrote in message
news:d445e050-11a3-4146-b328-c7e5286d81d6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 31 Jan, 14:58, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
Nothing. The community edition is free, so just download, install, add a
reference and use. If you want Studio integration with toolbox support,
help, templates and full source code then you can buy the SDF Extensions
for
Studio for a nominal fee.

Thanks again!

I have install the SDF and tested the samples. I have found out how to
load parts of the image to get a thumbnail of the image.
But is it possible to load for instance the upper left 1000*1000
pixels of a large image?

/Broeden





.



Relevant Pages

  • Re: Large image
    ... The problem there is just trying to load a 3000x3000 bitmap is very likely ... to run the device out of memory long before it's fully in memory. ... templates and full source code then you can buy the SDF Extensions ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: GDI clean up problem
    ... I am working on WinCe project In which i am loading number of bitmap ... Now my problem is I want to free the memory allocated in the gwes heap ... Here is the code what I am using to load a bitmap image. ... and when i delete the brush object It only recovers 152 k while the ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Display bitmap problem
    ... These two buttons load a bitmap from a file to a picture box ShowBmp ... What's that MemDC above for? ... OK, so you have the bitmap in the memory DC, but where did you copy the memory DC to the ...
    (microsoft.public.vc.mfc)
  • Re: How can I use brush edit an opened DIB and save it?
    ... If you're using GDI, load the bitmap into a DIB section, create a memory DC, ... If you're using GDI+, it's much easier to load a bitmap, create a Graphics ...
    (microsoft.public.win32.programmer.gdi)
  • Re: memory leak
    ... ArgumentException on Full Framework) when I have a ton of virtual memory ... "new Bitmap" line. ... Dispose is not a required call - it is optional. ... you are done with those resources. ...
    (microsoft.public.dotnet.framework.compactframework)