1 Reply Latest reply on Mar 21, 2007 6:24 PM by pcolby78

    Does Flex support 256 color displays?

    pcolby78
      Hi all,

      Does Flex / Flash officially support 256-color displays? I can't get the Image control to display any images at all when the display is set to 256 colors.

      I've tried PNG, GIF, and JPEG images with monochrome, 16 color, 256 color, and 24-bit palletes (in every combination the formats allow). They *all* work fine if the display is set to 15-bit color or higher, but *none* of them work if the display is set to 256 colors. I would have thought at the very least that the Flash player could show a monochrome image on a 256 color display :(

      Does anyone know if this is a limit in the Flex control, or the underlying Flash controls? Could I solve it by using some Flash control directly?

      FYI, this the problem exists on both machines that I have tested so far. Both using Windows 2000, with both IE7 and FF1.5.

      Any ideas? Thanks!

      Paul
        • 1. Re: Does Flex support 256 color displays?
          pcolby78 Level 1
          OK, so this definately looks like a bug in Flex / Flash when running on 256 color displays.

          Really simple Flex projects that contain nothing but images like:

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
          <mx:Image source=" http://domain/image1.gif" />
          <mx:Image source=" http://domain/image2.jpg" />
          <mx:Image source=" http://domain/image3.png" />
          </mx:Application>

          Don't show anything at all, but if you throw in a few images via a Text control such as:

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src=" http://domain/image1.gif" />
          </mx:htmlText></mx:Text>
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src=" http://domain/image2.jpg" />
          </mx:htmlText></mx:Text>
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src =" http://domain/image3.png" />
          </mx:htmlText></mx:Text>
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src=" http://domain/image1.gif" />
          </mx:htmlText></mx:Text>
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src=" http://domain/image2.jpg" />
          </mx:htmlText></mx:Text>
          <mx:Text width="450" height="75"><mx:htmlText>
          <img src=" http://domain/image3.png" />
          </mx:htmlText></mx:Text>
          <mx:Image source=" http://domain/image1.gif" />
          <mx:Image source=" http://domain/image2.jpg" />
          <mx:Image source=" http://domain/image3.png" />
          </mx:Application>

          Then all of the images will appear - all of those embedded into the Text controls, as well as those embedded into the Image controls. Note, it seems that there needs to be "significantly" more Text controls than Image controls for this to work... but I haven't really narrowed that down.

          Also, when the Text controls are not used, it seems that popping up Alert boxes cause the images to display correctly until the dialog box is dismissed, and then the Image controls disappear again!

          Finally, I've found that I can get the Image control to work reliably (so far) by itself, if I simply set the height or width to be at least one pixel less than (not greater than) the real image.

          So, for example, my image is 450 pixels wide, by 75 pixels high. So, of the following four Image controls, only the last one works!

          <mx:Image source=" http://domain/image1.gif" />
          <mx:Image width="450" height="75" source=" http://domain/image1.gif" />
          <mx:Image width="451" height="75" source=" http://domain/image1.gif" />
          <mx:Image width="449" height="75" source=" http://domain/image1.gif" />

          Once again, all of these behaviours only occur when the display is set to a 256 color mode. Everything works as expected on 15bit+ color modes.

          So, I guess I should file a bug report now?

          Paul.