Results 1 to 8 of 8

Thread: ImageFormat - BMP can't open...

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    ImageFormat - BMP can't open...

    My program saves images in BMP format. MSpaint opens the new file OK but MS PhotoEditor doesn't (error: "Couldn't open file"). MSPhotoeditor usually opens bmp's OK so what is different? Do the Image/Bitmap classes save bitmaps in a non-standard manner?

    Is this a problem with photoeditor or .Net?
    I don't live here any more.

  2. #2
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Got the same problem

    I've got the same problem on saving bitmaps.
    Maybe it has something to do with MyBitmap.Save( string, imageformat)
    I'm looking for an imageformat to specify the BitMap.

    Still looking.....

  3. #3
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: ImageFormat - BMP can't open...

    Hi
    I tested the following on 4 diferent programs (irfanview,paint,windows picture and fax viewer and paintshop pro) and opens ok, can't find msphotoeditor on my system?!

    Code:
    Dim a As New Bitmap(100, 100, Imaging.PixelFormat.Format32bppRgb)
    a.Save("c:\test.bmp", Imaging.ImageFormat.Bmp)
    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  4. #4

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: ImageFormat - BMP can't open...

    Start...Programs...Microsoft Office Tools...
    I don't live here any more.

  5. #5
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: ImageFormat - BMP can't open...

    Hi

    Same error !!

    Tried saving as Imaging.ImageFormat.Jpeg works ok, its only with bitmaps.

    Regards
    Jorge
    Last edited by Asgorath; Dec 6th, 2004 at 09:18 AM.
    "The dark side clouds everything. Impossible to see the future is."

  6. #6
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840

    Re: ImageFormat - BMP can't open...

    Hi guys.

    You cannot use a colordepth of more than 24bbp.
    At least, not if you want to open it in MS Photo Editor.

    Code:
    Dim a As New Bitmap(100, 100, Imaging.PixelFormat.Format24bppRgb)
    a.Save("c:\test.bmp", Imaging.ImageFormat.Bmp)
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  7. #7
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    My problem was the filestreamer

    I loaded the image in a filestreamer.
    Like this:

    Dim fs as FileStream = new IO.Filestream(Imagename, FileMode.Open)
    Dim MyImage as bitmap = bitmap.FromStream(fs)
    fs.Close()
    Me.PictrueBox1.Image = MyImage.Clone

    Me.PictureBox1.Image.Save(Savename)

    This is not what I'm doing more often, Cause I cannot read the bitmap with an Imageviewer, after saving.

    Now I just load the image Like: Dim MyImage as Bitmap = new Bitmap(ImageName)
    Then it works perfectly!

  8. #8
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Angry ImageFormat - BMP can't open...

    I load bitmaps into my program and save it, like the previous post up here,
    but I can only view it in photo editor.
    Even Paint shop doesn't show the Bitmaps.

    Does anyone know what's the problem??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width