Controlling format of PNG export?
Ken Ray
kray at sonsothunder.com
Wed Apr 23 12:09:00 EDT 2003
Ben,
All I could find was how to determine the number of colors in an image.
It seems like it's an engine issue, or perhaps creating an external to
do this.
Sorry I couldn't help,
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: metacard-admin at lists.runrev.com
> [mailto:metacard-admin at lists.runrev.com] On Behalf Of Ben Rubinstein
> Sent: Wednesday, April 23, 2003 8:13 AM
> To: metacard at lists.runrev.com
> Subject: Controlling format of PNG export?
>
>
> Background: an app which has to integrate with a Director
> projector; the MC (actually Rev) app generating PNG files
> with alpha channels, the Director app importing these and
> doing some further processing and display. (Unfortunately I
> lost the battle to have the entire solution coded in Rev/MC
> - but at least I am now having daily opportunities to say "I
> told you so".) An early test image worked fine, we then
> continued on separate paths.
>
> Now when we came to put the two together, the mask was no
> longer being processed correctly by Director. After some
> investigation, we found that the Rev/MC app, which had
> previously been outputting RGB+mask PNG files, was now
> outputting indexed colour + mask PNG files. The code that
> output the PNG files was unchanged; but some additional
> processing had been done on the images, to turn them into
> sepia-toned pseudo-ancient images.
>
> Evidently, the MC engine, asked to export a PNG from a 32-bit
> + mask image, is cunningly inspecting it and deciding that
> there are no more than 256 distinct colours, and therefore
> choosing to optimise the file. I've no reason to think that
> these aren't perfectly valid PNG files (PhotoShop at least
> seems to see the transparency) - it's probably Director's
> error that it's ignoring the alpha channel if the basic image
> is not RGB.
>
> I've frigged it for now by modifying the routine which does
> the sepia toning, introducing some random variations in the
> low-order bits of some pixels in the image, so that there are
> (invisibly to the human eye) more than 256 distinct colours
> in the image. But this isn't 100% guaranteed to work for all
> source images. Is there any way that I can force Rev/MC to
> output the PNG as RGB+alpha?
>
> TIA,
>
> Ben Rubinstein | Email: benr_mc at cogapp.com
> Cognitive Applications Ltd | Phone: +44 (0)1273-821600
> http://www.cogapp.com | Fax : +44 (0)1273-728866
>
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metac> ard
>
More information about the metacard
mailing list