Comments (4)
This is correct behavior, though it's admittedly a bit confusing. Each icon family (set of ICN#, icl8, ics8, and ics# resources with the same ID) is being packaged up into each .icns file, but each .bmp file contains only one resource. In Maelstrom 1.4.3, all the ICN# and ics# resources are indeed white masks, which the .bmp files reflect - the .icns files represent what happens when those masks are combined with the icl8 and ics8 resources.
from resource_dasm.
Why is the result of combining the actual icon and the mask, a mask? Shouldn't it be the icon with a transparency?
Is there a way to work around this and dump the non-mask icons to a png/bmp?
I don't fully grasp how all these resources work yet, I appreciate your help.
from resource_dasm.
Here's how icons worked in classic Mac OS:
- Each ICN# resource contains a single monochrome image along with an alpha mask. In Maelstrom, the image parts of these resources are entirely white, but the mask parts contain the actual shape of the sprite.
- Each icl8 resource contains a single 8-bit color image, but no mask. Classic Mac OS uses the mask from the ICN# resource with the same ID as the icl8 resource when drawing the icon.
- The process is the same with ics# and ics8 resources - only the image dimensions are different.
resource_dasm does the same thing as classic Mac OS - for ICN# resources, it renders the monochrome image from the ICN# and applies the transparency mask from the ICN#. For Maelstrom, this results in a white silhouette of the sprite because that's what the ICN# actually contains. For icl8 resources, resource_dasm renders the 8-bit image, then looks up the ICN# with the same ID (if it exists) and applies the mask from that resource. If you want to extract all the sprite images with correct transparency, it should suffice to export only the icl8 resources. (It looks like Ambrosia never intended to support monochrome graphics in Maelstrom, and only added ICN# resources because it was the easiest way to draw icons from icl8 resources with transparency.)
from resource_dasm.
Thanks for the detailed answer and work around - worked great!
from resource_dasm.
Related Issues (20)
- compile error with g++ 11.2.1_p20220115 HOT 1
- Any way to group the items by resource type? HOT 6
- Encoding.hh: shifting a negative signed value is undefined HOT 1
- Format string errors HOT 2
- Black borders when decoding PICT HOT 3
- Format of Spectre Supreme "shap" resources HOT 7
- Technically, it's "PEF", not "PEFF" (Preferred Executable Format) HOT 1
- Improvement : extracting as png instead of bmp HOT 5
- compile error in Ubuntu on Pi4 ARM HOT 16
- warning: PICT rendering failed (mask region rect Rect(x1=-27892, y1=26790, x2=0, y2=256) is not same as source rect HOT 5
- Suggestion: Conditional compilation for some features HOT 4
- Easier way to convert TEXT/styl to .rtf? HOT 2
- Prebuilt binary for Linux with phosg prelinked HOT 2
- issue with Mail.app .emlx files HOT 6
- Bad CPU type in executable HOT 2
- Incorrect canvas size for some PICTs HOT 5
- Doesn't Work On Amazon Trail? HOT 2
- compile errors with g++ 13.2.1 20230826 HOT 4
- Blobbo - resource fork missing or empty HOT 6
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 resource_dasm.