Thread: Displaying images

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    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.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    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 geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470
    Thanx. i'll try that.
    Any other suggestion?
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur 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 geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470
    Thanx again.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    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, 07:05 PM
  2. Newbie: Displaying jpeg images in C++
    By C2beginner in forum Windows Programming
    Replies: 7
    Last Post: 10-30-2006, 01: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