Comments (9)
Yes, it generates rIcon rez code for all the individual icons in an icon file. For gs gopher, the about window icon was given to me as an icon file so I wrote this to decompile it and then copy/pasted the output into the rez file.
If you want to generate a working icon file from a resource fork, I'm not sure if there's a direct way to do that. GS+ (The magazine) had an icon editor that could edit rIcons as well as normal icon files so you maybe that could be used to copy/paste an rIcon into a normal file. Reslin (see Richard Bennett's web page) is a GUI application that can view and export individual resources to a new file which might be what you want (but that just includes the icon bits, not all the other parts needed in an icon file). DeRez can also convert them into something that can be used with rez.
from iigs.
Okay, thanks, and which format is the icon file that you received? Which software created it, do you know? Maybe that would help so that I can verify that my file format is correct.
I remember DicEd, I think that's what it was called. I'll also check out Reslin.
Yes, I've used DeRez and it's given me an obtuse view of my icons and I'd like to move away from that to like what I see in your .rez file.
from iigs.
I just whipped up a little code to pretty-print rIcons -
https://github.com/ksherlock/iigs/blob/master/DeRezIcon.c
DeRez:
resource rIcon (0x1) {
0x0,
8,
12,
$"FF00 0000 0FFF FF0F FFF0 F0FF FF0F 00F0"
$"00FF FF0F FFFF F0FF FF0F 0F00 F0FF FF0F"
$"FFFF F0FF FF0F 0F0F F0FF FF00 0000 00FF",
$"00FF FFFF F000 00FF FFFF FF00 00FF FFFF"
$"FF00 00FF FFFF FF00 00FF FFFF FF00 00FF"
$"FFFF FF00 00FF FFFF FF00 00FF FFFF FF00"
};
DeRezIcon:
resource rIcon(1, $0000) {
$0000, // type (B/W)
8, // height
12, // width
$"ff0000000fff"
$"ff0ffff0f0ff"
$"ff0f00f000ff"
$"ff0ffffff0ff"
$"ff0f0f00f0ff"
$"ff0ffffff0ff"
$"ff0f0f0ff0ff"
$"ff00000000ff"
,
$"00fffffff000"
$"00ffffffff00"
$"00ffffffff00"
$"00ffffffff00"
$"00ffffffff00"
$"00ffffffff00"
$"00ffffffff00"
$"00ffffffff00"
}
from iigs.
Awesome! Thanks, I'll run it tonight.
from iigs.
Had to try it now, works great! 😊👏
from iigs.
This has worked out very well for me and I can actually tell what my icons are by the hex bytes. Could I convince you to extend your tool to do the same for rCursors? Or would you rather someone else extend it?
from iigs.
P.S. On line 97 of DeRezIcon.c, instead of
printf("}\n\n");
it needs to be
printf("};\n\n");
to be able to compile under rez
from iigs.
I was thinking about adding cursor support since they're so similar to icons. It has been added. However ... after playing around with the genesys cursor editor and derez I don't understand them. It looks like what should be one bit is really two consecutive bits? I'm sure it would display nicer if rez had bit strings instead as well as hex strings.
from iigs.
Great! And if it's any consolation, the output I received of my cursors from this new code looks great and I can easily tell which cursor is which by looking at the hex image map.
resource rCursor(1, $c018) {
13, // height
5, // width (20 bytes)
$"00000000000000000000"
$"0000000fc00000000000"
$"000000fffc0000000000"
$"00000fffffc000000000"
$"000f000fc003c0000000"
$"00ff000fc003fc000000"
$"0fffffffffffffc00000"
$"00ff000fc003fc000000"
$"000f000fc003c0000000"
$"00000fffffc000000000"
$"000000fffc0000000000"
$"0000000fc00000000000"
$"00000000000000000000"
,
$"0000000fc00000000000"
$"000000fffc0000000000"
$"00000fffffc000000000"
$"0000fffffffc00000000"
$"00fffffffffffc000000"
$"0fffffffffffffc00000"
$"fffffffffffffffc0000"
$"0fffffffffffffc00000"
$"00fffffffffffc000000"
$"0000fffffffc00000000"
$"00000fffffc000000000"
$"000000fffc0000000000"
$"0000000fc00000000000"
,
6, // hotspot Y
15, // hotspot X
$80 // flags (640 mode)
};
That's a 4 way pointer, and my other cursors look just as good.
from iigs.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iigs.