How to find an image or icon in memory 
Author Message
 How to find an image or icon in memory
Hi Ya'll;

This question is related to an earlier thread. I'm doing an app that is
"skinned" in Susan's Ace Icon/background set. I used the baby blue version.
The client loved the look and feel, especially the "leather" background. But
he wants it in Texas A & M colors (which really pains this Texas Tech fan),
ie, Maroon/white/silver. In fact, he wanted to be able to adjust the colors
himself. I thought about taking each of the icons and images and colorizing
them with Paint Shop Pro & Icon Workshop ... but then I would have to
include every new file name into my project, or fetch them off of disk,
which isn't practical for this app by any stretch. But ...

If I could find the gif images / icons in memory, then maybe I could adjust
the RGB values on the fly.

Does this sound possible?

Greg Scales



Sun, 06 Nov 2005 12:37:37 GMT  
 How to find an image or icon in memory
Greg:
This article from msdn: Icons in Win32 by John Hornick explains the format
of icons on disk and says the icons in memory (hicon) has the same format.
I suppose if you studied that article very carefully, it may be possible but
quite difficult to change colors unless you frequently program at that low
level are are good with pointers and addresses.
Jim Kane


Quote:
> Hi Ya'll;

> This question is related to an earlier thread. I'm doing an app that is
> "skinned" in Susan's Ace Icon/background set. I used the baby blue
version.
> The client loved the look and feel, especially the "leather" background.
But
> he wants it in Texas A & M colors (which really pains this Texas Tech
fan),
> ie, Maroon/white/silver. In fact, he wanted to be able to adjust the
colors
> himself. I thought about taking each of the icons and images and
colorizing
> them with Paint Shop Pro & Icon Workshop ... but then I would have to
> include every new file name into my project, or fetch them off of disk,
> which isn't practical for this app by any stretch. But ...

> If I could find the gif images / icons in memory, then maybe I could
adjust
> the RGB values on the fly.

> Does this sound possible?

> Greg Scales



Sun, 06 Nov 2005 12:39:02 GMT  
 How to find an image or icon in memory
Hi Jim;

Thanks for the reply! I'll try to find the article. I am used to working at
a very low level ... even in assembler. But in Clarion, how do you find the
address of an image or icon?

Greg


Quote:
> Greg:
> This article from msdn: Icons in Win32 by John Hornick explains the format
> of icons on disk and says the icons in memory (hicon) has the same format.
> I suppose if you studied that article very carefully, it may be possible
but
> quite difficult to change colors unless you frequently program at that low
> level are are good with pointers and addresses.
> Jim Kane



> > Hi Ya'll;

> > This question is related to an earlier thread. I'm doing an app that is
> > "skinned" in Susan's Ace Icon/background set. I used the baby blue
> version.
> > The client loved the look and feel, especially the "leather" background.
> But
> > he wants it in Texas A & M colors (which really pains this Texas Tech
> fan),
> > ie, Maroon/white/silver. In fact, he wanted to be able to adjust the
> colors
> > himself. I thought about taking each of the icons and images and
> colorizing
> > them with Paint Shop Pro & Icon Workshop ... but then I would have to
> > include every new file name into my project, or fetch them off of disk,
> > which isn't practical for this app by any stretch. But ...

> > If I could find the gif images / icons in memory, then maybe I could
> adjust
> > the RGB values on the fly.

> > Does this sound possible?

> > Greg Scales



Sun, 06 Nov 2005 13:08:12 GMT  
 How to find an image or icon in memory
Hi Greg,

It might be easier just to buy the Ace Icons sets in burgundy... which
should be available on the website in a few weeks, but we could work out
something to get them to you before then, if you wanted.

I suppose could do a special run in A&M maroon... hmmm, that might even be a
better idea than my nice dark red burgundy, perhaps.  (I'm working on orange
right now, come to think of it;).

The red, blue and green sets came out AWESOME, by the way.  Those of you who
are interested in those colors are going to be very happy. :)

--
Susan Pichotta
Ace Icons, GIFs, Backgrounds & Buttons    www.aceicons.com
San Antonio, Texas


Quote:
> Hi Ya'll;

