Displaying jpg-s and gif-s

This is a discussion on Displaying jpg-s and gif-s within the Windows Programming forums, part of the Platform Specific Boards category; How can I display external jpg or gif images in my program?...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Displaying jpg-s and gif-s

    How can I display external jpg or gif images in my program?

  2. #2
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    that's a kind of vague question. Maybe use an image control.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    >>that's a kind of vague question

    [vague answer]

    GDI+
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    VAGUE??????? jpg-s and gif-s are SPECIFIC image types, if I would ask how to display images, that would be VAGUE question.

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Here is an example of using a list-view as an image box which will support JPEG and GIF images. Other options include OleLoadPicture and GDI+.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    >How can I display external jpg or gif images in my program?

    >VAGUE??????? jpg-s and gif-s are SPECIFIC image types

    There are other considerations....

    MFC or WIN32?

    .NET or VC 6?

    Double buffering?

    Using a control ie button?

    ect......
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Win32

  8. #8
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    But I got the point from anonytmouse's link already...

  9. #9
    Registered User
    Join Date
    Apr 2006
    Posts
    137
    One question Is there anyway to make it internal i would hate to constantly move JPG files, along with the program, isnt there a way to compress it into the EXE or put it in some sort of compressed file and easily extract it? like a CAB or something? Or maybe somehow attached to the EXE???????

  10. #10
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    isnt there a way to compress it into the EXE
    Yes, you can embed the gif in a resource file and use the following to retrieve it:

    FindResource
    LoadResource
    LockResource

    An example of a resource entry would be as follows:

    Code:
    IDB_MYPIC              BINARY                  "res\\mypic.gif"
    Finally, I would use IPicture to display the image.

  11. #11
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Quote Originally Posted by execute
    One question....
    Please don't bump old threads. Just create a new thread and include a link to the thread you need to reference.
    Quote Originally Posted by kermi3
    Welcome to the boards. If you haven't already done so then please take some time to familiarise yourself with the faq:
    http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

    Make sure you have a look at the the posting guidelines:
    http://cboard.cprogramming.com/annou...ouncementid=51
    Following the rules will ensure you get a prompt answer to your question.

    Remember, too, that the board has a search facility, a link is at the top of your screen:
    http://cboard.cprogramming.com/search.php
    It will often get you a quicker answer to your questions than waiting for a response to one you have posted.


    If you have any questions about this you may ask or you can contact one of our forum leaders:

    http://cboard.cprogramming.com/showgroups.php
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21