Giter Club home page Giter Club logo

Comments (4)

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

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.

erichelgeson avatar erichelgeson commented on May 19, 2024

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.

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

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.

erichelgeson avatar erichelgeson commented on May 19, 2024

Thanks for the detailed answer and work around - worked great!

from resource_dasm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.