IPicture

This is a discussion on IPicture within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to load a JPEG through an IPicture object (OLE), and I want to somehow transform that into an ...

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    IPicture

    I'm trying to load a JPEG through an IPicture object (OLE), and I want to somehow transform that into an RGB map. My first attempt was to get a HDC from it through the get_CurDC() method then use GetPixel() to retrieve the pixel color at a certain X and Y position in the map. However, GetPixel only returns CLR_INVALID at every call I make.

    I'm pretty sure that the JPEG gets loaded properly since the get_Width() and get_Height() members returns the same dimensions as the image that was loaded.

    Has anyone any suggestions?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Fixed. Don't mind this thread now (I'm unable to delete it :/ )
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM

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