> This question is related to an earlier thread. I'm doing an app that is
> "skinned" in Susan's Ace Icon/background set. I used the baby blue
version.
> The client loved the look and feel, especially the "leather" background.
But
> he wants it in Texas A & M colors (which really pains this Texas Tech
fan),
> ie, Maroon/white/silver. In fact, he wanted to be able to adjust the
colors
> himself. I thought about taking each of the icons and images and
colorizing
> them with Paint Shop Pro & Icon Workshop ... but then I would have to
> include every new file name into my project, or fetch them off of disk,
> which isn't practical for this app by any stretch. But ...

> If I could find the gif images / icons in memory, then maybe I could
adjust
> the RGB values on the fly.

> Does this sound possible?

> Greg Scales



Sun, 06 Nov 2005 22:57:14 GMT  
 How to find an image or icon in memory
Hi Susan;

I may do that, anyway. However, this app needs to be able to be "skinned" by
the user. If I include every possible color combination it will cause an
overly complex project file and a rather large load module. The client
doesn't want all those icons and pictures on his user's directory. I'm in
essence building a tool for the client to build screens for his users. I
want the images and icons imbedded in the .EXE, if that makes any sense.

By the way, I would really like you to add an icon for Import and one for
Export. I've tried different ones, but ... you're the artist ... got any
ideas?

Greg Scales


Quote:
> Hi Greg,

> It might be easier just to buy the Ace Icons sets in burgundy... which
> should be available on the website in a few weeks, but we could work out
> something to get them to you before then, if you wanted.

> I suppose could do a special run in A&M maroon... hmmm, that might even be
a
> better idea than my nice dark red burgundy, perhaps.  (I'm working on
orange
> right now, come to think of it;).

> The red, blue and green sets came out AWESOME, by the way.  Those of you
who
> are interested in those colors are going to be very happy. :)

> --
> Susan Pichotta
> Ace Icons, GIFs, Backgrounds & Buttons    www.aceicons.com
> San Antonio, Texas



> > Hi Ya'll;

> > This question is related to an earlier thread. I'm doing an app that is
> > "skinned" in Susan's Ace Icon/background set. I used the baby blue
> version.
> > The client loved the look and feel, especially the "leather" background.
> But
> > he wants it in Texas A & M colors (which really pains this Texas Tech
> fan),
> > ie, Maroon/white/silver. In fact, he wanted to be able to adjust the
> colors
> > himself. I thought about taking each of the icons and images and
> colorizing
> > them with Paint Shop Pro & Icon Workshop ... but then I would have to
> > include every new file name into my project, or fetch them off of disk,
> > which isn't practical for this app by any stretch. But ...

> > If I could find the gif images / icons in memory, then maybe I could
> adjust
> > the RGB values on the fly.

> > Does this sound possible?

> > Greg Scales



Sun, 06 Nov 2005 23:28:05 GMT  
 How to find an image or icon in memory
Hi Greg,

On Tue, 20 May 2003 23:37:37 -0500, "Greg Scales"

Quote:

>he wants it in Texas A & M colors (which really pains this Texas Tech fan),
>ie, Maroon/white/silver. In fact, he wanted to be able to adjust the colors
>himself. I thought about taking each of the icons and images and

Why not bite the bullet and get ImageEx or something similar.  Supply
the icons/wallpapers as images, load them at runtime, provide means
for the user to load the images and apply a color filter to them or
something like that.  I know Charles Edmonds has been working on
something similar.  However, when dealing with images like icons,
changing colors is NOT a simple thing to do.  If you are for example
using the shadowed set, the shadow picks up the color of the
background color when it's rendered into the ico format.  So if you
change the light blue set into red, the shadow will still have a hazy
blue shade to it and look odd on red.  Sue is coming out with a _lot
more colors soon and it might be easier/simpler to supply the
icons/imges in a specified set of color themes, and allow the user to
switch between them, rather than mess around with changing the images.

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Sun, 06 Nov 2005 23:50:29 GMT  
 How to find an image or icon in memory
Hi Greg,

On Wed, 21 May 2003 10:28:05 -0500, "Greg Scales"

Quote:

