Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Carlos Alloatti
  Where is Carlos Alloatti?
 
 Vatican City State (Holy See)
 Carlos Alloatti
 To: Rick Peduzzi
  Where is Rick Peduzzi?
 Pittsburgh
 Pennsylvania - United States
 Rick Peduzzi
 Tags
Subject: RE: GDIPlusX and ICO files
Thread ID: 268617 Message ID: 268648 # Views: 54 # Ratings: 4
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, July 13, 2010 6:48:03 PM         
   


> Hi Folks,
>
> I've been working with GDIPlusX (what a great piece of work!) but I'm having one problem that I don't know how to solve.
>
> I'm trying to extract images from a few .ico files, following the code shown in "Extract icons from EXE, DLL and ICO files with GdiPlus-X" in the VFP Imaging blog. But, no matter what I've tried, the program only sees one image. I've tried searching for a solution, but without any luck.
>
> Is there a way to extract all of the images from an .ico file using GDIPlusX? I'd appreciate any help!
>
> Thanks,
> Rick

Well, you hit exactly one of gdi+ problems: dealing with ico files. The solution I came up with is deal with the ico file myself, extract individual images inside, and hand those back to gdi+.

Check the comments here: http://www.ctl32.com.ar/articles/ctl32_toolbar_notes.asp (Handling icons)

I made a couple of classes to deal with this, I could post some code if you are interested.

EDIT:

Here it is, you will have to adapt it to your requirements, this is a proof of concept test, needs system.app

https://www.foxite.com/uploads/27d98e3f-9ba9-45ff-ae46-35d7a27d9f90.zip

---
Carlos Alloatti

ENTIRE THREAD

GDIPlusX and ICO files Posted by Rick Peduzzi @ 7/13/2010 3:50:12 PM
RE: GDIPlusX and ICO files Posted by Koen Piller @ 7/13/2010 3:54:32 PM
RE: GDIPlusX and ICO files Posted by Yousfi Benameur @ 7/13/2010 6:55:22 PM
RE: GDIPlusX and ICO files Posted by Carlos Alloatti @ 7/13/2010 6:48:03 PM
RE: GDIPlusX and ICO files Posted by Rick Peduzzi @ 7/13/2010 9:10:55 PM
RE: GDIPlusX and ICO files Posted by Rick Peduzzi @ 7/14/2010 4:26:31 AM