Help in coverting image formats

Discussion in 'Software' started by MostafaSayed, Jun 25, 2007.

  1. MostafaSayed

    MostafaSayed

    Joined:
    Jun 25, 2007
    Messages:
    1
    I work in image processing program and I have a problem in converting image from format to another.
    The first problem
    I converted the Image file to Icon through 2 ways but still have problems these 2 ways are:
    1-
    Bitmap icon =new Bitmap (ImagePath);
    icon.Save(targetfilename, ImageFormat.Icon);
    This way don't work correctly
    2-
    Bitmap bitmap = new Bitmap(ImagePath);
    Icon ico = Icon.FromHandle(bitmap.GetHicon());
    FileStream fs = new FileStream(targetfilename, FileMode.OpenOrCreate);
    ico.Save(fs);
    fs.Close();
    This way make colors of the output icon change.
    How can I convert this type?

    The second problem:
    When I convert to gif file as follow:
    Bitmap bitmap = new Bitmap(ImagePath);
    bitmap.Save(targetFileName, ImageFormat.Gif);
    This way make low resolution, and if the source image doesnot have background, the output file will be with background in the converted formats (.Gif, .Bmp, .Jpeg)
    How can I convert this type?


    The third problem:
    The formats Wmf, Exif, Emf donot have Encoder.
    How can I convert them?

    Please tell me wat is the wrong in my code
     
    MostafaSayed, Jun 25, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FireSword
    Replies:
    0
    Views:
    441
    FireSword
    Nov 21, 2003
  2. Dave Watson

    Coverting NTFS to FAT32 amongst other things

    Dave Watson, Aug 24, 2003, in forum: Computer Support
    Replies:
    6
    Views:
    3,671
    apple2012
    Oct 9, 2010
  3. Allan
    Replies:
    0
    Views:
    6,085
    Allan
    Jul 15, 2005
  4. Jonathan Walker
    Replies:
    1
    Views:
    578
    Peter
    Aug 26, 2007
  5. helena68
    Replies:
    3
    Views:
    1,465
    popularscan
    Nov 26, 2008
Loading...

Share This Page