>the user. If I include every possible color combination it will cause an
>overly complex project file and a rather large load module. The client
>doesn't want all those icons and pictures on his user's directory. I'm in

Personally I'd rather supply them in external files, that way they can
so easily be manipulated, moved, whatever.  BUT, you could link them
into a dll and access them from there.  

The way I would do this, is supply Theme files, each theme would be an
ini file (or resembling one) that had information about what icons to
use for what buttons etc:

Default.Theme.ini:
[Buttons]
OK=Ok.ico
Cancel=cancel.ico
[Wallpaper]
Wallpaper=image.jpg
Mode=Stretched

etc.

A red theme could for example have:

Red.Theme.ini:
[Buttons]
Ok=RedOk.ico
Cancel=RedCancel.ico
[Wallpaper]
Wallpaper=redimage.jpg
Mode=Tiled

etc.

In the program they select the theme file and that is saved, so that
when you start the program it saves the theme file in a global
variable or something and then you can do:

?OK {Prop:Icon} = GetIni('Buttons','Ok','ok.ico',Glo:ThemeFileName)
?Cancel {Prop:Icon} =
GetIni('Buttons','Cancel','cancel.ico',Glo:ThemeFileName)
0{Prop:Wallpaper} = GetIni('Wallpaper','Wallpaper',,Glo:ThemeFileName)
M = Upper(GetIni('Wallpaper','Wallpaper','TILED',Glo:ThemeFileName)
Case M
Of 'TILED'
  0{Prop:Tiled} = True
Of 'STRETCHED'
  0{Prop:Stretch} = True
End

etc.  This is the method I use in our wizards to save/restore
information - works like a charm.

Even if you have the images linked into the exe or a dll or whatever,
you can still use this.  Just create a program where the users can
pick the icons/images from the available resources.  

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Mon, 07 Nov 2005 00:05:22 GMT  
 How to find an image or icon in memory

Quote:

> Why not bite the bullet and get ImageEx or something similar.  Supply
> the icons/wallpapers as images, load them at runtime, provide means
> for the user to load the images and apply a color filter to them or
> something like that.  I know Charles Edmonds has been working on
> something similar.

Hi Arnor,

I am indeed working with some ideas here, but there are some items that
still need to be resolved.  There are no problems on the ImageEx side of
things - just some special considerations that I'm having to work through on
the Clarion side of things.

Quote:
>However, when dealing with images like icons,
> changing colors is NOT a simple thing to do.  If you are for example
> using the shadowed set, the shadow picks up the color of the
> background color when it's rendered into the ico format.  So if you
> change the light blue set into red, the shadow will still have a hazy
> blue shade to it and look odd on red.

I would like to reinforce this point.  You are absolutely right. This is why
there is no "icon factory" software <g>.  While the idea of using a product
like ImageEx to simply swap color bits is appealing, there is a lot more to
it than that.

Quote:
>Sue is coming out with a _lot more colors soon and it might be

easier/simpler to supply the  icons/images in a specified set of color
themes, and allow the user to switch between them, rather than mess around
with changing the images.

As you mentioned I am working on a rather innovative approach to this and I
may have something interesting to offer in that area soon.  I would be
curious to know how many people would be interested in being able to add
this ability to their applications.

Charles Edmonds

LANSRAD - "Intelligent Solutions for Universal Problems"
www.lansrad.com



Mon, 07 Nov 2005 00:48:22 GMT  
 How to find an image or icon in memory
Hi Charles,

On Wed, 21 May 2003 11:48:22 -0500, "Charles Edmonds"

Quote:

>like ImageEx to simply swap color bits is appealing, there is a lot more to
>it than that.

Exactly, however, that being said, the color shade of the whole image
could be changed within limits, say from #C0C0FF to #A9ABFF without it
having horrible effects.  Go over to #BCB500 and you would probably
get pretty bad look;)

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Mon, 07 Nov 2005 02:07:06 GMT  
 How to find an image or icon in memory

Thanks, Arnor;

Quote:
> Personally I'd rather supply them in external files, that way they can
> so easily be manipulated, moved, whatever.  BUT, you could link them
> into a dll and access them from there.

If I just put them on his disk, I should make *him* buy them. I hadn't
thought of the .dll idea though.

