Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to grab IconRef from a .tiff file.



On 22/08/2003 21:45, Laurence Harris wrote:

> 1) When you create the picture, you specify that it should use the alpha
> channel with
>
> GraphicsImportSetGraphicsMode( gic, graphicsModeStraightAlpha, NULL );
>
> So when SetIconFamilyData creates the initial IconFamilyHandle, it draws the
> image respecting the alpha channel.

Is it? Previously you've said that GraphicsImportSetGraphicsMode(alpha)
is ignored as far as subsequent SetIconFamilyData('PICT') is concerned.
My testing shows that it is ignored.

> Then the mask is created which basically
> replicates the alpha channel, so when the icon is drawn, the alpha channel
> is used twice, which doesn't yield the right image. I've changed it to
> create two pictures: one without the alpha for creating the icon data, and
> one *with* the alpha channel for use in creating the mask, and this yields a
> more accurate result.

If GraphicsImportSetGraphicsMode(alpha) is not really ignored as far
as subsequent SetIconFamilyData('PICT') is concerned why do we need
to manually create mask at all?

> 2) The mask has significant banding in it. I haven't solved this yet, but I
> have an idea or two I'm going to try.

What kind of banding? The fragment I send was the final step of
few iterations. Initially I was using 32 bit offscreen; that
version required the secondary gray-scale offscreen to make
final 32-bit to 8 bit conversion. Perhaps 32 bit offscreen will
provide more accurate results.

I would appreciate if you send me the image(s) that causes these
two problems.

Mike
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How to grab IconRef from a .tiff file. (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.