Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Yousfi Benameur
 To: Rick Peduzzi
  Where is Rick Peduzzi?
 Pennsylvania - United States
 Rick Peduzzi
Subject: RE: GDIPlusX and ICO files
Thread ID: 268617 Message ID: 268646 # Views: 43 # Ratings: 1
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, July 13, 2010 6:55:22 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

you need only to convert any icon to an image (jpg,bmp,png,gif..).remember that one icon gives you one image converted.

this is done by this very small code and dont needs to gdiplusX.
*!*--Author Yousfi Benameur El Bayadh Algeria
*!*--Time stamp mardi 13 juillet 2010; 17:24:59
*!*--Subject :convert any icon to image
*!*--Version VFP9SP2

&&convert ico to bmp,wmf...even jpg but no PNG
if empty(xpict)
run/n "mspaint" c:\myBMP.jpg

Important:you can also open manually any ico file with mspaint and then convert it to any image

if you want to extract images from icons in exe,dlls...there you can use gdiplusX and the link http://weblogs.foxite.com/vfpimaging/archive/2007/02/09/3255.aspx is appropriated.
the File : HowTo_ExtractIconsFromDir2.prg from Cesar is indicated to recursive folder and extract all icons converting it to png images(can change the format).
There is only one bug in this code:cut getdir() and replace with lcSelectedDir at this code level:
* Scan through the selected and the subfolders
=Recurse(lcSelectedDir)   &&GETDIR())

it works well.make your icons in a same folder and open it in the code.the converted icons are png files in c:\myIcons.

Yousfi Benameur


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