Quote:
> The way I would do this, is supply Theme files, each theme would be an
> ini file (or resembling one) that had information about what icons to
> use for what buttons etc:

I thought of this, too, but it seemed like way too much work. Afte reading
up on how icons are formatted, and following your other posts, it looks like
doing it this way is simpler than massaging the icon file.

What I may (and probably will) do is buy the .GIF images from Susan ... oh,
but I don't know where those are stored in memory either. Drats. But each
image control should have a handle, I bet they can be found some how with
that. I should be able to RGB filter a .GIF image dont'cha think?

Greg Scales



Mon, 07 Nov 2005 02:33:30 GMT  
 How to find an image or icon in memory
Hi Greg,

On Wed, 21 May 2003 13:33:30 -0500, "Greg Scales"

Quote:

>but I don't know where those are stored in memory either. Drats. But each
>image control should have a handle, I bet they can be found some how with
>that. I should be able to RGB filter a .GIF image dont'cha think?

If I'm not mistaken the clarion image control uses dib format only to
display the images.  I think Jim K. has written some articles on this
subject for Clarion Magazine, not sure though. I haven't done any
image work in Clarion to speak of so I can't say I have a clue!<g>

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Mon, 07 Nov 2005 04:39:44 GMT  
 How to find an image or icon in memory
I dont know that you could.  If you stored the icons on disk as separate
files, I suppose you could modify the files at run time and have your
application use the separate files on disk.  you could read those files out
of resources in your app and write them to disk at run time.  I do that a
lot for special files I want to link in but need to be on disk at run time.
The other option is to take over painting the icons on the screen yourself.
you would have to read the resource from the executable using the usual api
commands(findresource, loadresource or loadicon), get an hicon, change the
color, then take over painting yourself and paint the icon on the screen
where ever you want it using drawiconex().  When clarionnet first came out,
there was a little 16x16 icon on the window title bar.  I wrote the code for
michael to read the icon from the executable, and paint it on the screen
where he wanted it and handle refreshing it in response to wm_(nc)paint.
you'd just be adding one additional step - recoloring the hicon after
loading it.
Jim Kane


Quote:
> Hi Jim;

> Thanks for the reply! I'll try to find the article. I am used to working
at
> a very low level ... even in assembler. But in Clarion, how do you find
the
> address of an image or icon?

> Greg



> > Greg:
> > This article from msdn: Icons in Win32 by John Hornick explains the
format
> > of icons on disk and says the icons in memory (hicon) has the same
format.
> > I suppose if you studied that article very carefully, it may be possible
> but
> > quite difficult to change colors unless you frequently program at that
low
> > level are are good with pointers and addresses.
> > Jim Kane



> > > Hi Ya'll;

> > > This question is related to an earlier thread. I'm doing an app that
is
> > > "skinned" in Susan's Ace Icon/background set. I used the baby blue
> > version.
> > > The client loved the look and feel, especially the "leather"
background.
> > But
> > > he wants it in Texas A & M colors (which really pains this Texas Tech
> > fan),
> > > ie, Maroon/white/silver. In fact, he wanted to be able to adjust the
> > colors
> > > himself. I thought about taking each of the icons and images and
> > colorizing
> > > them with Paint Shop Pro & Icon Workshop ... but then I would have to
> > > include every new file name into my project, or fetch them off of
disk,
> > > which isn't practical for this app by any stretch. But ...

> > > If I could find the gif images / icons in memory, then maybe I could
> > adjust
> > > the RGB values on the fly.

> > > Does this sound possible?

> > > Greg Scales



Mon, 07 Nov 2005 07:07:32 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. ICONS, ICONS, ICONS....

2. ICONS, ICONS, ICONS

3. Icons Icons Icons

4. Color images for window icons

5. image format for app icon

6. How to use Icon or Image from another module

7. Moving Image with "hand" icon

8. Adding More ICONS to \Clarion4\Images folder

9. button with XP look and feel AND image/icon

10. Are Icons, Cursor and image free?

11. Images (not ICONS) on buttons...

12. IMAGES on buttons (not icons)...

 

 
Powered by phpBB® Forum Software