Displaying images

This is a discussion on Displaying images within the Windows Programming forums, part of the Platform Specific Boards category; Hi, In my app, i let the user to select a folder which's got image files in it. When user ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    365

    Displaying images

    Hi,

    In my app, i let the user to select a folder which's got image files in it. When user selects the folder, i must display thumbnailes of the image files, on my dialog window (like in Webshots or ACD see). What's the simplest way to do this? I've thought of creating buttons and displaying the images on those buttons. But again, how can i display a image file on the disk on a button?

    Thanks.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    The easiest way to do this is to use an image loader. The image loader would be code that someone else has written that would load the image into memory, and convert it to a useable format.

    For instance, for JPG files you could use the code at http://www.voicenet.com/~richgel/

    Writing library functions for all the different types of images would be tedious on your own, that's why it's a good idea to search for code that other people have already written.

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    365
    Thanx. i'll try that.
    Any other suggestion?
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    52
    Try looking for the GD library (http://www.boutell.com/gd/). Very handy
    - Daniel Wallace

  5. #5
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    365
    Thanx again.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    GDI+ will handle many common image formats. Is included with later versions of MSVC.

    ImageSource is very good (from SmallerAnimals Software) not free.

    Create a buffer DC to hold composite image or drawing will be too slow when paint called.

    GetDC()
    CreateCompatibleDC()
    CreateComaptibleBitmap()
    SelectObject()
    ReleaseDC()
    DeleteObject()
    BitBlt()
    "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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading & Displaying Images
    By devarishi in forum C Programming
    Replies: 9
    Last Post: 12-10-2008, 06:05 PM
  2. Newbie: Displaying jpeg images in C++
    By C2beginner in forum Windows Programming
    Replies: 7
    Last Post: 10-30-2006, 12:05 AM
  3. Displaying animated images.
    By Queatrix in forum Windows Programming
    Replies: 4
    Last Post: 06-14-2005, 09:53 PM
  4. tutorial on displaying images
    By Chobo_C++ in forum C++ Programming
    Replies: 1
    Last Post: 04-04-2004, 04:12 PM
  5. Displaying images
    By yodoblec in forum Game Programming
    Replies: 1
    Last Post: 06-08-2003, 02:39 PM

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