locked
How to loadimage saveimage .bmp .jpg .png .gif RRS feed

  • Question

  • Merry Christmas,

    How to loadimage saveimage .bmp .jpg .png .gif . 

    Which .dll can I find this capability in? 

    An example in C would be great! 

    Is there one function all images, or one function for each image extension?

    Thanks a bunch...vmars316 

     

    btw: How come this finction "Alert me when someone responds to this post." doesn't work for me? Thanks

    Sunday, December 26, 2010 3:46 AM

Answers

  • Look into CImage's source code, it is just a wrapper of Windows's GDI+ API. You can just call GDI+ instead.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, December 28, 2010 1:30 AM
  •  

    Hi vmars316,

     

    I'm Jesse, and I’ll be helping you.

     

    Firstly windows API function LoadImage only support bitmaps, if we want to load different type image we can use GDI+ as Sheng Jiang said.

     

    Here are types GDI+ supported there is Bitmap class in GDI+, first we should convert others types into Bitmap then operator it.

     

     I hope these information can help you to solving the issue. If I misunderstood you, please describe your question in more detail.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 30, 2010 10:25 AM
    Moderator

All replies

  • See CImage::Load() and CImage::Save().

    Some code samples can be found at CodeProject. Here is one example.

    Monday, December 27, 2010 1:31 AM
  • Looks like i would need 'Microsoft Visual Studio 2005' which i don't have. 

    And i would like to stay away from MFC. Go with straight winapi.

    Thanks...vmars316

     

    Tuesday, December 28, 2010 1:00 AM
  • Look into CImage's source code, it is just a wrapper of Windows's GDI+ API. You can just call GDI+ instead.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, December 28, 2010 1:30 AM
  •  

    Hi vmars316,

     

    I'm Jesse, and I’ll be helping you.

     

    Firstly windows API function LoadImage only support bitmaps, if we want to load different type image we can use GDI+ as Sheng Jiang said.

     

    Here are types GDI+ supported there is Bitmap class in GDI+, first we should convert others types into Bitmap then operator it.

     

     I hope these information can help you to solving the issue. If I misunderstood you, please describe your question in more detail.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 30, 2010 10:25 AM
    Moderator