Imaging API: Load, Resize and Save a JPEG



Hi! Please bear with me, I am coming from Linux and C, and just
gettting started with NET CF and C#. I am working on an App for the
Treo 700w that would take photos, and then be able to resize them and
ftp them. Right now I have this all working using the .NET CF.

The problem I have is that default interpolation in .net is Nearest
Neighbor and this gives really bad results. It is possible to do
Bicubic Interpolation using the Imaging API in Windows CE 5.0... but I
am bot quite smart enough to figure out how to do all the wrapping. I
know this will be possible with the OpenNETCF 2.0 SDF but I would only
be using such a small part of it that I would like to go with something
a little more lightweight, like wrapping the API in managed code.
Right now I am able to load the Jpeg file and resize it as a bitmap
using IImageFactory, and CreateBitmapFromFile, which looks like it does
the resizing right there.

I think all I need to do is save it to a jpeg now. Is this sounding
right? Does anyone have pointers on this? Any source code would be
REALLY REALLY helpful. Actaully any source code for any part of this
process would be great!

So far this has been a great starting point:
http://blogs.msdn.com/chrislorton/archive/2006/04/07/570649.aspx

Thanks in advance,

Luke

.



Relevant Pages

  • Re: Converting image to byte array
    ... > The source code is the following: ... > MemoryStream ms = new MemoryStream; ... > The image inside the PictureBox was obtained from a jpeg file the ... It seems that GDI+ was kept in a corrupted state. ...
    (microsoft.public.dotnet.languages.csharp)
  • Wrapping routines
    ... I have been experimenting a bit with wrapping a library, that is, ... the library routines and the calling program without actually changing ... have the source code for it or I do not want to mess with it. ... end subroutine sub_a ...
    (comp.lang.fortran)
  • How to save a picturebox to a jpeg file?
    ... as topic, i wan to create a function to save the content of a picturebox to jpeg file, anyone can provide the source code?? ...
    (microsoft.public.dotnet.general)
  • Re: RGB to JPEG
    ... From this array I want to generate a JPEG file using C#. ... Pls provide me with some source code. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# inheritance broken?
    ... It wasn't my intention to use reflection directly, but to use it to create ... new source code, which has implemented all methods of the Document object, ... so that you don't have to do the wrapping by "hand". ...
    (microsoft.public.dotnet.languages.csharp)

Loading