bit depth

hi ppl..
i want to know if we can convert jpeg file to bmp file
while we restore the bit depth (24 bit in jpeg format)
to (8 bit in bmp format)  which is changed by default  (by editing in mspaint)Idea...
u can see such bitmap file in urs "c:\document & settings\"(current user)"\local settings\microsoft\application data\ "    folder which file is actually the one set as background on ur desktopIdea


Answer this question

bit depth

  • Chris Boden

    You can create a new Bitmap object by passing the name of a JPEG file to the constructor, then use the Save method to create a new BMP file with the desired colour depth.  JPEG is a lossy format though, so you will never get back the detail that was lost when the original bitmap was compressed in the first place.

  • Keshaba

    There is no single method to convert an existing JPEG file to the BMP format.  Like I said, you must create a Bitmap object from the JPEG file and then Save it as a BMP.  There will be no loss of information when saving the file, assuming you set the colour depth high enough.  The loss I was talking about was when the original bitmap was converted to a JPEG in the first place, which is unrecoverable.

    Also, you can convert a JPEG to a BMP in MS Paint without losing information.  You simply select 24-bit BMP when saving.

  • Pooja Jain

    thanx for ur help jmcilhinney.Big Smile
    but i would like to know..
    if within image r bitmap class there is a function to convert jpeg to bmp file..
    without changing color depth..
    because once changed to bmp file information lost won't be restored..
    ashtified_85

  • bit depth