Monday, March 29, 2010

REZ anyone?

Hi,



can someone give me some insights about rez? I'm trying to include some

icons in my plugin but I can't find any decent documentation for Rez. I know

how to include icons by raw data or by importing them from another resource file via their ID, but I'm looking for away to include them directly from an icon file and not from a rsrc file. Is this possible at all and could I also define some picture resources this way?



Thanks,

Marc
REZ anyone?
Building and Managing Programs in MPW (2nd edition)
REZ anyone?
Thanks a lot, I'll look into it!

To address your questions, you have many options for data inclusion. You can pull in resources from other named files (perhaps edited in ResEdit or Resorcerer), or you can represent icon or picture resource definitions in your Rez source as hexadecimal strings, as you prefer.



I'm not sure what format your ''icon'' file is, but you can also pull individual resource data from arbitrary files. See manual.

I managed to include icons as hexadecimal strings directly as well as indirectly with $$READ. However, most icons don't display correctly, I guess maybe this has to do with either the icon type (.ico) or that the icon is missing the correct pixel/display size (I guess I have to read a bit more about resources /resource forks on the mac since the whole concept is still ab bit blurry to me). Sadly I don't have Mac OS 9 available and ResEdit won't work without it (Resorcerer is way to expensive ; ) but I'll see that I can get my hands on it somehow and I'll also try some other icon formats as well.

So thanks again for the link to the documentation, that gave me a good start.

-Marc

This product didn't quite do what I wanted, but take a look at it for

you:



http://www.axialis.com/iconworkshop/



.ico is a Windows format, no good on the Mac.



Aandi Inston

Thanks Aandi - looks just like what I need!

About the format, this indeed was one of the problems, I use mac icons now ; ) But still some icons are badly distorted, this seems to happen because of the missing display/pixel data or me setting a wrong height for the entry. So I tried to get the height of the icon with

sADMIcon-%26gt;GetHeight(icon), but I get a height of 0 for every icon I try (even those that display correctly), anyone got an idea about this?

Also, is there a way to tell/force ADM to use a specific resolution for an icon? By default ADM seems to use 32x32 1 bit icons, but an 8 bit icon would be nice : )



Also, please don't get angry at me in case I'm missing something obvious or am adressing rtfm-issues, but the icons are actually the last points on my todo list and I'm currently only messing around with them during breaks doing mostly try and (much) error ; )



Thanks,

Marc

Find a copy of ResEdit or Resorcerer and make your icon suites there.
  • mask making
  • No comments:

    Post a Comment