dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: Convert Bmp to Jpeg

  1. #1
    Join Date
    Oct 2008
    Posts
    62

    Unhappy Convert Bmp to Jpeg

    Hi I am capturing window image and save as a bmp,..

    Now i want to convert this bmp files to jpef files... name and size should be change regarding to jpeg..

    Can anyone give me a idea or send me a code for this ?

    Thanks in advance,
    Riyas.B
    Growing developer

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,603

    Re: Convert Bmp to Jpeg

    The idea is to go with CImage
    Best regards,
    Igor

  3. #3
    Join Date
    Jan 2008
    Posts
    48

    Re: Convert Bmp to Jpeg

    You don't need anything.
    It's done with one native win32 api call (SH)
    see news://comp.os.ms-windows.programmer.win32 (FAQ)

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Convert Bmp to Jpeg

    Quote Originally Posted by Laurentis View Post
    You don't need anything.
    It's done with one native win32 api call (SH)
    see news://comp.os.ms-windows.programmer.win32 (FAQ)
    Why don't you post the name of the function, or a valuable link?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  5. #5
    Join Date
    Jan 2008
    Posts
    178

    Re: Convert Bmp to Jpeg

    Quote Originally Posted by cilu View Post
    Why don't you post the name of the function, or a valuable link?
    It's a NNTP link and it works fine - api found in 2.56 seconds...

  6. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Convert Bmp to Jpeg

    Quote Originally Posted by fred100 View Post
    It's a NNTP link and it works fine
    Great. Now what if someone is working on a browser and has no nntp access, say at their worksite? Or they don't want to subscribe to that newsgroup?

    Just post a real URL link.

    Regards,

    Paul McKenzie

  7. #7
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,116

    Re: Convert Bmp to Jpeg

    Quote Originally Posted by Paul McKenzie View Post
    Great. Now what if someone is working on a browser and has no nntp access, say at their worksite? Or they don't want to subscribe to that newsgroup?

    Just post a real URL link.

    Regards,

    Paul McKenzie
    Agreed NONE of my development environments have any type of mail program installed,. I would have to go over to a different desk (virtually) to even start.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  8. #8
    Join Date
    Oct 2008
    Posts
    62

    Unhappy Re: Convert Bmp to Jpeg

    Hi I am not able to access that link... Can any one send me a exact link of this ?

    Riyas.B
    Growing Developer

  9. #9
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Convert Bmp to Jpeg

    Quote Originally Posted by riyrse View Post
    Hi I am not able to access that link... Can any one send me a exact link of this ?
    That is not an http link. That's why we asked the poster to put up a real link that is accessible to anyone.

    Regards,

    Paul McKenzie

  10. #10
    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    379

    Post Re: Convert Bmp to Jpeg

    Code:
            CImage *pImage;
             //Create pImage and set up pImage with the content of your bitmap.
               ......
            pImage->Attach( hBitmap);
            pImage->Save(fileName,Gdiplus::ImageFormatJPEG);

  11. #11
    Join Date
    Jan 2009
    Posts
    20

    Re: Convert Bmp to Jpeg

    Hi,


    I need to convert .bmp to jpeg in Windows mobile. And the CImage is not supported here. So, can anybody help me to do it in C.

    Thanks in advance
    Hema

  12. #12
    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    379

    Re: Convert Bmp to Jpeg

    Hi,

    You could have a look at the library provided by the Independent JPEG Group
    http://www.ijg.org/

    It is written in C, not C++, so should be what you're looking for. I've used it successfully for a few projects.

    Alan

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)