CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2014
    Posts
    205

    How to read images in GDI or GDI+

    I am working on application to work with images. I need advise how to open/read images, whether it is jpeg, png, bmp or tiff and get it to bitmap. Is there some universal command for this or I will need more commands, every time testing the extension or format and then to use different method to read the image? Best would be to do it automatically, but I don't know such command.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to read images in GDI or GDI+

    Have a look at CImage Class
    Victor Nijegorodov

  3. #3
    Join Date
    May 2014
    Posts
    205

    Re: How to read images in GDI or GDI+

    Will it work for Visual Studio Express 2010? It is in the list of classed which are shared on MFC and ATL.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to read images in GDI or GDI+

    I don't have any VS Express... nor did I use this class.
    Why don't you want to test it with your VS?
    Victor Nijegorodov

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: How to read images in GDI or GDI+

    Quote Originally Posted by crazy boy View Post
    Will it work for Visual Studio Express 2010? It is in the list of classed which are shared on MFC and ATL.
    No. The Express versions of Visual Studio don't have/support the MFC/ATL classes. If you want to use MFC/ATL classes you need one of the full paid-for versions of Visual Studio.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  6. #6
    Join Date
    May 2014
    Posts
    205

    Re: How to read images in GDI or GDI+

    Quote Originally Posted by VictorN View Post
    I don't have any VS Express... nor did I use this class.
    Why don't you want to test it with your VS?
    Because I dont use payed version of VS.

  7. #7
    Join Date
    May 2014
    Posts
    205

    Re: How to read images in GDI or GDI+


  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to read images in GDI or GDI+

    Quote Originally Posted by crazy boy View Post
    If you are looking for non MFC/ATL responses, a better forum to post in would be the C++ WinAPI forum.

  9. #9
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: How to read images in GDI or GDI+

    Quote Originally Posted by crazy boy View Post
    I am working on application to work with images. I need advise how to open/read images, whether it is jpeg, png, bmp or tiff and get it to bitmap. Is there some universal command for this or I will need more commands, every time testing the extension or format and then to use different method to read the image? Best would be to do it automatically, but I don't know such command.
    Bitmap::FromFile
    Best regards,
    Igor

Tags for this Thread

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

Featured