SetPixel()

how to use this function in java?

It's the setRGB method of BufferedImage. To create a BufferedImage from another Image, img, create a BufferedImage of the same size as img and do buffImg.getGraphics.drawImage(img, 0, 0, null);
Answer provided by Friends of the Water Cooler. Please inform forum admin via the
'Discuss the JDC Web Site' forum that off-topic threads should be supported.

Similar Messages

  • A strange one - setPixels only works against the left of the screen

    setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)My applet's split into different bits. The main game screen (which I'm animating to with pixel[]) starts in the top left hand corner...
    _consumer.setPixels(0,0,ScreenWidth,ScreenHeight,_model,(int[])pixel,0,ScreenWidth);ScreenWidth and ScreenHeight are the dimensions of the main game screen. There's a stats area to the right, but that's just done with Graphics.drawString, etc..
    Anyway, I want the statbox to go on the left, so I need the main screen to get drawn on the right. No problem, right?
    _consumer.setPixels(StatboxWidth,0,ScreenWidth,ScreenHeight,_model,(int[])pixel,0,ScreenWidth);
    java.lang.ArrayIndexOutOfBoundsException
            at java.lang.System.arraycopy(Native Method)
            at sun.awt.image.IntegerInterleavedRaster.setDataElements(IntegerInterleavedRaster.java:359)
            at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:484)
            at Strib.update_consumer(Strib.java:197)
            at Strib.paint(Strib.java:99)
            at Strib.run(Strib.java:187)
            at java.lang.Thread.run(Thread.java:484)The only way i can increase x at all is by decreasing w by the same amount, giving me a smaller main screen. I've tried changing the offset up or down just in case but that doesn't help. What am I missing?
    Thanks for your help!

    you only call consumer.setPixels() once at the end of the frame.
    all the drawing goes into your pixel[].
    the width in setPixels() is being added to the x. since the width is the max value its overflowing.
    public void run()
       while (running)
          render();
          update(pixels);
          try
             thread.sleep(threadDelay);
          } catch (InterruptedException e)
    public void render()
       java.util.Arrays.fill(pixels, 0x000000); // fill the screen wiht black 
       writePixel(100,100,0xFF0000); // put a red pixle at 100-100
    public synchronized void update(int[] pixels)
       if (consumer != null)
       // copy integer pixel data to image consumer
       consumer.setPixels(0, 0, width, height, model, pixels, 0, width);
       // notify image consumer that the frame is done
       consumer.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
       paint();
    private synchronized void paint()
       // draw the back buffer image onto the screen
       getGraphics().drawImage(image, 0, 0, width, height, null);
    public final void writePixel(int x, int y, int color)
       int i = width * y + x;
       if (i >= 0 && i < size)// size = screen width * height
          pixels[i] = color;
    }

  • BitmapData, get/setPixel on scaled data. Real get/setPixel exist?

    Ok... I've been staring at this all day long, so the answer might be screaming at me and I just don't see it....
    Summary:  I need an Image to "show through" to the background, cutting through any other images that may be in it's way -- but not images on top of it (only below).
    [Edit: Is there an on-screen get/setPixel alternative?  As it seems BitmapData's only let's you edit the raw (un-transformed) data.  I'd like to just write the actual pixels on the screen.  There has to be something that keeps track of all the pixels when the item is scaled.  ]
    A picture is worth a thousand words, so I whipped up some examples in PS:
    Imagine this is the app that consists of four Images.  The background (skyline), and the three layers stacked on top.  The smiley is the backmost, the heart is the frontmost, and the snowman is in the middle.
    Notice how the snowman knocks out the smiley, but not the heart.  I'm achieving this by painting BitmapData with the background pixels wherever the clipart is not transparent. Also, if there was an additional layer (or any number of layers) "behind" the smiley, it would also be "knocked out" by the snowman.  This is why I'm pretty sure I have to do it this way with the BitmapData and manual get/setPixel. (Open to suggestions?)
    This method does work perfectly... as long as the snowman isn't scaled or rotated.
    Here, the snowman has been scaled up and rotated.  The problem is that the background image pixels get scaled up right along with the art. The outline of the snowman should only be visible when it knocks out the smiley, but instead you can see it clearly because the background pixels do not match, and are actually scaled/rotated along with the snowman.
    This is how it should look even with the scaling and rotating.
    Here is the code that is doing the "reverse mask":
    this == Image
    var thisWidth:uint      = this.width;
    var thisHeight:uint      = this.height;
    var targetWidth:uint      = this.x + thisWidth;
    var targetHeight:uint      = this.y + thisHeight;
    var data:BitmapData = Bitmap(backgroundImage.content).bitmapData;
    var newdata:BitmapData = new BitmapData(thisWidth, thisHeight, true, 0);
    newdata.draw(this);
    this.content.visible = false;
    newdata.lock();
    for ( var x:uint = this.x, drawX:uint=0; x < targetWidth; x++,drawX++ ) {
         for ( var y:uint = this.y, drawY:uint=0; y < targetHeight; y++,drawY++ ) {
              color = data.getPixel(x, y);
              newdata.setPixel( drawX, drawY, color );
    newdata.unlock();
    this.addChild( new Bitmap(newdata) );
    Anyone have any suggestions?
    My current direction is....
    1)  Is there a way to rasterize a transformed layer?  By that I mean make the current transformation permanent.  So, if an image was scale(1.5, 2)  you could function rasterize(image) and it would still stay scaled, but have scale(1, 1)
    2) Do the calculations to figure out the inverse matrix and apply it to the bitmapdata before adding it as a child of the image.  This way, when the background pixels get scaled/rotated, they will end up in the right place.
    3) Give up, quit my job, buy a sailboat and a lifetime supply of rum.

    Winston, don't know how I missed this earlier, but in case you're still looking for some kind of insight, here's what I would suggest:
    Keep your movies as .mov files, do not use .mp4
    For 4:3 moves, use 768x576 or 720x540 as your size
    For 16:9 movies, resize your movies to 1024x576 or 720x404
    (Exactly what you use is more about how large you want your file sizes to be)
    I know you've attempted very similar steps under the MPEG-4 options, but have you tried this:
    Open Movie in QuickTime Pro
    Press Command-E to bring up the Export dialog
    Under Export: leave as Movie To QuickTime Movie but press the Options... buttons
    In the Video pane, select the Settings... button, then set:
       Compression Type: H.264
       Frame Rate: Current
       Key Frames: Automatic
       Frame Reordering should be checked (this is crucial)
       Data Rate: Restrict to 3500 kbits/sec
       Optimized for Download
       Under Encoding, make sure Best Quality (Multi-Pass) is selected
       ... then click OK to exit this Compression Settings dialog
    Now, back in the Movie Settings dialog, select Size and adjust that accordingly. (If you're using QT 7.1 or later, you can select whether or not you'd like to Deinterlace your video as well in this dialog. If you're restricting your use of these files to your computer via Front Row, you just might want to deinterlace DV-sourced material.) Then click OK.
    Back in the Movie Settings dialog, deselect the Prepare for Internet Streaming option, then click OK to jump back to the QT Export dialog
    Export your file (this is not a speedy process)
    Or were you doing .mp4 files because .mov files weren't working out for you?
    Dual 1.42 G4, 2GB RAM, 9800 Pro, 20" Cinema;   Mac OS X (10.4.6)   Final Cut Studio 5.1

  • SetPixel in flash using xml....?

    Hi ,
    I have tried this in flash i got the result but now i am trying to change the color of the bitmap using setpixel values using xml.
    First i am creating a new bitmap and then i have a button when i click on the button the pixel values or the color of the bitmap should be changed.
    script for creating a bitmap:
    import flash.display.BitmapData;
    var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCFF);
    var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
    mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
    Script on the button:
    on (release) {
        for (var x:Number = 0; x<50; x++) {
            for (var y:Number = 0; y<10; y++) {
                myBitmapData.setPixel32(x, y, 0x11FF00);
            for (var y:Number = 11; y<20; y++) {
                myBitmapData.setPixel32(x, y, 0xCCFF00);
            for (var y:Number = 21; y<50; y++) {
                myBitmapData.setPixel32(x, y, 0x11FFEE);
    Now i just want to change the color of the bitmap using setpixel using xml and calling the xml into flash.

    Hi kglad,
    Well i am confused, I am searching that how would be the attributes for setpixel in xml file?How can we assign setpixels from xml.
    for example when we load a dynamic data into flash which has three dynamic texts "name_txt,count_txt,type_txt" and when we click on the button "rb_btn" xml data will be loaded into the three dynamic text fields.  So below is my code in xml and in flash.
    script in xml:
    <?xml version="1.0" encoding="utf-8"?>
    <Books>
    <Book name="Harry Potter" count="1" type="Asian"/>
    </Books>
    script on first frame:
    import flash.display.BitmapData;
    var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCFF);
    var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
    mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    rb_btn.onRelease = function(success) {
            var bookName = myXML.firstChild.childNodes[0].attributes.name;
            var bookCount = myXML.firstChild.childNodes[0].attributes.count;
            var bookType = myXML.firstChild.childNodes[0].attributes.type;
            name_txt.text = bookName;
            count_txt.text = bookCount;
            type_txt.text = bookType;
    myXML.load("colors.xml");
    So we are assigning a name in xml called "name="Harry Potter" "we are calling it flash as
    "var bookName = myXML.firstChild.childNodes[0].attributes.name;" And my question is how or what is the process to write a code for setPixel in xml and calling  it into flash.

  • Error 2030 end of file was encountered: setpixels

    Hi, I'm trying to understand what is wrong with my code that I get this error.
    var rect: Rectangle = new Rectangle(0,0,newText.width, newText.height);
    var bitmapData: BitmapData = new BitmapData(newText.width, newText.height);
    bitmapData.draw(newText);
    var bitmap: Bitmap = new Bitmap(bitmapData);
    var jpgEncoder: JPGEncoder = new JPGEncoder(90);
    var byteArray: ByteArray = jpgEncoder.encode(bitmapData);
    bitmapData.getPixels(rect);
    //trace(" this bitmapData", byteArray);
    //byteArray = PNGEncoder.encode(bitmapData);
    var mySharedObject: SharedObject = SharedObject.getLocal("republicofcode");
    mySharedObject.data.vwdinfo = byteArray;
    mySharedObject.flush();
    trace("this ughg", mySharedObject.data.vwdinfo);
    // var mySharedObject: SharedObject = SharedObject.getLocal("republicofcode");
    byteArray.position = 0;
    trace(byteArray.position);
    bitmapData.setPixels(rect,byteArray); // <-------------- this is the line that throws the error
    var image: Bitmap = new Bitmap(bitmapData, "auto", true);
    addChild(image);

    is that an experiment or are you trying to accomplish something by ending up where you start?
    and any encoding option (like jpgencoder) is likely to be problematic because of compression used to minimize the bytearray size.  ie, you're going to hit an end of file error with any compression.
    you should manually copy using getPixels, not an encoder:
    var rect: Rectangle = new Rectangle(0,0,newText.width, newText.height);
    var bitmapData: BitmapData = new BitmapData(rect.width, rect.height);
    bitmapData.draw(newText);
    var bitmap: Bitmap = new Bitmap(bitmapData);
    var byteArray: ByteArray = bitmapData.getPixels(rect);
    byteArray.position = 0;
    bitmapData.setPixels(rect,byteArray); // <-------------- this is the line that throws the error
    var image: Bitmap = new Bitmap(bitmapData, "auto", true);
    addChild(image);

  • Problem using byte indexed pixel format in setPixels method of PixelWriter

    I try to construct a byte array and set it to a WritableImage using PixelWriter's setPixels method.
    If I use an RGB pixel format, it works. If I use a byte-indexed pixel format, I get an NPE.
    The stride etc should be fine if I'm not mistaken.
    java.lang.NullPointerException
         at com.sun.javafx.image.impl.BaseByteToByteConverter.<init>(BaseByteToByteConverter.java:45)
         at com.sun.javafx.image.impl.General$ByteToByteGeneralConverter.<init>(General.java:69)
         at com.sun.javafx.image.impl.General.create(General.java:44)
         at com.sun.javafx.image.PixelUtils.getB2BConverter(PixelUtils.java:223)
         at com.sun.prism.Image$ByteAccess.setPixels(Image.java:770)
         at com.sun.prism.Image.setPixels(Image.java:606)
         at javafx.scene.image.WritableImage$2.setPixels(WritableImage.java:199)
    Short, self-contained example here:
    import java.nio.ByteBuffer;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.image.ImageView;
    import javafx.scene.image.PixelFormat;
    import javafx.scene.image.WritableImage;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    public class IndexedColorTestApp extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage primaryStage) {
            BorderPane borderPane = new BorderPane();
            Scene scene = new Scene(borderPane, 600, 1100);
            primaryStage.setScene(scene);
            ImageView imageView = new ImageView();
            borderPane.setCenter(imageView);
            primaryStage.show();
            int imageWidth = 200;
            int imageHeight = 200;
            WritableImage writableImage = new WritableImage(imageWidth, imageHeight);
            // this works
            byte[] rgbBytePixels = new byte[imageWidth * imageHeight * 3];
            PixelFormat<ByteBuffer> byteRgbFormat = PixelFormat.getByteRgbInstance();
            writableImage.getPixelWriter().setPixels(0, 0, imageWidth, imageHeight,
                                                     byteRgbFormat, rgbBytePixels, 0, imageWidth * 3);
            imageView.setImage(writableImage);
            // this throws an NPE in setPixels()
            byte[] indexedBytePixels = new byte[imageWidth * imageHeight];
            int[] colorPalette = new int[256];
            PixelFormat<ByteBuffer> byteIndexedFormat = PixelFormat.createByteIndexedInstance(colorPalette);
            writableImage.getPixelWriter().setPixels(0, 0, imageWidth, imageHeight,
                                                     byteIndexedFormat, indexedBytePixels, 0, imageWidth);
            imageView.setImage(writableImage);
    }If there's no solution, maybe someone knows a workaround? We chose to use indexed format because of data size / performance reasons.
    Edited by: Andipa on 01.03.2013 10:52

    You have found a platform bug, file it against the Runtime project at => http://javafx-jira.kenai.com with your sample code and a link back to this forum question.
    Byte indexed pixel formats seem like a feature which was never completely (or perhaps even hardly at all) implemented to me.
    The PixelFormat type your failed case is using is (PixelFormat.Type.BYTE_INDEXED):
    PixelFormat<ByteBuffer> byteIndexedFormat = PixelFormat.createByteIndexedInstance(colorPalette);
    System.out.println(byteIndexedFormat.getType());These are the valid PixelFormat types =>
    http://docs.oracle.com/javafx/2/api/javafx/scene/image/PixelFormat.Type.html
    BYTE_BGRA
    The pixels are stored in adjacent bytes with the non-premultiplied components stored in order of increasing index: blue, green, red, alpha.
    BYTE_BGRA_PRE
    The pixels are stored in adjacent bytes with the premultiplied components stored in order of increasing index: blue, green, red, alpha.
    BYTE_INDEXED
    The pixel colors are referenced by byte indices stored in the pixel array, with the byte interpreted as an unsigned index into a list of colors provided by the PixelFormat object.
    BYTE_RGB
    The opaque pixels are stored in adjacent bytes with the color components stored in order of increasing index: red, green, blue.
    INT_ARGB
    The pixels are stored in 32-bit integers with the non-premultiplied components stored in order, from MSb to LSb: alpha, red, green, blue.
    INT_ARGB_PRE
    The pixels are stored in 32-bit integers with the premultiplied components stored in order, from MSb to LSb: alpha, red, green, blue.As the native pixel format for a WritableImage is not the same as the pixel format you are using, the JavaFX platform needs to do a conversion by reading the pixels in one format and writing them in another format. To do this it must be able to determine a PixelGetter for your PixelFormat (the PixelGetter is an internal thing, not public API).
    And here is the source the determines the PixelGetter for a given PixelFormat type:
    http://hg.openjdk.java.net/openjfx/8/master/rt/file/06afa65a1aa3/javafx-ui-common/src/com/sun/javafx/image/PixelUtils.java
    119     public static <T extends Buffer> PixelGetter<T> getGetter(PixelFormat<T> pf) {
    120         switch (pf.getType()) {
    121             case BYTE_BGRA:
    122                 return (PixelGetter<T>) ByteBgra.getter;
    123             case BYTE_BGRA_PRE:
    124                 return (PixelGetter<T>) ByteBgraPre.getter;
    125             case INT_ARGB:
    126                 return (PixelGetter<T>) IntArgb.getter;
    127             case INT_ARGB_PRE:
    128                 return (PixelGetter<T>) IntArgbPre.getter;
    129             case BYTE_RGB:
    130                 return (PixelGetter<T>) ByteRgb.getter;
    131         }
    132         return null;
    133     }As you can see, the BYTE_INDEXED format is not handled and null is returned instead . . . this is the source of your NullPointerException.

  • Class WritableRaster setPixels

    i read the explanations give in the docs for setPixels in WritableRaster class
    i could not understand iArray?
    what is the use of it?
    public void setPixels(int x,
                          int y,
                          int w,
                          int h,
                          int[] iArray)this is wat given in doc :
    w - Width of the pixel rectangle.
    h - Height of the pixel rectangle.
    iArray - The input int pixel array.

    to set a pixel its enough if we have the location of that pixel (x,y)
    here a rectangle of size (w *h) located  at x,y
    what does this mean : "Sets all samples for a rectangle of pixels from an int array containing one sample per array element."
    http://java.sun.com/javase/6/docs/api/java/awt/image/WritableRaster.html#setPixels(int,%20int,%20int,%20int,%20int[])

  • BitmapData setpixel performance and lock/unlock bug

    I'm having problems with how slow setting pixels in a bitmap is. Multiple BitmapData SetPixel (16+) calls or single SetPixels/Vector are all a bit slow on iOS for a screen-sized image.
    I tried using lock, unlock around a number of setPixels but it only works in CPU mode - there is a bug in GPU mode it seems - the bitmapdata is not updated unless you do a setpixel outside of the lock/unlock region which is very strange.  CPU mode is ok but always slower
    Can anyone confirm the bug and also share any tips for speeding up bitmapdata SetPixels where you only want to update a low percentage of the pixels each frame?

    Here the same discussion for iPods...
    https://discussions.apple.com/message/23043769#23043769
    I had the same problem and did a reboot, for me that solved the problem.
    How to reboot your iPhone:
    1. Hold down the Home button (that’s the big button in the lower front) and the Sleep / Wake button (that’s the little button on the top right) down.
    2. Keep holding until you see the screen go black and then the Apple logo appear.
    3. Voila! Your iPhone has been rebooted. Resume your blissful life and forget that anything bad happened with your iPhone.
    Message was edited by: rhvh

  • GIF decoding

    This works on WinXP but not Linux. Why? It takes the first frame of an animated gif and writes a thumbnail.
                GifDecoder d = new GifDecoder();    
                try {
                    fis = new FileInputStream(file);          
                    bis = new BufferedInputStream(fis);            
                    log.debug("reading gif");
                    d.read(bis);
                    log.debug("reading framecount");
                    int n = d.getFrameCount();
                    log.debug("read framecount" + n);
                    for (int i = 0; i < 1; i++) {
                        BufferedImage frame = d.getFrame(i);  // frame i
                        int t = d.getDelay(i);  // display duration of frame in milliseconds
                        log.debug("resizing frame");
                            File gifoutputfile = new File("gif" + i + outputthumbFilename);
                        BufferedImage bdest = new BufferedImage(60, 60, BufferedImage.TYPE_INT_RGB);
                        Graphics2D g = bdest.createGraphics();
                        AffineTransform at = AffineTransform.getScaleInstance((double) 60 / frame.getWidth(), (double) 60 / frame.getHeight());
                        g.drawRenderedImage(frame, at);
                        ImageIO.setUseCache(false);
                        ImageIO.write(bdest, "GIF", new File(outputthumbFilename));           
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
    import java.awt.AlphaComposite;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBufferInt;
    import java.io.BufferedInputStream;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URL;
    import java.util.ArrayList;
    * Class GifDecoder - Decodes a GIF file into one or more frames. <br>
    * <pre>
    *  Example:
    *     GifDecoder d = new GifDecoder();
    *     d.read("sample.gif");
    *     int n = d.getFrameCount();
    *     for (int i = 0; i < n; i++) {
    *        BufferedImage frame = d.getFrame(i);  // frame i
    *        int t = d.getDelay(i);  // display duration of frame in milliseconds
    *        // do something with frame
    * </pre>
    * No copyright asserted on the source code of this class. May be used for any
    * purpose, however, refer to the Unisys LZW patent for any additional
    * restrictions. Please forward any corrections to [email protected].
    * @author Kevin Weiner, FM Software; LZW decoder adapted from John Cristy's
    *         ImageMagick.
    * @version 1.03 November 2003
    public class GifDecoder {
       * File read status: No errors.
      public static final int STATUS_OK = 0;
       * File read status: Error decoding file (may be partially decoded)
      public static final int STATUS_FORMAT_ERROR = 1;
       * File read status: Unable to open source.
      public static final int STATUS_OPEN_ERROR = 2;
      protected BufferedInputStream in;
      protected int status;
      protected int width; // full image width
      protected int height; // full image height
      protected boolean gctFlag; // global color table used
      protected int gctSize; // size of global color table
      protected int loopCount = 1; // iterations; 0 = repeat forever
      protected int[] gct; // global color table
      protected int[] lct; // local color table
      protected int[] act; // active color table
      protected int bgIndex; // background color index
      protected int bgColor; // background color
      protected int lastBgColor; // previous bg color
      protected int pixelAspect; // pixel aspect ratio
      protected boolean lctFlag; // local color table flag
      protected boolean interlace; // interlace flag
      protected int lctSize; // local color table size
      protected int ix, iy, iw, ih; // current image rectangle
      protected Rectangle lastRect; // last image rect
      protected BufferedImage image; // current frame
      protected BufferedImage lastImage; // previous frame
      protected byte[] block = new byte[256]; // current data block
      protected int blockSize = 0; // block size
      // last graphic control extension info
      protected int dispose = 0;
      // 0=no action; 1=leave in place; 2=restore to bg; 3=restore to prev
      protected int lastDispose = 0;
      protected boolean transparency = false; // use transparent color
      protected int delay = 0; // delay in milliseconds
      protected int transIndex; // transparent color index
      protected static final int MaxStackSize = 4096;
      // max decoder pixel stack size
      // LZW decoder working arrays
      protected short[] prefix;
      protected byte[] suffix;
      protected byte[] pixelStack;
      protected byte[] pixels;
      protected ArrayList frames; // frames read from current file
      protected int frameCount;
      static class GifFrame {
        public GifFrame(BufferedImage im, int del) {
          image = im;
          delay = del;
        public BufferedImage image;
        public int delay;
       * Gets display duration for specified frame.
       * @param n
       *          int index of frame
       * @return delay in milliseconds
      public int getDelay(int n) {
        delay = -1;
        if ((n >= 0) && (n < frameCount)) {
          delay = ((GifFrame) frames.get(n)).delay;
        return delay;
       * Gets the number of frames read from file.
       * @return frame count
      public int getFrameCount() {
        return frameCount;
       * Gets the first (or only) image read.
       * @return BufferedImage containing first frame, or null if none.
      public BufferedImage getImage() {
        return getFrame(0);
       * Gets the "Netscape" iteration count, if any. A count of 0 means repeat
       * indefinitiely.
       * @return iteration count if one was specified, else 1.
      public int getLoopCount() {
        return loopCount;
       * Creates new frame image from current data (and previous frames as specified
       * by their disposition codes).
      protected void setPixels() {
        // expose destination image's pixels as int array
        int[] dest = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
        // fill in starting image contents based on last image's dispose code
        if (lastDispose > 0) {
          if (lastDispose == 3) {
            // use image before last
            int n = frameCount - 2;
            if (n > 0) {
              lastImage = getFrame(n - 1);
            } else {
              lastImage = null;
          if (lastImage != null) {
            int[] prev = ((DataBufferInt) lastImage.getRaster().getDataBuffer()).getData();
            System.arraycopy(prev, 0, dest, 0, width * height);
            // copy pixels
            if (lastDispose == 2) {
              // fill last image rect area with background color
              Graphics2D g = image.createGraphics();
              Color c = null;
              if (transparency) {
                c = new Color(0, 0, 0, 0); // assume background is transparent
              } else {
                c = new Color(lastBgColor); // use given background color
              g.setColor(c);
              g.setComposite(AlphaComposite.Src); // replace area
              g.fill(lastRect);
              g.dispose();
        // copy each source line to the appropriate place in the destination
        int pass = 1;
        int inc = 8;
        int iline = 0;
        for (int i = 0; i < ih; i++) {
          int line = i;
          if (interlace) {
            if (iline >= ih) {
              pass++;
              switch (pass) {
              case 2:
                iline = 4;
                break;
              case 3:
                iline = 2;
                inc = 4;
                break;
              case 4:
                iline = 1;
                inc = 2;
            line = iline;
            iline += inc;
          line += iy;
          if (line < height) {
            int k = line * width;
            int dx = k + ix; // start of line in dest
            int dlim = dx + iw; // end of dest line
            if ((k + width) < dlim) {
              dlim = k + width; // past dest edge
            int sx = i * iw; // start of line in source
            while (dx < dlim) {
              // map color and insert in destination
              int index = ((int) pixels[sx++]) & 0xff;
              int c = act[index];
              if (c != 0) {
                dest[dx] = c;
              dx++;
       * Gets the image contents of frame n.
       * @return BufferedImage representation of frame, or null if n is invalid.
      public BufferedImage getFrame(int n) {
        BufferedImage im = null;
        if ((n >= 0) && (n < frameCount)) {
          im = ((GifFrame) frames.get(n)).image;
        return im;
       * Gets image size.
       * @return GIF image dimensions
      public Dimension getFrameSize() {
        return new Dimension(width, height);
       * Reads GIF image from stream
       * @param BufferedInputStream
       *          containing GIF file.
       * @return read status code (0 = no errors)
      public int read(BufferedInputStream is) {
        init();
        if (is != null) {
          in = is;
          readHeader();
          if (!err()) {
            readContents();
            if (frameCount < 0) {
              status = STATUS_FORMAT_ERROR;
        } else {
          status = STATUS_OPEN_ERROR;
        try {
          is.close();
        } catch (IOException e) {
        return status;
       * Reads GIF image from stream
       * @param InputStream
       *          containing GIF file.
       * @return read status code (0 = no errors)
      public int read(InputStream is) {
        init();
        if (is != null) {
          if (!(is instanceof BufferedInputStream))
            is = new BufferedInputStream(is);
          in = (BufferedInputStream) is;
          readHeader();
          if (!err()) {
            readContents();
            if (frameCount < 0) {
              status = STATUS_FORMAT_ERROR;
        } else {
          status = STATUS_OPEN_ERROR;
        try {
          is.close();
        } catch (IOException e) {
        return status;
       * Reads GIF file from specified file/URL source (URL assumed if name contains
       * ":/" or "file:")
       * @param name
       *          String containing source
       * @return read status code (0 = no errors)
      public int read(String name) {
        status = STATUS_OK;
        try {
          name = name.trim().toLowerCase();
          if ((name.indexOf("file:") >= 0) || (name.indexOf(":/") > 0)) {
            URL url = new URL(name);
            in = new BufferedInputStream(url.openStream());
          } else {
            in = new BufferedInputStream(new FileInputStream(name));
          status = read(in);
        } catch (IOException e) {
          status = STATUS_OPEN_ERROR;
        return status;
       * Decodes LZW image data into pixel array. Adapted from John Cristy's
       * ImageMagick.
      protected void decodeImageData() {
        int NullCode = -1;
        int npix = iw * ih;
        int available, clear, code_mask, code_size, end_of_information, in_code, old_code, bits, code, count, i, datum, data_size, first, top, bi, pi;
        if ((pixels == null) || (pixels.length < npix)) {
          pixels = new byte[npix]; // allocate new pixel array
        if (prefix == null)
          prefix = new short[MaxStackSize];
        if (suffix == null)
          suffix = new byte[MaxStackSize];
        if (pixelStack == null)
          pixelStack = new byte[MaxStackSize + 1];
        // Initialize GIF data stream decoder.
        data_size = read();
        clear = 1 << data_size;
        end_of_information = clear + 1;
        available = clear + 2;
        old_code = NullCode;
        code_size = data_size + 1;
        code_mask = (1 << code_size) - 1;
        for (code = 0; code < clear; code++) {
          prefix[code] = 0;
          suffix[code] = (byte) code;
        // Decode GIF pixel stream.
        datum = bits = count = first = top = pi = bi = 0;
        for (i = 0; i < npix;) {
          if (top == 0) {
            if (bits < code_size) {
              // Load bytes until there are enough bits for a code.
              if (count == 0) {
                // Read a new data block.
                count = readBlock();
                if (count <= 0)
                  break;
                bi = 0;
              datum += (((int) block[bi]) & 0xff) << bits;
              bits += 8;
              bi++;
              count--;
              continue;
            // Get the next code.
            code = datum & code_mask;
            datum >>= code_size;
            bits -= code_size;
            // Interpret the code
            if ((code > available) || (code == end_of_information))
              break;
            if (code == clear) {
              // Reset decoder.
              code_size = data_size + 1;
              code_mask = (1 << code_size) - 1;
              available = clear + 2;
              old_code = NullCode;
              continue;
            if (old_code == NullCode) {
              pixelStack[top++] = suffix[code];
              old_code = code;
              first = code;
              continue;
            in_code = code;
            if (code == available) {
              pixelStack[top++] = (byte) first;
              code = old_code;
            while (code > clear) {
              pixelStack[top++] = suffix[code];
              code = prefix[code];
            first = ((int) suffix[code]) & 0xff;
            // Add a new string to the string table,
            if (available >= MaxStackSize)
              break;
            pixelStack[top++] = (byte) first;
            prefix[available] = (short) old_code;
            suffix[available] = (byte) first;
            available++;
            if (((available & code_mask) == 0) && (available < MaxStackSize)) {
              code_size++;
              code_mask += available;
            old_code = in_code;
          // Pop a pixel off the pixel stack.
          top--;
          pixels[pi++] = pixelStack[top];
          i++;
        for (i = pi; i < npix; i++) {
          pixels[i] = 0; // clear missing pixels
       * Returns true if an error was encountered during reading/decoding
      protected boolean err() {
        return status != STATUS_OK;
       * Initializes or re-initializes reader
      protected void init() {
        status = STATUS_OK;
        frameCount = 0;
        frames = new ArrayList();
        gct = null;
        lct = null;
       * Reads a single byte from the input stream.
      protected int read() {
        int curByte = 0;
        try {
          curByte = in.read();
        } catch (IOException e) {
          status = STATUS_FORMAT_ERROR;
        return curByte;
       * Reads next variable length block from input.
       * @return number of bytes stored in "buffer"
      protected int readBlock() {
        blockSize = read();
        int n = 0;
        if (blockSize > 0) {
          try {
            int count = 0;
            while (n < blockSize) {
              count = in.read(block, n, blockSize - n);
              if (count == -1)
                break;
              n += count;
          } catch (IOException e) {
          if (n < blockSize) {
            status = STATUS_FORMAT_ERROR;
        return n;
       * Reads color table as 256 RGB integer values
       * @param ncolors
       *          int number of colors to read
       * @return int array containing 256 colors (packed ARGB with full alpha)
      protected int[] readColorTable(int ncolors) {
        int nbytes = 3 * ncolors;
        int[] tab = null;
        byte[] c = new byte[nbytes];
        int n = 0;
        try {
          n = in.read(c);
        } catch (IOException e) {
        if (n < nbytes) {
          status = STATUS_FORMAT_ERROR;
        } else {
          tab = new int[256]; // max size to avoid bounds checks
          int i = 0;
          int j = 0;
          while (i < ncolors) {
            int r = ((int) c[j++]) & 0xff;
            int g = ((int) c[j++]) & 0xff;
            int b = ((int) c[j++]) & 0xff;
            tab[i++] = 0xff000000 | (r << 16) | (g << 8) | b;
        return tab;
       * Main file parser. Reads GIF content blocks.
      protected void readContents() {
        // read GIF file content blocks
        boolean done = false;
        while (!(done || err())) {
          int code = read();
          switch (code) {
          case 0x2C: // image separator
            readImage();
            break;
          case 0x21: // extension
            code = read();
            switch (code) {
            case 0xf9: // graphics control extension
              readGraphicControlExt();
              break;
            case 0xff: // application extension
              readBlock();
              String app = "";
              for (int i = 0; i < 11; i++) {
                app += (char) block;
    if (app.equals("NETSCAPE2.0")) {
    readNetscapeExt();
    } else
    skip(); // don't care
    break;
    default: // uninteresting extension
    skip();
    break;
    case 0x3b: // terminator
    done = true;
    break;
    case 0x00: // bad byte, but keep going and see what happens
    break;
    default:
    status = STATUS_FORMAT_ERROR;
    * Reads Graphics Control Extension values
    protected void readGraphicControlExt() {
    read(); // block size
    int packed = read(); // packed fields
    dispose = (packed & 0x1c) >> 2; // disposal method
    if (dispose == 0) {
    dispose = 1; // elect to keep old image if discretionary
    transparency = (packed & 1) != 0;
    delay = readShort() * 10; // delay in milliseconds
    transIndex = read(); // transparent color index
    read(); // block terminator
    * Reads GIF file header information.
    protected void readHeader() {
    String id = "";
    for (int i = 0; i < 6; i++) {
    id += (char) read();
    if (!id.startsWith("GIF")) {
    status = STATUS_FORMAT_ERROR;
    return;
    readLSD();
    if (gctFlag && !err()) {
    gct = readColorTable(gctSize);
    bgColor = gct[bgIndex];
    * Reads next frame image
    protected void readImage() {
    ix = readShort(); // (sub)image position & size
    iy = readShort();
    iw = readShort();
    ih = readShort();
    int packed = read();
    lctFlag = (packed & 0x80) != 0; // 1 - local color table flag
    interlace = (packed & 0x40) != 0; // 2 - interlace flag
    // 3 - sort flag
    // 4-5 - reserved
    lctSize = 2 << (packed & 7); // 6-8 - local color table size
    if (lctFlag) {
    lct = readColorTable(lctSize); // read table
    act = lct; // make local table active
    } else {
    act = gct; // make global table active
    if (bgIndex == transIndex)
    bgColor = 0;
    int save = 0;
    if (transparency) {
    save = act[transIndex];
    act[transIndex] = 0; // set transparent color if specified
    if (act == null) {
    status = STATUS_FORMAT_ERROR; // no color table defined
    if (err())
    return;
    decodeImageData(); // decode pixel data
    skip();
    if (err())
    return;
    frameCount++;
    // create new image to receive frame data
    image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB_PRE);
    setPixels(); // transfer pixel data to image
    frames.add(new GifFrame(image, delay)); // add image to frame list
    if (transparency) {
    act[transIndex] = save;
    resetFrame();
    * Reads Logical Screen Descriptor
    protected void readLSD() {
    // logical screen size
    width = readShort();
    height = readShort();
    // packed fields
    int packed = read();
    gctFlag = (packed & 0x80) != 0; // 1 : global color table flag
    // 2-4 : color resolution
    // 5 : gct sort flag
    gctSize = 2 << (packed & 7); // 6-8 : gct size
    bgIndex = read(); // background color index
    pixelAspect = read(); // pixel aspect ratio
    * Reads Netscape extenstion to obtain iteration count
    protected void readNetscapeExt() {
    do {
    readBlock();
    if (block[0] == 1) {
    // loop count sub-block
    int b1 = ((int) block[1]) & 0xff;
    int b2 = ((int) block[2]) & 0xff;
    loopCount = (b2 << 8) | b1;
    } while ((blockSize > 0) && !err());
    * Reads next 16-bit value, LSB first
    protected int readShort() {
    // read 16-bit value, LSB first
    return read() | (read() << 8);
    * Resets frame state for reading next image.
    protected void resetFrame() {
    lastDispose = dispose;
    lastRect = new Rectangle(ix, iy, iw, ih);
    lastImage = image;
    lastBgColor = bgColor;
    int dispose = 0;
    boolean transparency = false;
    int delay = 0;
    lct = null;
    * Skips variable length blocks up to and including next zero length block.
    protected void skip() {
    do {
    readBlock();
    } while ((blockSize > 0) && !err());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

    Niklas wrote:
    This works on WinXP but not Linux. Why? Please don't just post reams of code without providing more context and information.
    How is it failing on Linux? Wrong results? What are they? Error messages? What do they say? You need to give us some place to start looking.

  • Adode Creative Suite 3 Crashing OSX 10.9.1

    I've had Adobe Creative Suite 3 for awhile now (I mainly use Photoshop, Dreamweaver and Illustrator).  And nearly every day, one of my programs crashes while I'm using it.  I've gotten in a habit of saving often to prevent losing anything, but it's just extremely frustrating.  I've got 8GB of RAM but it seems like i never have more than 2 or 3 of it available, even when i'm just running one or two basic programs, so maybe that's part of the problem??
    Originally I installed CS3 on my MacBook Pro when I still had Snow Leopard.  Since then, I've upgraded to Mountain Lion and now I'm on Mavericks (I skipped Lion).  And I've never re-installed CS3.
    Here is my most recent crash log from Dreamweaver if that helps.  Please HELP!!
    Process:    
    Dreamweaver [47980]
    Path:       
    /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/Dreamweaver
    Identifier: 
    com.adobe.dreamweaver-9.0
    Version:    
    9.0.0.3481 (9.0.0)
    Code Type:  
    X86 (Native)
    Parent Process:  launchd [202]
    Responsible:
    Dreamweaver [47980]
    User ID:    
    501
    Date/Time:  
    2014-01-09 11:36:21.492 -0600
    OS Version: 
    Mac OS X 10.9.1 (13B42)
    Report Version:  11
    Anonymous UUID:  5A0B988B-54C0-415D-7A57-FCEAFB311CEA
    Sleep/Wake UUID: D2F4A8F0-5BF0-4C8A-8318-32F394B91758
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x000000000ac86564
    VM Regions Near 0xac86564:
    mapped file       
    000000000a3a2000-000000000a6ae000 [ 3120K] rw-/rwx SM=COW  /System/Library/Fonts/LucidaGrande.ttc
    -->
    mapped file       
    000000001a3a2000-000000001a6ae000 [ 3120K] r--/rwx SM=COW  /System/Library/Fonts/LucidaGrande.ttc
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.apple.QD             
    0x98d81a43 _GetSrcBits32BGRA + 4
    1   com.adobe.dreamweaver-9.0
    0x00a988b9 CDC::SetPixel(int, int, unsigned long) + 183
    2   com.adobe.dreamweaver-9.0
    0x00887841 PlatformControlDrawing::DrawColorWell(CWnd*, CDC&, CRect const&, unsigned long, tagPALETTEENTRY, PlatformControlDrawing::SColorWellBitmaps&, CRect const*, unsigned long) + 1173
    3   com.adobe.dreamweaver-9.0
    0x00044bc7 CColorButton::DrawItem(tagDRAWITEMSTRUCT*) + 213
    4   com.adobe.dreamweaver-9.0
    0x00a2d570 CButtonOwnerDrawImpl::SendDrawItem(unsigned int, unsigned int) + 252
    5   com.adobe.dreamweaver-9.0
    0x00a2d673 CButtonOwnerDrawImpl::DrawSelf() + 69
    6   com.adobe.dreamweaver-9.0
    0x00ac4b7c LPane::Draw(OpaqueRgnHandle*) + 178
    7   com.adobe.dreamweaver-9.0
    0x00ac895d LView::Draw(OpaqueRgnHandle*) + 491
    8   com.adobe.dreamweaver-9.0
    0x00ac895d LView::Draw(OpaqueRgnHandle*) + 491
    9   com.adobe.dreamweaver-9.0
    0x00ac895d LView::Draw(OpaqueRgnHandle*) + 491
    10  com.adobe.dreamweaver-9.0
    0x00ac895d LView::Draw(OpaqueRgnHandle*) + 491
    11  com.adobe.dreamweaver-9.0
    0x00ac895d LView::Draw(OpaqueRgnHandle*) + 491
    12  com.adobe.dreamweaver-9.0
    0x00a5ad6a CWindowEventHandlers::DrawContent(OpaqueEventHandlerCallRef*, OpaqueEventRef*) + 86
    13  com.adobe.dreamweaver-9.0
    0x00ac243a LEventHandler::EventHandlerCallback(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 32
    14  com.apple.HIToolbox      
    0x9666ceb9 _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
    15  com.apple.HIToolbox      
    0x964c064f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1452
    16  com.apple.HIToolbox      
    0x964bf968 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 386
    17  com.apple.HIToolbox      
    0x964bf7e0 SendEventToEventTargetWithOptions + 94
    18  com.apple.HIToolbox      
    0x96678264 SendWindowEvent(OpaqueWindowPtr*, unsigned long, double, Point*, unsigned long, short, unsigned long) + 233
    19  com.apple.HIToolbox      
    0x964d364d HandleWindowEvent(OpaqueEventRef*) + 1120
    20  com.apple.HIToolbox      
    0x96532790 StandardWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 529
    21  com.apple.HIToolbox      
    0x9666ceb9 _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
    22  com.apple.HIToolbox      
    0x964c064f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1452
    23  com.apple.HIToolbox      
    0x964bf968 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 386
    24  com.apple.HIToolbox      
    0x964bf7e0 SendEventToEventTargetWithOptions + 94
    25  com.apple.HIToolbox      
    0x964f36a9 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1757
    26  com.apple.HIToolbox      
    0x964c0a95 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2546
    27  com.apple.HIToolbox      
    0x964bf968 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 386
    28  com.apple.HIToolbox      
    0x964d2af1 SendEventToEventTarget + 88
    29  com.apple.HIToolbox      
    0x9666c5a3 ToolboxEventDispatcher + 82
    30  com.apple.HIToolbox      
    0x9666c463 RunApplicationEventLoop + 240
    31  com.adobe.dreamweaver-9.0
    0x00a85c1a CRealApp::Run() + 408
    32  com.adobe.dreamweaver-9.0
    0x00a5eaeb main + 333
    33  com.adobe.dreamweaver-9.0
    0x00003346 _start + 216
    34  com.adobe.dreamweaver-9.0
    0x0000326d start + 41
    Thread 1:: Dispatch queue: com.apple.libdispatch-manager
    0   libsystem_kernel.dylib   
    0x9a255992 kevent64 + 10
    1   libdispatch.dylib        
    0x979de8bd _dispatch_mgr_invoke + 238
    2   libdispatch.dylib        
    0x979de556 _dispatch_mgr_thread + 52
    Thread 2:
    0   libsystem_kernel.dylib   
    0x9a24ff7a mach_msg_trap + 10
    1   libsystem_kernel.dylib   
    0x9a24f16c mach_msg + 68
    2   com.apple.CoreServices.CarbonCore
    0x93b337cd TS_exception_listener_thread + 138
    3   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    4   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    5   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 3:
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b1042 pthread_cond_timedwait_relative_np + 47
    3   com.apple.CoreServices.CarbonCore
    0x93b36b2d TSWaitOnConditionTimedRelative + 161
    4   com.apple.CoreServices.CarbonCore
    0x93b366ea TSWaitOnSemaphoreCommon + 531
    5   com.apple.CoreServices.CarbonCore
    0x93b3689d TSWaitOnSemaphoreRelative + 24
    6   com.apple.CoreServices.CarbonCore
    0x93b16ea0 TimerThread + 89
    7   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    8   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    9   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 4:
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b1042 pthread_cond_timedwait_relative_np + 47
    3   com.apple.Foundation     
    0x9377d7a3 -[NSCondition waitUntilDate:] + 389
    4   com.apple.Foundation     
    0x93773832 -[NSConditionLock lockWhenCondition:beforeDate:] + 282
    5   com.apple.Foundation     
    0x93773712 -[NSConditionLock lockWhenCondition:] + 69
    6   com.adobe.dreamweaver-9.0
    0x00b586c1 AMTConditionLock::LockWhenCondition(int) + 43
    7   com.adobe.dreamweaver-9.0
    0x00b454fd AMTPCDWorkerThread::HandleRequests(void*) + 87
    8   com.adobe.dreamweaver-9.0
    0x00b56bec -[AMTThreadHelper threadWorker:] + 70
    9   com.apple.Foundation     
    0x937aef2e -[NSThread main] + 45
    10  com.apple.Foundation     
    0x937aee86 __NSThread__main__ + 1426
    11  libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    12  libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    13  libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 5:
    0   libsystem_kernel.dylib   
    0x9a2500a6 mach_wait_until + 10
    1   libsystem_c.dylib        
    0x9244bcee nanosleep + 366
    2   com.apple.carbonbundletemplate
    0x1d49d44b ScObjects::Thread::sleep(unsigned int) + 79
    3   com.apple.carbonbundletemplate
    0x1d48d8d5 ScObjects::BridgeTalkThread::run() + 153
    4   com.apple.carbonbundletemplate
    0x1d49d535 ScObjects::Thread::go(void*) + 167
    5   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    6   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    7   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 6:
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b1042 pthread_cond_timedwait_relative_np + 47
    3   com.apple.CoreServices.CarbonCore
    0x93b36b2d TSWaitOnConditionTimedRelative + 161
    4   com.apple.CoreServices.CarbonCore
    0x93b366ea TSWaitOnSemaphoreCommon + 531
    5   com.apple.CoreServices.CarbonCore
    0x93b3689d TSWaitOnSemaphoreRelative + 24
    6   com.apple.QuickTimeComponents.component
    0x9b49a1b1 0x9b22d000 + 2544049
    7   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    8   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    9   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 7:
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b2fa3 pthread_cond_wait + 48
    3   com.apple.carbonbundletemplate
    0x1ec4c220 MMNetIO::RequestProcessor<MMNetIO::FTPNetChannel, MMNetIO::FTPNetChannel, MMNetIO::NetIOException>::MutexState::Wait() + 42
    4   com.apple.carbonbundletemplate
    0x1ec4f97e MMNetIO::RequestProcessor<MMNetIO::FTPNetChannel, MMNetIO::FTPNetChannel, MMNetIO::NetIOException>::ProcessRequests() + 80
    5   com.apple.carbonbundletemplate
    0x1ec4fd43 MMNetIO::RequestProcessor<MMNetIO::FTPNetChannel, MMNetIO::FTPNetChannel, MMNetIO::NetIOException>::RequestProcessorTrampoline(void*) + 17
    6   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    7   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    8   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 8:
    0   libsystem_kernel.dylib   
    0x9a24ff7a mach_msg_trap + 10
    1   libsystem_kernel.dylib   
    0x9a24f16c mach_msg + 68
    2   com.macromedia.Flash Player.authplaylib
    0x1f90be7b ExternalPlayer_Initialize + 292931
    3   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    4   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    5   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 9:: com.apple.NSURLConnectionLoader
    0   libsystem_kernel.dylib   
    0x9a24ff7a mach_msg_trap + 10
    1   libsystem_kernel.dylib   
    0x9a24f16c mach_msg + 68
    2   com.apple.CoreFoundation 
    0x97666f69 __CFRunLoopServiceMachPort + 169
    3   com.apple.CoreFoundation 
    0x97666541 __CFRunLoopRun + 1393
    4   com.apple.CoreFoundation 
    0x97665d5a CFRunLoopRunSpecific + 394
    5   com.apple.CoreFoundation 
    0x97665bbb CFRunLoopRunInMode + 123
    6   com.apple.Foundation     
    0x937af0b5 +[NSURLConnection(Loader) _resourceLoadLoop:] + 381
    7   com.apple.Foundation     
    0x937aef2e -[NSThread main] + 45
    8   com.apple.Foundation     
    0x937aee86 __NSThread__main__ + 1426
    9   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    10  libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    11  libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 10:: com.apple.CFSocket.private
    0   libsystem_kernel.dylib   
    0x9a254ace __select + 10
    1   com.apple.CoreFoundation 
    0x976b6dc6 __CFSocketManager + 1158
    2   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    3   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    4   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 11:: jpegdecompress_MPLoop
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b2fa3 pthread_cond_wait + 48
    3   com.apple.QuickTimeComponents.component
    0x9b5b16ca 0x9b22d000 + 3688138
    4   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    5   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    6   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 12:: jpegdecompress_MPLoop
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b2fa3 pthread_cond_wait + 48
    3   com.apple.QuickTimeComponents.component
    0x9b5b16ca 0x9b22d000 + 3688138
    4   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    5   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    6   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 13:: jpegdecompress_MPLoop
    0   libsystem_kernel.dylib   
    0x9a2547ca __psynch_cvwait + 10
    1   libsystem_pthread.dylib  
    0x943b0d8a _pthread_cond_wait + 837
    2   libsystem_pthread.dylib  
    0x943b2fa3 pthread_cond_wait + 48
    3   com.apple.QuickTimeComponents.component
    0x9b5b16ca 0x9b22d000 + 3688138
    4   libsystem_pthread.dylib  
    0x943ae5fb _pthread_body + 144
    5   libsystem_pthread.dylib  
    0x943ae485 _pthread_start + 130
    6   libsystem_pthread.dylib  
    0x943b3cf2 thread_start + 34
    Thread 14:
    0   libsystem_kernel.dylib   
    0x9a255046 __workq_kernreturn + 10
    1   libsystem_pthread.dylib  
    0x943afdcf _pthread_wqthread + 372
    2   libsystem_pthread.dylib  
    0x943b3cce start_wqthread + 30
    Thread 15:
    0   libsystem_kernel.dylib   
    0x9a255046 __workq_kernreturn + 10
    1   libsystem_pthread.dylib  
    0x943afdcf _pthread_wqthread + 372
    2   libsystem_pthread.dylib  
    0x943b3cce start_wqthread + 30
    Thread 0 crashed with X86 Thread State (32-bit):
      eax: 0x0ac86564  ebx: 0xbfffe354  ecx: 0x42475241  edx: 0xbfffe22c
      edi: 0x42475241  esi: 0x00000000  ebp: 0xbfffe258  esp: 0xbfffdcec
       ss: 0x00000023  efl: 0x00010282  eip: 0x98d81a43   cs: 0x0000001b
       ds: 0x00000023   es: 0x00000023   fs: 0x00000000   gs: 0x0000000f
      cr2: 0x0ac86564
    Logical CPU:
    0
    Error Code: 
    0x00000004
    Trap Number:
    14
    Binary Images:
    0x1000 -  0x1060fde +com.adobe.dreamweaver-9.0 (9.0.0.3481 - 9.0.0) <BF3351F2-0BA2-48FE-BE70-1B2DB46ABE16> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/Dreamweaver
    0x2337000 -  0x2350fde +libChar16.dylib (1) <54D6A72C-8E95-493E-A3DE-15E472C07AB6> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libChar16.dylib
    0x2360000 -  0x2382fc0 +libCoreTypes.dylib (1) <3AC366EA-499B-4508-80FE-4331DE99A7D2> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libCoreTypes.dylib
    0x23a1000 -  0x23bffef +libCurl.dylib (1) <E10E63FA-44BE-4142-9869-E3AE59C05B9F> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libCurl.dylib
    0x23cd000 -  0x23d6ffb +libZ.dylib (1) <D9B990AB-E460-476B-94E8-CFD8A60B0985> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libZ.dylib
    0x23de000 -  0x248efdb +libCrypto.dylib (1) <EC84F308-3008-4E44-968C-9C0CA5E549AD> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libCrypto.dylib
    0x252a000 -  0x254cffc +libSSL.dylib (1) <9290A5AE-2032-4654-8F2E-CFF77D29C8D5> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/libSSL.dylib
    0x2561000 -  0x2774fdf  com.apple.carbonframeworktemplate (1.0 - 1.0) <B07E25BB-C4DD-4EFD-BB79-DC17B3C19CDD> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/Xerces.framework/Versions/A/Xerces
    0x2ad2000 -  0x2ad9ffc  com.apple.carbonframeworktemplate (1.0 - 1.0) <D3766ACC-8C0B-40FE-9F8D-D1A213A866A2> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/NetIO.framework/Versions/A/NetIO
    0x2aed000 -  0x2af1ffd  com.apple.JavaVM (14.9.0 - 14.9.0) <B5C49C2C-790D-3AD1-8F18-19EDBA6FB603> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
    0x2af9000 -  0x2afeff3 +com.adobe.AdobeCrashReporter (1.0 - 2.1.03072007) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeCrashReporter.framework/Versions/A /AdobeCrashReporter
    0x2b05000 -  0x2b21fd7 +LogTransport (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/LogTransport.framework/Versions/A/LogTr ansport
    0x2b2c000 -  0x2b61fd3 +adobe_epic (2) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobe_epic.framework/Versions/A/adobe_e pic
    0x2b81000 -  0x2b8dfe3 +adobe_eula (2) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobe_eula.framework/Versions/A/adobe_e ula
    0x2b96000 -  0x2ba4fc5 +adobe_personalization (2) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobe_personalization.framework/Version s/A/adobe_personalization
    0x2bad000 -  0x2bbdfe7 +adobe_registration (2) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobe_registration.framework/Versions/A /adobe_registration
    0x2bc6000 -  0x2e17fde +adobelm (0) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobelm.framework/Versions/A/adobelm
    0x2fca000 -  0x3022ff2 +AdobeUpdater (1) <CA913CDD-FA7B-4435-8BEB-052BB879AED6> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeUpdater.framework/Versions/A/Adobe Updater
    0x305f000 -  0x306cff7 +com.adobe.asneu.framework (asneu version 1.6.2f01 - 1.6.2) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/asneu.framework/Versions/A/asneu
    0x307a000 -  0x317aff7 +AdobeACE (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeACE.framework/Versions/A/AdobeACE
    0x3199000 -  0x3419ff7 +AdobeAGM (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeAGM.framework/Versions/A/AdobeAGM
    0x34c2000 -  0x34dbfff +AdobeBIB (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeBIB.framework/Versions/A/AdobeBIB
    0x34e5000 -  0x3506ff7 +AdobeBIBUtils (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeBIBUtils.framework/Versions/A/Adob eBIBUtils
    0x3513000 -  0x377ffe7 +AdobeCoolType (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeCoolType.framework/Versions/A/Adob eCoolType
    0x3802000 -  0x44a5feb +com.adobe.psl (10.305893.46.307412 - 10.305893.46.307412) <54F8C452-8089-4BD3-B3A7-8823F6FB084B> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobePSL.framework/Versions/A/AdobePSL
    0x47c3000 -  0x47e6ff6 +AdobeAXE8SharedExpat (0) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeAXE8SharedExpat.framework/Versions /A/AdobeAXE8SharedExpat
    0x47f8000 -  0x484dffd +AdobeXMP (0) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeXMP.framework/Versions/A/AdobeXMP
    0x485b000 -  0x48a2fc7 +com.adobe.adobe_caps (adobe_caps 0.0.120.0 - 0.0.120.0) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/adobe_caps.framework/Versions/A/adobe_c aps
    0x48b2000 -  0x48b6ffd  JavaLaunching (1) <A706DA49-7705-3D0B-AEA6-58D57147033B> /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunch ing
    0x48bd000 -  0x48f9ff7  com.apple.vmutils (4.2.1 - 108) <37A7D6A9-0BA7-39D9-A203-7123124A18B0> /System/Library/PrivateFrameworks/vmutils.framework/Versions/A/vmutils
    0x49e9000 -  0x49eaffd  com.apple.textencoding.unicode (2.6 - 2.6) <27946D57-CEFB-3EF1-B124-4A39D2621738> /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings
    0x8406000 -  0x8409fff  com.apple.LiveType.component (2.1.3 - 2.1.3) /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType
    0x8431000 -  0x8431ffd +cl_kernels (???) <55780AA1-027F-4AB6-ADB9-2027D6B104C5> cl_kernels
    0x84d5000 -  0x84daff7  com.apple.DesktopVideoOut (1.2.4 - 1.2.4) /Library/QuickTime/DesktopVideoOut.component/Contents/MacOS/DesktopVideoOut
    0x8624000 -  0x8649ff9  com.apple.framework.familycontrols (4.1 - 410) <A33A97EE-C735-38BA-9B49-5D78DAA3DEDA> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyCon trols
    0x865e000 -  0x8669ffa  com.apple.CommerceCore (1.0 - 42) <E59717F2-6770-3DBC-8510-F7AA61E60F57> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/C ommerceCore.framework/Versions/A/CommerceCore
    0x8673000 -  0x8685fd9  com.apple.FCP Uncompressed 422.component (1.5 - 1.5) /Library/QuickTime/FCP Uncompressed 422.component/Contents/MacOS/FCP Uncompressed 422
    0x868b000 -  0x868ffff  com.apple.AppleMPEG2Codec (1.0.2 - 220.1) <017135BD-3E54-30EC-9489-6ACADA56D51F> /Library/QuickTime/AppleMPEG2Codec.component/Contents/MacOS/AppleMPEG2Codec
    0x86aa000 -  0x86adffb +com.divx.divxtoolkit (1.0 - 1.0) /Library/Frameworks/DivX Toolkit.framework/Versions/A/DivX Toolkit
    0x86b2000 -  0x86f8fc3  com.apple.motion.component (1.0 - 1.0) <77973A13-4E79-426F-853F-2318E52A2207> /Library/QuickTime/Motion.component/Contents/MacOS/Motion
    0x1a6ae000 - 0x1a713fde  com.apple.LiveType.framework (2.1.3 - 2.1.3) /System/Library/PrivateFrameworks/LiveType.framework/Versions/A/LiveType
    0x1a733000 - 0x1a78bfff +com.DivXInc.DivXDecoder (6.8.4.3 - 6.8.4) <26A406B3-E4BC-C6FF-8F28-A99FFEB5CF2D> /Library/QuickTime/DivX Decoder.component/Contents/MacOS/DivX Decoder
    0x1a7af000 - 0x1a7b202f  Motion (1) <B5E862EE-E0FF-4F86-A789-98E3E601A18C> /Library/Frameworks/Motion.framework/Versions/A/Motion
    0x1b1ca000 - 0x1b1d1ff8  com.apple.AppleGVAHW.component (1.2 - 1) <BFAB80FE-B356-377E-A22E-54114B07C138> /System/Library/QuickTime/AppleGVAHW.component/Contents/MacOS/AppleGVAHW
    0x1d2c7000 - 0x1d2d5fff  libSimplifiedChineseConverter.dylib (61) <6E42E198-9C8D-3F0F-9660-6D9975C2461E> /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
    0x1d2d9000 - 0x1d2ebffd  libTraditionalChineseConverter.dylib (61) <EFC81138-0455-321B-A93A-F4E9C4A3EB31> /System/Library/CoreServices/Encodings/libTraditionalChineseConverter.dylib
    0x1d41d000 - 0x1d445ff2  com.apple.carbonbundletemplate (1.0 - 1.0) <5E39C226-1956-42E4-8A90-52AC120C309B> /Applications/Adobe Dreamweaver CS3/*/MMNotes.bundle/Contents/MacOS/MMNotes
    0x1d46b000 - 0x1d46ffc7  com.apple.carbonbundletemplate (1.0 - 1.0) <58FF20A6-C10F-48D9-953F-398E1190BF70> /Applications/Adobe Dreamweaver CS3/*/SWFFile.bundle/Contents/MacOS/SWFFile
    0x1d475000 - 0x1d4abfe3  com.apple.carbonbundletemplate (1.0 - 1.0) <D62FF516-5180-4C08-AA4D-D8BE9CCA180A> /Applications/Adobe Dreamweaver CS3/*/JSBridge.bundle/Contents/MacOS/JSBridge
    0x1d519000 - 0x1d519ff3  com.apple.carbonbundletemplate (1.0 - 1.0) <6674C04D-4D0D-4D32-AD13-50A467A02AC4> /Applications/Adobe Dreamweaver CS3/*/MM.bundle/Contents/MacOS/MM
    0x1d5e6000 - 0x1d5e7fe7  com.apple.carbonbundletemplate (1.0 - 1.0) <C48D6C97-0307-4DDF-A26A-260DFA2E739B> /Applications/Adobe Dreamweaver CS3/*/DWfile.bundle/Contents/MacOS/DWfile
    0x1d803000 - 0x1d805ffd  com.apple.PDFImporter (2.2 - 23) <A6E44BEA-3194-38CA-BACF-D25699C09487> /System/Library/Components/PDFImporter.component/Contents/MacOS/PDFImporter
    0x1da00000 - 0x1da12fff +net.telestream.license (1.1.0.1 -GC - 1.1.0.1 -GC) <DC7780FD-AAAC-310E-92D5-1B8E7AB20E8C> /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense
    0x1da1c000 - 0x1da35ff2  com.apple.applepixletvideo (1.2.31 - 1.2d31) <3691A649-1F8F-3C0A-89F4-5C2DD4E38EEC> /System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ApplePixlet Video
    0x1e42e000 - 0x1e53eff7 +net.telestream.wmv.import (2.5.0.1 - 3.0.0.126) <6CB544CE-B60B-3BEE-954F-67BD9228B6C9> /Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV Import
    0x1e5aa000 - 0x1e76bfef +net.telestream.wmv.advanced (2.5.0.1 - 3.0.0.126) <6D1AADBA-C72A-3B73-85B3-4D37C4083830> /Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV Advanced
    0x1e7b5000 - 0x1e891fd7  com.apple.AppleProResDecoder (3.0.4 - 6305.11) <50F80B48-00A2-37F0-BE25-CD0258A474BE> /System/Library/QuickTime/AppleProResDecoder.component/Contents/MacOS/AppleProR esDecoder
    0x1e89c000 - 0x1e8e0ff7  com.apple.AppleVAH264HW.component (3.0 - 3.0) <A4E711A3-06D1-337C-B60C-0E2A359596C8> /System/Library/QuickTime/AppleVAH264HW.component/Contents/MacOS/AppleVAH264HW
    0x1e9a3000 - 0x1ea56ff7  com.apple.AppleGVAFramework (6.0.38 - 6.0.38) <386247C2-D801-3D10-A24F-E73A2109A170> /System/Library/PrivateFrameworks/AppleGVA.framework/Versions/A/AppleGVA
    0x1ea66000 - 0x1ea9eff7  com.apple.QuickTimeFireWireDV.component (7.7.3 - 2826.0.1) <072578A6-7748-3B15-B15C-B96A523416D0> /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTim eFireWireDV
    0x1eaaa000 - 0x1eaeefe7  com.apple.DVCPROHDCodec (1.4 - 231) /Library/QuickTime/DVCPROHDCodec.component/Contents/MacOS/DVCPROHDCodec
    0x1eb03000 - 0x1eba6fd3  com.apple.AppleHDVCodec (1.4.1 - 222) <68ABD695-E990-4F5F-9074-D2C4AE440637> /Library/QuickTime/AppleHDVCodec.component/Contents/MacOS/AppleHDVCodec
    0x1ebc4000 - 0x1ebf6ff7  com.apple.AppleIntermediateCodec (2.0.2 - 6305.11) <397782CB-2454-37D5-A10C-B992A4E1D439> /Library/QuickTime/AppleIntermediateCodec.component/Contents/MacOS/AppleInterme diateCodec
    0x1ebfe000 - 0x1ec1eff3  com.apple.IMXCodec (1.3.1 - 147) /Library/QuickTime/IMXCodec.component/Contents/MacOS/IMXCodec
    0x1ec36000 - 0x1ec5cffc  com.apple.carbonbundletemplate (1.0 - 1.0) <35B3E2D2-CBF8-4B9C-9678-FA4EB36B0557> /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/PlugIns/NetIOFTP.bundle/Contents/MacOS/NetIOFTP
    0x1ee00000 - 0x1eeb0fff  ColorSyncDeprecated.dylib (426) <F54DBFF3-3165-3D15-8AE4-37B603502A5F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/Resources/ColorSyncDeprecated.dylib
    0x1efbd000 - 0x1efe7fff  com.apple.audio.CoreAudioKit (1.6.6 - 1.6.6) <30C0DC77-EDFD-36B3-AB1C-A520B472A869> /System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit
    0x1f500000 - 0x1faa7fd7 +com.macromedia.Flash Player.authplaylib (9.0.45.0 - 1.0.4f45) /Applications/Adobe Dreamweaver CS3/*/AuthPlayLib.bundle/Contents/MacOS/AuthPlayLib
    0x20d1c000 - 0x21194feb +AdobeLM_libFNP.dylib (1) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/MacOS/AdobeLM_libFNP.dylib
    0x24c00000 - 0x24cebff7  unorm8_bgra.dylib (2.3.58) <44644D3C-3D0E-3CBB-9265-664D95EC791F> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/ImageFormats/u norm8_bgra.dylib
    0x40000000 - 0x400a6fd0 +AdobeJP2K (0) /Applications/Adobe Dreamweaver CS3/Dreamweaver.app/Contents/Frameworks/AdobeJP2K.framework/Versions/A/AdobeJP2 K
    0x8fe95000 - 0x8fec7417  dyld (239.3) <4B280BB1-55F8-313F-86A6-8ADD644ED69E> /usr/lib/dyld
    0x90008000 - 0x90010fff  libsystem_dnssd.dylib (522.1.11) <1C015806-B971-34F9-B162-3DF7897351D0> /usr/lib/system/libsystem_dnssd.dylib
    0x90011000 - 0x900e1fef  libvDSP.dylib (423.32) <E2FA7230-A001-3F6B-9ACF-6998C51AD7DC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvDSP.dylib
    0x900e2000 - 0x900e6ff7  libmacho.dylib (845) <D8E93E59-1F80-3413-B9CF-78B848F6E873> /usr/lib/system/libmacho.dylib
    0x900e7000 - 0x9015afff  com.apple.SearchKit (1.4.0 - 1.4.0) <6F607AB6-7553-37BA-BEC5-98FD7C27FAD7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
    0x9015b000 - 0x9015effe  com.apple.LoginUICore (3.0 - 3.0) <6FE961A4-3C17-3004-B50B-FD78FDC28350> /System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/Lo ginUICore.framework/Versions/A/LoginUICore
    0x9015f000 - 0x90593ff7  com.apple.vision.FaceCore (3.0.0 - 3.0.0) <5B12F3E9-84F6-3183-B85D-FD19EF800ADB> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
    0x90594000 - 0x905e3fff  com.apple.opencl (2.3.57 - 2.3.57) <93385E1C-00D9-31BE-9652-7F3C09484B3E> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
    0x90e29000 - 0x90e3cfff  com.apple.ImageCapture (9.0 - 9.0) <63D5C96F-1893-3F35-ADFB-EE451AFD87E6> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
    0x90e3d000 - 0x90e83ff7  libFontRegistry.dylib (127) <A0930DB2-A6C6-3C6E-B4A2-119E0D76FD7D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x90e84000 - 0x90e84fff  com.apple.Accelerate.vecLib (3.9 - vecLib 3.9) <DDAC0B59-F886-3AB1-98E8-C71FFF161CD4> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
    0x90e85000 - 0x910e9fff  com.apple.CoreData (107 - 481) <F699EC21-57D9-3AE6-A17B-C1D1092780BD> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x910ea000 - 0x91120fff  com.apple.IconServices (25 - 25.17) <A4B5242B-765E-3D58-B066-BBEDB5947AAD> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconService s
    0x91121000 - 0x91215fff  libFontParser.dylib (111.1) <D8F9B2A4-41A6-3407-8D80-13A841F97BE5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x9121e000 - 0x91249ff7  libpcap.A.dylib (42) <66FBEAD3-FE91-3A89-8706-FB95229068AC> /usr/lib/libpcap.A.dylib
    0x9124a000 - 0x9124bfff  libremovefile.dylib (33) <ED35EA79-EB06-3B84-A6D4-B1A9D6B8648D> /usr/lib/system/libremovefile.dylib
    0x9124c000 - 0x91260ff9  com.apple.MultitouchSupport.framework (245.13 - 245.13) <6860A0D0-3654-3B02-B2E9-C4D2637167B8> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/Multit ouchSupport
    0x91261000 - 0x912d6ffb  com.apple.framework.IOKit (2.0.1 - 907.1.13) <86D72735-9DFB-35C8-83F7-CE0DCF17D354> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x912d7000 - 0x912f0fff  com.apple.Kerberos (3.0 - 1) <91F17EB2-C70C-359C-B09D-96B52D2A9C9F> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x912f1000 - 0x913b8ff7  com.apple.DiscRecording (8.0 - 8000.4.6) <84A7EC09-3BBD-3E04-A88C-6D3B724448FF> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
    0x913b9000 - 0x916a3fd2  com.apple.vImage (7.0 - 7.0) <256972F0-3DBC-3CE1-9EE8-B48243868729> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
    0x916a4000 - 0x916adfff  com.apple.speech.recognition.framework (4.2.4 - 4.2.4) <CF8E5706-F744-3139-8A51-D52BF055D19F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
    0x916ff000 - 0x91701ffb  libRadiance.dylib (1038) <F0D3F13B-5628-3DF9-8B86-A4D914567B25> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.d ylib
    0x91702000 - 0x9180aff7  com.apple.QuickTimeImporters.component (7.7.3 - 2826.0.1) <161D3C2E-2AC6-3354-ADEC-EAC7E995802B> /System/Library/QuickTime/QuickTimeImporters.component/Contents/MacOS/QuickTime Importers
    0x91861000 - 0x9186fff7  com.apple.Sharing (132.2 - 132.2) <87DBFC7A-9689-3B8E-AD16-5A9DFF9DE625> /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
    0x91870000 - 0x91870ffd  libOpenScriptingUtil.dylib (157) <4D06E8ED-D312-34EA-A448-DFF45ADC3CE5> /usr/lib/libOpenScriptingUtil.dylib
    0x91a39000 - 0x91a68fff  com.apple.framework.SystemAdministration (1.0 - 1.0) <05E81260-7DC7-3546-B45D-15B3E5DF056D> /System/Library/PrivateFrameworks/SystemAdministration.framework/Versions/A/Sys temAdministration
    0x91a69000 - 0x91b80ffb  com.apple.WebKit (9537 - 9537.73.11) <74634980-1AC4-3874-9BC2-72E1ED8FB534> /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    0x91b81000 - 0x91b91ff5  com.apple.LangAnalysis (1.7.0 - 1.7.0) <71DE7754-0A47-3F35-B1BF-B1FE7E1311E0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
    0x91b92000 - 0x91bc0ff3  com.apple.DebugSymbols (106 - 106) <FC70F4C9-B2A6-352F-9563-6C085E9DDDB8> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbol s
    0x91bc1000 - 0x91c4afff  com.apple.CoreSymbolication (3.0 - 141) <178DDF5C-B6DA-39BD-84F5-FD3FA7E93BF8> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSy mbolication
    0x91c4b000 - 0x91ce3ff7  com.apple.Metadata (10.7.0 - 800.12.2) <5E9EA0AC-EE9E-362E-9DAC-9B7D21A53A2A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
    0x91ce4000 - 0x91d14ff7  com.apple.CoreServicesInternal (184.8 - 184.8) <88528205-9452-3EEC-BB27-DAAA7EC81E04> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/Cor eServicesInternal
    0x91d15000 - 0x91d71ffa  com.apple.print.framework.PrintCore (9.0 - 428) <3E248391-2669-328B-B84F-8763FE8E92BB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
    0x92080000 - 0x92083ff9  com.apple.TCC (1.0 - 1) <A5FCF7AA-3F56-3A19-9DF1-661F1F02F79D> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
    0x92084000 - 0x920aefff  libxslt.1.dylib (13) <249D54AB-1D82-38FE-ABEC-0D575450C73B> /usr/lib/libxslt.1.dylib
    0x920af000 - 0x920afffd  com.apple.audio.units.AudioUnit (1.9 - 1.9) <8A37963C-DF6F-3DFF-94E9-407DC5DFEDA9> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
    0x920b0000 - 0x920edffb  libGLImage.dylib (9.0.83) <FA15FEB5-54E4-313B-8E78-A2D2E6C88FE1> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dyl ib
    0x9214d000 - 0x921c2ff1  com.apple.ApplicationServices.ATS (360 - 363.1) <5C9BC698-0CC1-3F6A-9F9D-BCC3A9C3D6DC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
    0x9234b000 - 0x92374ff5  com.apple.shortcut (2.6 - 2.6) <F9F32E6F-E641-36D0-B648-058D5E146D38> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut
    0x92375000 - 0x923c8fff  com.apple.htmlrendering (77 - 1.1.4) <408FA30F-4FE9-3162-9FFD-677E8569C1EA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering .framework/Versions/A/HTMLRendering
    0x923c9000 - 0x9245bffe  libsystem_c.dylib (997.1.1) <D06FD754-8CE3-3EB7-BE05-2EF939BBE05F> /usr/lib/system/libsystem_c.dylib
    0x9245c000 - 0x92484fff  libsystem_info.dylib (449.1.3) <BB68E8CC-422F-3121-8C86-D0F766FB696D> /usr/lib/system/libsystem_info.dylib
    0x92485000 - 0x93320ffb  com.apple.WebCore (9537 - 9537.73.13) <85E27D26-9FA4-3CB0-9355-DDD7E3BBFBD7> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
    0x93321000 - 0x93719ff3  com.apple.CoreGraphics (1.600.0 - 599.7) <DB004990-F06F-3768-AE4C-191B3C748EFC> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    0x9371a000 - 0x93737ffb  libresolv.9.dylib (54) <3EC12A7F-6BA1-3976-9F1F-6A4B76303028> /usr/lib/libresolv.9.dylib
    0x93740000 - 0x93741fff  liblangid.dylib (117) <F18F76C6-7E4B-34AD-AE81-C1C031BF2F7D> /usr/lib/liblangid.dylib
    0x93742000 - 0x93a6dff6  com.apple.Foundation (6.9 - 1056) <C8AE9C03-3460-354A-A8B6-EF4955BE600D> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x93a6e000 - 0x93a76ffe  libGFXShared.dylib (9.0.83) <35644AAA-B1E7-367C-90C0-378024F8A46A> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.d ylib
    0x93a77000 - 0x93d78ff7  com.apple.CoreServices.CarbonCore (1077.14 - 1077.14) <42E10BD1-995B-3FB4-8A6D-5FD071FB8BD1> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
    0x93d79000 - 0x93daaffd  com.apple.GSS (4.0 - 2.0) <6BA01155-4DAD-30EE-B480-D224650EA010> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x93dab000 - 0x93dacfff  libDiagnosticMessagesClient.dylib (100) <B936B1D4-90BB-395D-8EA9-E1237608E7D0> /usr/lib/libDiagnosticMessagesClient.dylib
    0x93dad000 - 0x93df5fff  com.apple.PerformanceAnalysis (1.47 - 47) <16935C0F-7F9F-316E-9D46-11973DE0904A> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/Perf ormanceAnalysis
    0x93df6000 - 0x93e46ff7  libcorecrypto.dylib (161.1) <135FD99E-2211-3DF4-825C-C9F816107F0C> /usr/lib/system/libcorecrypto.dylib
    0x93f21000 - 0x93f28ffe  com.apple.agl (3.2.3 - AGL-3.2.3) <E26A1D2C-596E-31F0-8E70-FC381874F8DA> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
    0x93f2c000 - 0x9401cffb  libiconv.2.dylib (41) <848FEBA7-2E3E-3ECB-BD59-007F32468787> /usr/lib/libiconv.2.dylib
    0x94031000 - 0x94032ffd  libunc.dylib (28) <22A126A1-DCFB-3BE5-A66B-C973F0A5D839> /usr/lib/system/libunc.dylib
    0x94033000 - 0x94063ff3  libtidy.A.dylib (15.12) <3DBE95FE-8FA7-3584-9202-E37B54B3B064> /usr/lib/libtidy.A.dylib
    0x94064000 - 0x943aaffb  com.apple.MediaToolbox (1.0 - 1273.29) <60F62850-70EC-38E8-9C7F-81204CF9C382> /System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox
    0x943ad000 - 0x943b4ffb  libsystem_pthread.dylib (53.1.4) <8B1B7B84-1B5D-32A8-AC0D-1E689E5C8A4C> /usr/lib/system/libsystem_pthread.dylib
    0x9440b000 - 0x9448bff7  com.apple.CoreServices.OSServices (600.4 - 600.4) <1227DF22-E2DA-3764-A1CA-10CC0CEBE377> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
    0x9448c000 - 0x9448cfff  com.apple.Accelerate (1.9 - Accelerate 1.9) <C85070A7-D942-3CFA-981F-5864480788C8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x9448d000 - 0x944fbffb  libType1Scaler.dylib (112) <193E1B2C-F137-322D-A89C-2314D8F06AB3> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libType1Scaler.dylib
    0x944fc000 - 0x94518ff9  com.apple.Ubiquity (1.3 - 289) <1CEDC83D-7282-3B4D-8CF7-4FE045012391> /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity
    0x94519000 - 0x945ffff7  com.apple.coreui (2.1 - 231) <1C1AE894-C5C2-3F1C-BF29-B152ECD9BD88> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
    0x94600000 - 0x94601ffc  com.apple.TrustEvaluationAgent (2.0 - 25) <064B485D-56E0-3DD7-BBE2-E08A5BFFF8B3> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/Tru stEvaluationAgent
    0x94602000 - 0x94714ffc  libsqlite3.dylib (158) <B3DB0FED-FE4C-314D-8329-CF7708C8AAF4> /usr/lib/libsqlite3.dylib
    0x94715000 - 0x94887ffb  com.apple.audio.toolbox.AudioToolbox (1.9 - 1.9) <E5FFD35D-18CF-333C-BECE-39F8E47BE707> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x948b9000 - 0x948c4ff6  com.apple.NetAuth (5.0 - 5.0) <3B2E9615-EE12-38FC-BDCF-09529FF9464B> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x948c5000 - 0x94992ff7  com.apple.backup.framework (1.5.1 - 1.5.1) <91998CDF-3547-3183-A962-D9E981C14891> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
    0x94993000 - 0x9499efff  com.apple.CrashReporterSupport (10.9 - 538) <7A5FF845-433C-33E3-99B5-F6AA5B825734> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/Cra shReporterSupport
    0x94adb000 - 0x94addfff  libsystem_configuration.dylib (596.12) <1C31C3F6-568D-3854-AE03-A5DA2F39297E> /usr/lib/system/libsystem_configuration.dylib
    0x94ade000 - 0x94ea3ff6  libLAPACK.dylib (1094.5) <E6286E68-3501-31AC-813E-75B3B3968011> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
    0x94ea4000 - 0x94ea4fff  com.apple.CoreServices (59 - 59) <06747539-5035-3307-8645-9BC4E7F89023> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x94f2b000 - 0x9521dff8  com.apple.CoreImage (9.0.54) <D7BC3E53-EF5B-3A14-8808-8D45EE505B48> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage .framework/Versions/A/CoreImage
    0x9521e000 - 0x956c5fe7  com.apple.CoreAUC (6.22.08 - 6.22.08) <3F9E2986-8FF9-3339-A0C8-DC1186C4A5EC> /System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC
    0x956c6000 - 0x956cefff  libcopyfile.dylib (103) <1B1484BD-08B6-3BA9-94CA-A7C24B610EB3> /usr/lib/system/libcopyfile.dylib
    0x956cf000 - 0x956d6ff2  com.apple.NetFS (6.0 - 4.0) <915AA303-C02B-3B0C-8208-D8AAA4350DB4> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x956da000 - 0x95719ff7  com.apple.bom (12.0 - 192) <50F9D23C-9C9A-38BF-B4E2-66D93BE2A174> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
    0x95730000 - 0x958d84af  libobjc.A.dylib (551.1) <31CBE178-E972-30D1-ADC6-4B8345CAE326> /usr/lib/libobjc.A.dylib
    0x958d9000 - 0x958deff6  libcompiler_rt.dylib (35) <9924DF2E-D80B-3A21-920D-544A4597203F> /usr/lib/system/libcompiler_rt.dylib
    0x958df000 - 0x958eafff  libcsfde.dylib (380) <C9E61AFB-1A9D-324B-9827-06B182CDD7B0> /usr/lib/libcsfde.dylib
    0x958eb000 - 0x958f3fff  liblaunch.dylib (842.1.4) <3798500D-4436-3AEB-B273-7F2428C33A4A> /usr/lib/system/liblaunch.dylib
    0x958f4000 - 0x958f5fff  libsystem_blocks.dylib (63) <2AC67D5E-ECD4-3644-A53C-9684F9B7AA33> /usr/lib/system/libsystem_blocks.dylib
    0x9595d000 - 0x959a3fff  libcurl.4.dylib (78) <EC84399F-5EA8-321B-B122-99730CC557C8> /usr/lib/libcurl.4.dylib
    0x95a64000 - 0x95a83ff9  com.apple.framework.Apple80211 (9.0 - 900.47) <68E399FF-AB98-378D-94AC-D0869A72344F> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
    0x95aaf000 - 0x95abfff7  libsasl2.2.dylib (170) <CA1C07F6-8E17-315E-AE49-AB696DDE6707> /usr/lib/libsasl2.2.dylib
    0x95c51000 - 0x95cafffd  com.apple.AE (665.5 - 665.5) <54F2F247-160C-3A22-A6E3-5D49655A67AB> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.fram ework/Versions/A/AE
    0x95cb0000 - 0x95e12ff3  com.apple.CFNetwork (673.0.3 - 673.0.3) <5E0E9AE8-073B-3F2B-B0C7-A0129DE787F6> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x95e13000 - 0x95e19ff7  com.apple.AOSNotification (1.7.0 - 760.3) <63F7E7F8-6FA3-38D3-9907-CDF360CA9354> /System/Library/PrivateFrameworks/AOSNotification.framework/Versions/A/AOSNotif ication
    0x95e1a000 - 0x95e27ff7  com.apple.HelpData (2.1.4 - 90) <5BACC236-5B40-33AC-B088-87EDEFAF1D3E> /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData
    0x95e29000 - 0x95f35fff  com.apple.ImageIO.framework (3.3.0 - 1038) <0B4A6607-9FBC-3A6C-984A-0542DE8385FB> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    0x95f36000 - 0x95f41ffb  libcommonCrypto.dylib (60049) <F8E60C43-22EE-3E0B-9546-3365056901F1> /usr/lib/system/libcommonCrypto.dylib
    0x95f5c000 - 0x95f66ff7  com.apple.speech.synthesis.framework (4.6.2 - 4.6.2) <16E20DCD-89F4-3C8E-9DBA-EED359807038> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x95f67000 - 0x95f9ffff  com.apple.LDAPFramework (2.4.28 - 194.5) <0C42A932-15E8-3CD1-AC35-1DF7D41B25A2> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
    0x95ff6000 - 0x961a2ff1  com.apple.QuartzCore (1.8 - 332.0) <07F9B77F-35A2-3D21-99FA-CD3FCE5B9C7B> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
    0x961a3000 - 0x961a4fff  libSystem.B.dylib (1197.1.1) <C58F0CC9-C1FD-3024-9358-D3359A6BBCAD> /usr/lib/libSystem.B.dylib
    0x961cb000 - 0x962b7ff7  libxml2.2.dylib (26) <32040145-6FD6-3AD2-B98B-39F73BF9AC47> /usr/lib/libxml2.2.dylib
    0x962b8000 - 0x962baffe  libCVMSPluginSupport.dylib (9.0.83) <BD30BDD1-DD5B-3F31-A09B-C274EA93CD7C> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginS upport.dylib
    0x962bb000 - 0x962bfffe  libCoreVMClient.dylib (58.1) <0EB8FFD7-AFED-3A63-810E-29629831D43D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClien t.dylib
    0x962c0000 - 0x962c5ff3  libsystem_platform.dylib (24.1.4) <875321B9-34EF-3FCC-880C-633FA05223F5> /usr/lib/system/libsystem_platform.dylib
    0x962c6000 - 0x962f7ffa  libsystem_m.dylib (3047.16) <28E614E8-7802-3E84-960A-AD4721EF10F7> /usr/lib/system/libsystem_m.dylib
    0x962f8000 - 0x962faff2  com.apple.EFILogin (2.0 - 2) <BC558029-74C0-3A69-B376-8F4CBF8C338F> /System/Library/PrivateFrameworks/EFILogin.framework/Versions/A/EFILogin
    0x96308000 - 0x9643fff3  com.apple.desktopservices (1.8 - 1.8) <4D853961-F911-3FE2-A7DF-3130EA1D8CEB> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
    0x96440000 - 0x96499ffa  libTIFF.dylib (1038) <691DAAFD-D72B-3BE9-AE5C-84AF86BE66CD> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    0x9649a000 - 0x964a3fff  libsystem_notify.dylib (121) <623269F5-1518-3035-A916-8AF83C972154> /usr/lib/system/libsystem_notify.dylib
    0x964a4000 - 0x964b2ff7  libz.1.dylib (53) <858B4D9F-D87E-3D81-B07A-DF9632BD185F> /usr/lib/libz.1.dylib
    0x964b3000 - 0x964b7fff  libheimdal-asn1.dylib (323.12) <9EA2A221-301B-3B9A-BBF2-38134145B5A8> /usr/lib/libheimdal-asn1.dylib
    0x964b8000 - 0x9682dff9  com.apple.HIToolbox (2.1 - 696) <43CB31D6-4C2B-30FA-A374-DB7C5728E7AD> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
    0x9682e000 - 0x9688cff7  com.apple.CoreUtils (1.9 - 190.4) <9E43FF7D-7FCD-3032-9EF9-BCF6D09E73C3> /System/Library/PrivateFrameworks/CoreUtils.framework/Versions/A/CoreUtils
    0x9688d000 - 0x968a5fff  com.apple.CFOpenDirectory (10.9 - 173.1.1) <630A5CCF-8FC3-379D-B0BD-41DCE1F0B624> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpen Directory.framework/Versions/A/CFOpenDirectory
    0x968a6000 - 0x968fbff7  com.apple.audio.CoreAudio (4.2.0 - 4.2.0) <0F1C111F-1E64-33BB-A69F-14643B3037D5> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x968fc000 - 0x96914ff7  libsystem_malloc.dylib (23.1.10) <69F485C9-B3E7-3E36-A06C-D7DFD29D22E1> /usr/lib/system/libsystem_malloc.dylib
    0x96915000 - 0x96d3afe3  com.apple.VideoToolbox (1.0 - 1273.29) <200BFEED-8948-3266-A2C4-1DC6A695EC58> /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
    0x96d3c000 - 0x96d8aff9  com.apple.HIServices (1.22 - 466) <30636237-408A-3552-90C1-1279348DF7CB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
    0x96d8b000 - 0x96d93ff7  libCGCMS.A.dylib (599.7) <A7404924-9A2B-3324-A934-BD08953E7098> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGCMS .A.dylib
    0x96d94000 - 0x96daeff7  com.apple.GenerationalStorage (2.0 - 160.2) <8755F7F1-2402-387C-A32A-2270E7D680C8> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/Gene rationalStorage
    0x96daf000 - 0x96de4ffd  libssl.0.9.8.dylib (50) <F3BEA2DF-DB84-37F0-B4C7-97C0A4DF19C9> /usr/lib/libssl.0.9.8.dylib
    0x96de5000 - 0x96e4fff7  com.apple.framework.CoreWiFi (2.0 - 200.21.1) <13EE6C12-B981-3132-864A-D493B91AE37E> /System/Library/Frameworks/CoreWiFi.framework/Versions/A/CoreWiFi
    0x96e50000 - 0x96e54fff  com.apple.CommonPanels (1.2.6 - 96) <E7CA63C6-CEE9-3F0A-93A7-C12C653FFB80> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
    0x96e55000 - 0x96eecff7  com.apple.ink.framework (10.9 - 207) <EF00BCCB-B270-3F3D-9424-EF5F4BC23E25> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework /Versions/A/Ink
    0x96eed000 - 0x96f42fff  libc++.1.dylib (120) <10C0A136-64F9-3CC2-9420-013247032120> /usr/lib/libc++.1.dylib
    0x96f43000 - 0x96f4cfff  com.apple.audio.SoundManager (4.1 - 4.1) <68B7CEB7-AF09-3E24-8548-6ABF065B5186> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.f ramework/Versions/A/CarbonSound
    0x96f52000 - 0x96f84ff7  libTrueTypeScaler.dylib (111.1) <A568EE4C-1588-3F8B-8640-F02CEFC5AF09> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib
    0x96f85000 - 0x96fc3ff7  com.apple.NavigationServices (3.8 - 215) <A093AAF0-248E-313E-BA82-01F69E269895> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationSer vices.framework/Versions/A/NavigationServices
    0x96fc4000 - 0x96fd6fff  libbsm.0.dylib (33) <1BE92DB5-0D2F-3BB5-BCC6-8A71EF2A3450> /usr/lib/libbsm.0.dylib
    0x96fd7000 - 0x97038ff7  com.apple.Symbolication (1.4 - 129) <E5948C08-6ADF-3D86-9134-6AE49CF1DA0F> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolicat ion
    0x97039000 - 0x97039fff  libkeymgr.dylib (28) <1B097DEA-011E-3B1C-86D5-6C7FAD5C765A> /usr/lib/system/libkeymgr.dylib
    0x9703a000 - 0x97062ff7  libRIP.A.dylib (599.7) <461297C0-DDA9-3613-8F27-D7F1AC57208F> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A .dylib
    0x97063000 - 0x9709fff4  com.apple.RemoteViewServices (2.0 - 94) <BEEE6ADF-7DA3-3D68-BCB0-9863BE1A1F46> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/Remot eViewServices
    0x970a0000 - 0x970a5ff7  com.apple.print.framework.Print (9.0 - 260) <A6C465F6-C5D1-353A-9F33-19B9CEDBBC2A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
    0x970a6000 - 0x970a8ffe  com.apple.QuickTimeH264.component (7.7.3 - 2826.0.1) <B9186887-D8F0-3FF6-A5DD-5A037B453F2B> /System/Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264
    0x970a9000 - 0x970b5ffc  libbz2.1.0.dylib (29) <3CEF1E92-BA42-3F8A-8E8D-9E1F7658E5C7> /usr/lib/libbz2.1.0.dylib
    0x970b6000 - 0x970b9ffb  libutil.dylib (34) <B496031E-E763-3DEB-84D2-85C0F3DF2012> /usr/lib/libutil.dylib
    0x970ba000 - 0x97210ff0  libBLAS.dylib (1094.5) <74310C2F-4FDB-3995-A01A-5AFB83010A43> /Syst

    Looks like the same error I am getting. Have installed Java for OSX and other drivers but still no luck
    Really need to get Dreamweaver wooking again as clients are awaiting web site updates and upgrades.
    The problem started after i installed the newest OSX
    Fireworks and Illustrator are fine but Dreamweaver keeps crashing

  • Odd behavior when using custom Composite/CompositeContext and antialiasing

    Hi,
    I created a custom Composite/CompositeContext class and when I use it with antialiasing it causes a black bar to appear. I seems it has nothing to do with the compose() code but just that fact that I set my own Composite object. The submitted code will show you what I mean. There are 3 check boxes 1) allows to use the custom Composite object, 2) allows to ignore the compose() code in the CompositeContext and 3) toggles the antialiasing flag in the rendering hints. When the antialiasing flag is set and the Composite object is used the bar appears regardless of if the compose() method is executed or not. If the Composite object is not used the bar goes away.
    The Composite/CompositeContext class performs clipping and gradient paint using a Ellipse2D.Float instance.
    a) When the Composite is not used the code does a rectangular fill.
    b) When the Composite is used it should clip the rectangular fill to only the inside of a circle and do a gradient merge of background color and current color.
    c) If the compose() method is ignored then only the background is painted.
    d) When antialiasing is turned on the black bar appears, i) if you ignore the compose() method it remains, ii) if you do not use the Composite object the bar disappears (???)
    NOTE: the compose method's code is only for illustration purposes, I know that AlphaComposite, clipping and/or Gradient paint can be used to do what the example does. What I am trying to find out is why the fact of simply using my Composite object with antialiasing will cause the odd behavior.  Been trying to figure it out but haven't, any help is appreciated.
    Thx.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                for(int sy = src.getMinY(); sy < src.getMinY() + src.getHeight(); sy++) {
                    for(int sx = src.getMinX(); sx < src.getMinX() + src.getWidth(); sx++) {
                        int cx = sx - dstOut.getSampleModelTranslateX();
                        int cy = sy - dstOut.getSampleModelTranslateY();
                        if(!clippingShape.contains(cx, cy)) continue;
                        srcPixel = src.getPixel(sx, sy, srcPixel);
                        int ox = dstOut.getMinX() + sx - src.getMinX();
                        int oy = dstOut.getMinY() + sy - src.getMinY();
                        if(ox < dstOut.getMinX() || ox >= dstOut.getMinX() + dstOut.getWidth()) continue;
                        if(oy < dstOut.getMinY() || oy >= dstOut.getMinY() + dstOut.getHeight()) continue;
                        dstPixel = dstIn.getPixel(ox, oy, dstPixel);
                        float mergeFactor = 1.0f * (cy - 100) / 100;
                        dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                        dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                        dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                        dstOut.setPixel(ox, oy, dstPixel);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

    I got a better version to work as expected. Though there will probably be issues with the transformation to display coordinates as mentioned before. At least figured out some of the kinks of using a custom Composite/CompositeContext object.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
    //            dumpRaster("SRC   ", src);
    //            dumpRaster("DSTIN ", dstIn);
    //            dumpRaster("DSTOUT", dstOut);
    //            System.out.println();
                if(dstIn != dstOut)
                    dstOut.setDataElements(0, 0, dstIn);
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                int w = Math.min(src.getWidth(), dstIn.getWidth());
                int h = Math.min(src.getHeight(), dstIn.getHeight());
                int xMax = src.getMinX() + w;
                int yMax = src.getMinY() + h;
                for(int x = src.getMinX(); x < xMax; x++) {
                    for(int y = src.getMinY(); y < yMax; y++) {
                        try {
                            // THIS MIGHT NOT WORK ALL THE TIME
                            int cx = x - dstIn.getSampleModelTranslateX();
                            int cy = y - dstIn.getSampleModelTranslateY();
                            if(!clippingShape.contains(cx, cy)) {
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                dstOut.setPixel(x, y, dstPixel);
                            else {
                                srcPixel = src.getPixel(x, y, srcPixel);
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                float mergeFactor = 1.0f * (cy - 100) / 100;
                                dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                                dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                                dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                                dstOut.setPixel(x, y, dstPixel);
                        catch(Throwable t) {
                            System.out.println(t.getMessage() + " x=" + x + " y=" + y);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            protected void dumpRaster(String lbl,
                                      Raster raster) {
                System.out.print(lbl + ":");
                System.out.print(" mx=" + format(raster.getMinX()));
                System.out.print(" my=" + format(raster.getMinY()));
                System.out.print(" rw=" + format(raster.getWidth()));
                System.out.print(" rh=" + format(raster.getHeight()));
                System.out.print(" tx=" + format(raster.getSampleModelTranslateX()));
                System.out.print(" ty=" + format(raster.getSampleModelTranslateY()));
                System.out.print(" sm=" + raster.getSampleModel().getClass().getName());
                System.out.println();
            protected String format(int value) {
                String txt = Integer.toString(value);
                while(txt.length() < 4)
                    txt = " " + txt;
                return txt;
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

  • Application works from NB but not from jar

    Hi,
    I'am programming a game in JAVA and this going as planned. Everything works when I run it from NetBeans, but when I execute the jar file from the console, then I get hunderds of the same exception.
    I really don't know what it is, I see a NoSuchMethod exception in the MouseEvent of the method getLocationOnScreen(), but just as i said, the app works fine without errors from out NB.
    Does somebody knows what the problem is?
    thx Sven
    java -jar Hotel.jar
    Loading board images.
    Loading image: /Images/bg-patern-hotel.jpg
    Opening file /Images/bg-patern-hotel.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/bg-patern-hotel.jpg]
    Loading image: /Images/Main-board-big.jpg
    Opening file /Images/Main-board-big.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/Main-board-big.jpg]
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: java.awt.event.MouseEvent.getLocationOnScreen()Ljava/awt/Point;
         at Engine.GameAction.setMousePos(GameAction.java:137)
         at Engine.InputManager.mouseMoved(InputManager.java:277)
         at java.awt.Component.processMouseMotionEvent(Component.java:5647)
         at java.awt.Component.processEvent(Component.java:5371)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Window.processEvent(Window.java:1184)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Same error goes 50 times more.Edited by: Svenmeister on Apr 16, 2010 7:22 AM
    Edited by: Svenmeister on Apr 16, 2010 7:22 AM

    Ok, I updated my Mac but still got the 1.5.0_22 crap so I changed the function from the mouseEvent to one that 1.5 supports.
    But now when I run the application from the console the Exception about the mouse function is gone, but I got another exception instead of it. And this one is I believe not JRE version relevant.
    The error is in the loading of the images, at the third PNG image to be precise. The images are now in total 10.8MB in size.
    So is this also a 1.6 thing? Would be awesome if someone can explain it.
    java -jar Hotel.jar Loading board images.
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:469)
         at apple.awt.OSXImageRepresentation.setPixels(OSXImageRepresentation.java:66)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.PNGImageDecoder.sendPixels(PNGImageDecoder.java:498)
         at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:419)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at java.awt.image.BufferedImage.<init>(BufferedImage.java:345)
         at apple.awt.CGraphicsConfig.createCompatibleImage(CGraphicsConfig.java:174)
         at GUI.Board.toBufferedImage(Board.java:1472)
         at GUI.Board.loadImages(Board.java:1143)
         at Engine.HotelMain.switchState(HotelMain.java:86)
         at Engine.HotelMain.<init>(HotelMain.java:57)
         at Engine.HotelMain.main(HotelMain.java:194)Edited by: Svenmeister on Apr 16, 2010 11:01 AM

  • How do i pass a variable in flex

    i've been looking all over google for how to pass a variable yet
    i've come up empty handed
    i have a C code and as3
    i've never been able to get a C program to compile on my own, this is from a tutorial im trying to understand about raycasting
    from what i can gather i think that the variables are passed threw this
    #######raycaster.c##########
    AS3_Val loop( void* self, AS3_Val args )
        AS3_ArrayValue(args,"IntType,IntType,IntType,IntType",&K_UP,&K_DOWN,&K_LEFT,&K_RIGHT);
        CastRay();
        int opos,j,i,jpos;
        for(j=0; j < resY; j++ ){
            jpos = resX*j;
            for(i=0; i < resX; i++ ){
                opos = (jpos+i);
                tBuffer[opos] = buffer[i][j];
            }//end of for
        }//end of for
        return 0;
    }//end of loop
    however not one of the values inside of AS3_ArrayValue is to be found on the Main.as
    this is the only function that comunicates with the C code, but i could be wrong
    ####Main.as######
            private function enterFrame(event:Event):void {
                alcRCLib.loop(upKey,downKey,leftKey,rightKey);
                alchemyMemory.position=alcScreenBufferPointer;
                screenBitmapData.setPixels(screenBitmapData.rect,alchemyMemory);
    the reason i want to do this, other than to know how, because that would be useful above all else, i've already written a as3 that comunicates with php
    to get a array of images  for a topdown game, and i wouldn't know how to load these variables to C from a HTTP request but if i can get flash to tell c what they are then every thing worked out
    heres both codes in full
    #####Main.as####
    *Alchemy Ray Caster
    *April 6, 2010
    *Bruce Jawn
    *http://bruce-lab.blogspot.com
    *Copyright (c) <2010> <Bruce Jawn>
    *This software is released under the MIT License
    *<http://www.opensource.org/licenses/mit-license.php>
    package {
    //    import cmodule.Ray_Caster._worldMap;
    //    import cmodule.Ray_Caster._worldMap;
        import cmodule.Ray_Caster.CLibInit;
    //    import cmodule.Ray_Caster.TextFieldI;
        import flash.display.*;
        import flash.text.*;
        import flash.events.*;
        import flash.geom.*;
        import flash.text.engine.TextBlock;
        import flash.text.engine.TextLine;
        import flash.text.TextField;
        import flash.utils.*;
        import flash.ui.*;
        [SWF(width="840", height="880")]
        public class Main extends Sprite {
            [Embed(source="../wolftex/barrel.png")]
            public static var barrelClass:Class;
            [Embed(source="../wolftex/bluestone.png")]
            public static var bluestoneClass:Class;
            [Embed(source="../wolftex/colorstone.png")]
            public static var colorstoneClass:Class;
            [Embed(source="../wolftex/eagle.png")]
            public static var eagleClass:Class;
            [Embed(source="../wolftex/greenlight.png")]
            public static var greenlightClass:Class;
            [Embed(source="../wolftex/greystone.png")]
            public static var greystoneClass:Class;
            [Embed(source="../wolftex/mossy.png")]
            public static var mossyClass:Class;
            [Embed(source="../wolftex/pillar.png")]
            public static var pillarClass:Class;
            [Embed(source="../wolftex/purplestone.png")]
            public static var purplestoneClass:Class;
            [Embed(source="../wolftex/redbrick.png")]
            public static var redbrickClass:Class;
            [Embed(source="../wolftex/wood.png")]
            public static var woodClass:Class;
            //Array to hold all the textures
            private var texs:Array=[];
            private var worldMap:Array = [];
            //private var worldMap[1]:Array=[];
            private static const SCREEN_WIDTH:int=640;
            private static const SCREEN_HEIGHT:int=480;
            private var screenBitmapData:BitmapData;
            private var screenBitmap:Bitmap;
            private var alchemyMemory:ByteArray;
            private var alcRCLib:Object;
            private var cLibInit:CLibInit;
            private var alcScreenBufferPointer:uint;
            private var alcTexPointer:uint;
            private var upKey:int=0;
            private var downKey:int=0;
            private var leftKey:int=0;
            private var rightKey:int=0;
            private var a:flash.text.TextField;
            public function Main() {
                stage.frameRate=60;
                stage.align=StageAlign.TOP_LEFT;
                stage.scaleMode=StageScaleMode.NO_SCALE;
                stage.fullScreenSourceRect=new Rectangle(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
                init();
                }//end of function Main
            private function init():void {
                initBitmaps();
                initAlchemy();
                initRendering();
            }//end of function init
            private function initBitmaps():void {
                texs.push(prepareBitmapData(new eagleClass().bitmapData  ));
                texs.push(prepareBitmapData(new redbrickClass().bitmapData  ));
                texs.push(prepareBitmapData(new purplestoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new greystoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new bluestoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new mossyClass().bitmapData  ));
                texs.push(prepareBitmapData(new woodClass().bitmapData  ));
                texs.push(prepareBitmapData(new colorstoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new barrelClass().bitmapData  ));
                texs.push(prepareBitmapData(new pillarClass().bitmapData  ));
                texs.push(prepareBitmapData(new greenlightClass().bitmapData  ));
                screenBitmapData=new BitmapData(SCREEN_WIDTH,SCREEN_HEIGHT,false,0);
                screenBitmap=new Bitmap(screenBitmapData);
                addChild(screenBitmap);
                worldMap[1] = (1,2,3,4);
                worldMap[2] = (1,2,3,4);
                worldMap[3] = (1,2,3,4);
                worldMap[4] = (1,2,3,4);
                worldMap[5] = (1,2,3,4);
                worldMap[6] = (1,2,3,4);
                worldMap[7] = (1,2,3,4);
                }//end of function initBitmaps
            //Prepare the bitmap once to take into account the lower-endianess of the alchemy code.
            private function prepareBitmapData(sourceMap:BitmapData):BitmapData {
                var outBitmapData:BitmapData=sourceMap.clone();
                outBitmapData=new BitmapData(outBitmapData.width,outBitmapData.height,true,0xFF000000);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.ALPHA,BitmapDataChannel.BLUE);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.RED,BitmapDataChannel.GREEN);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.GREEN,BitmapDataChannel.RED);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.BLUE,BitmapDataChannel.ALPHA);
                return outBitmapData;
            }//end of function prepareBitmapData
            private function initAlchemy():void {
                cLibInit=new CLibInit  ;
                alcRCLib=cLibInit.init();
                //Retrieve the "Alchemy Memory".
                var ns:Namespace=new Namespace("cmodule.Ray_Caster");
                alchemyMemory=ns::gstate.ds;
                //Allocate the buffers in Alchemy.
                alcScreenBufferPointer=alcRCLib.initializeScreenBuffer(SCREEN_WIDTH,SCREEN_HEIGHT);//Setu p a screenbuffer of size x,y;
                //Copy the textures to alchemy memory.
                for (var i:int=0; i<11; i++) {
                    var ba:ByteArray=texs[i].getPixels(texs[i].rect);
                    alcTexPointer=alcRCLib.initializeTexBuffer(i);
                    alchemyMemory.position=alcTexPointer;
                    alchemyMemory.writeBytes(ba,0,ba.length);
                }//end of for
            }//end of function initAlchemy
            private function initRendering():void {
                stage.addEventListener(KeyboardEvent.KEY_DOWN,key_pressed);
                stage.addEventListener(KeyboardEvent.KEY_UP,key_released);
                addEventListener(Event.ENTER_FRAME,enterFrame);
            }//end of function initRendering
            private function enterFrame(event:Event):void {
                alcRCLib.loop(upKey,downKey,leftKey,rightKey);
                alchemyMemory.position=alcScreenBufferPointer;
                screenBitmapData.setPixels(screenBitmapData.rect,alchemyMemory);
                }//end of function enterFrame
            private function key_pressed(e:KeyboardEvent):void {
                switch (e.keyCode) {
                    case Keyboard.UP :
                        upKey=1;
                        break;
                    case Keyboard.DOWN :
                        downKey=1;
                        break;
                    case Keyboard.LEFT :
                        leftKey=1;
                        break;
                    case Keyboard.RIGHT :
                        rightKey=1;
                        break;
                }//end of switch
                }//end of function key_pressed
            private function key_released(e:KeyboardEvent):void {
                switch (e.keyCode) {
                    case Keyboard.UP :
                        upKey=0;
                        break;
                    case Keyboard.DOWN :
                        downKey=0;
                        break;
                    case Keyboard.LEFT :
                        leftKey=0;
                        break;
                    case Keyboard.RIGHT :
                        rightKey=0;
                        break;               
                        }//end of switch
                }//end of function key_released
                }//end of class
    }//end of package
    ###raycaster####
    //Raycasting Engine from Lode's Computer Graphics Tutorial
    //http://www.student.kuleuven.be/~m0216922/CG/raycasting.html
    //Modified for Alchemy by Bruce Jawn
    //http://bruce-lab.blogspot.com
    #include "AS3.h"
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    //============================================================
    //============================================================
    enum bool {false=0,true=!false};
    #define screenWidth 1640
    #define screenHeight 1480
    #define texWidth 64
    #define texHeight 64
    #define mapWidth 24
    #define mapHeight 24
    //1D Screen Buffer
    int* tBuffer;
    int resX = 0;
    int resY = 0;
    //2D Screen Buffer
    int buffer[screenWidth][screenHeight];
    //1D Zbuffer
    double ZBuffer[screenWidth];
    //============================================================
    //============================================================
    //textures
    int texture[11][texWidth*texHeight];
    #define numSprites 19
    //arrays used to sort the sprites
    int spriteOrder[numSprites];
    double spriteDistance[numSprites];
    struct SSprite
      double x;
      double y;
      int texture;
    struct SSprite sprite[numSprites]=
      //green light in front of playerstart
      {20.5, 11.5, 10},
      //green lights in every room
      {18.5,4.5, 10},
      {10.0,4.5, 10},
      {10.0,12.5,10},
      {3.5, 6.5, 10},
      {3.5, 20.5,10},
      {3.5, 14.5,10},
      {14.5,20.5,10},
      //row of pillars in front of wall: fisheye test
      {18.5, 10.5, 9},
      {18.5, 11.5, 9},
      {18.5, 12.5, 9},
      //some barrels around the map
      {21.5, 1.5, 8},
      {15.5, 1.5, 8},
      {16.0, 1.8, 8},
      {16.2, 1.2, 8},
      {3.5,  2.5, 8},
      {9.5, 15.5, 8},
      {10.0, 15.1,8},
      {10.5, 15.8,8},
    //============================================================
    //============================================================
    //map
    int worldMap[mapWidth][mapHeight] =
      {8,8,8,8,8,8,8,8,8,8,8,4,4,6,4,4,6,4,6,4,4,4,6,4},
      {8,0,0,0,0,0,0,0,0,0,8,4,0,0,0,0,0,0,0,0,0,0,0,4},
      {8,0,3,3,0,0,0,0,0,8,8,4,0,0,0,0,0,0,0,0,0,0,0,6},
      {8,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
      {8,0,3,3,0,0,0,0,0,8,8,4,0,0,0,0,0,0,0,0,0,0,0,4},
      {8,0,0,0,0,0,0,0,0,0,8,4,0,0,0,0,0,6,6,6,0,6,4,6},
      {8,8,8,8,0,8,8,8,8,8,8,4,4,4,4,4,4,6,0,0,0,0,0,6},
      {7,7,7,7,0,7,7,7,7,0,8,0,8,0,8,0,8,4,0,4,0,6,0,6},
      {7,7,0,0,0,0,0,0,7,8,0,8,0,8,0,8,8,6,0,0,0,0,0,6},
      {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,0,0,0,4},
      {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,6,0,6,0,6},
      {7,7,0,0,0,0,0,0,7,8,0,8,0,8,0,8,8,6,4,6,0,6,6,6},
      {7,7,7,7,0,7,7,7,7,8,8,4,0,6,8,4,8,3,3,3,0,3,3,3},
      {2,2,2,2,0,2,2,2,2,4,6,4,0,0,6,0,6,3,0,0,0,0,0,3},
      {2,2,0,0,0,0,0,2,2,4,0,0,0,0,0,0,4,3,0,0,0,0,0,3},
      {2,0,0,0,0,0,0,0,2,4,0,0,0,0,0,0,4,3,0,0,0,0,0,3},
      {1,0,0,0,0,0,0,0,1,4,4,4,4,4,6,0,6,3,3,0,0,0,3,3},
      {2,0,0,0,0,0,0,0,2,2,2,1,2,2,2,6,6,0,0,5,0,5,0,5},
      {2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,0,5,0,5,0,0,0,5,5},
      {2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,5,0,5,0,5,0,5,0,5},
      {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
      {2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,5,0,5,0,5,0,5,0,5},
      {2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,0,5,0,5,0,0,0,5,5},
      {2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,5,5,5,5,5,5,5,5,5}
    //============================================================
    //============================================================
    double posX = 22.0, posY = 11.5; //x and y start position
    double dirX = -1.0, dirY = 0.0; //initial direction vector
    double planeX = 0.0, planeY = 0.66; //the 2d raycaster version of camera plane
    int K_LEFT=0;
    int K_RIGHT=0;
    int K_UP=0;
    int K_DOWN=0;
    //speed modifiers
    double moveSpeed =  .30; //the constant value is in squares/second
    double rotSpeed =   .20; //the constant value is in radians/second
    //============================================================
    //============================================================
    AS3_Val initializeScreenBuffer(void* self, AS3_Val args)
        AS3_ArrayValue(args, "IntType, IntType", &resX, &resY);
        tBuffer = malloc( resX * resY * sizeof(int) );
        return AS3_Ptr( tBuffer );
    }//end of initializeScreenBuffer
    //used to load some textures & sprite textures
    AS3_Val initializeTexBuffer(void* self, AS3_Val args)
        int index;
        AS3_ArrayValue(args, "IntType", &index);
        return AS3_Ptr( texture[index] );
    }//end of initializeTexBuffer
    //start the main loop
    AS3_Val loop( void* self, AS3_Val args )
        AS3_ArrayValue(args,"IntType,IntType,IntType,IntType",&K_UP,&K_DOWN,&K_LEFT,&K_RIGHT);
        CastRay();
        int opos,j,i,jpos;
        for(j=0; j < resY; j++ ){
            jpos = resX*j;
            for(i=0; i < resX; i++ ){
                opos = (jpos+i);
                tBuffer[opos] = buffer[i][j];
            }//end of for
        }//end of for
        return 0;
    }//end of loop
    int main()
        AS3_Val initializeScreenBufferMethod = AS3_Function( NULL,initializeScreenBuffer );
        AS3_Val loopMethod = AS3_Function( NULL,loop );
        AS3_Val initializeTexBufferMethod = AS3_Function( NULL,initializeTexBuffer );
        AS3_Val result = AS3_Object("initializeScreenBuffer:AS3ValType,loop:AS3ValType,initializeTexBuffer:AS3ValT ype"
                                    ,initializeScreenBufferMethod,loopMethod,initializeTexBufferMethod);
        AS3_Release( initializeScreenBufferMethod );
        AS3_Release( loopMethod );
        AS3_Release( initializeTexBufferMethod );
        AS3_LibInit( result );
        return 0;
    }//end of main
    //================================================================
    //================================================================
    void CastRay()
        printf ("Hello World!\n");
        int x;
        int y;
        int w=screenWidth;
        int h=screenHeight;
        for( x = 0; x < screenWidth; x++) for( y = 0; y < screenHeight; y++) {buffer[x][y] = 0;} //clear the buffer instead of cls()
        for(x = 0; x < w; x++)
          //calculate ray position and direction
          double cameraX = 2 * x / (double)(w) - 1; //x-coordinate in camera space    
          double rayPosX = posX;
          double rayPosY = posY;
          double rayDirX = dirX + planeX * cameraX;
          double rayDirY = dirY + planeY * cameraX;
          //which box of the map we're in 
          int mapX = (int)(rayPosX);
          int mapY = (int)(rayPosY);
          //length of ray from current position to next x or y-side
          double sideDistX;
          double sideDistY;
          //length of ray from one x or y-side to next x or y-side
          double deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX));
          double deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY));
          double perpWallDist;
          //what direction to step in x or y-direction (either +1 or -1)
          int stepX;
          int stepY;
          int hit = 0; //was there a wall hit?
          int side; //was a NS or a EW wall hit?
          //calculate step and initial sideDist
          if (rayDirX < 0)
            stepX = -1;
            sideDistX = (rayPosX - mapX) * deltaDistX;
          }//end of if (rayDirX < 0)
          else
            stepX = 1;
            sideDistX = (mapX + 1.0 - rayPosX) * deltaDistX;
          }//end of else
          if (rayDirY < 0)
            stepY = -1;
            sideDistY = (rayPosY - mapY) * deltaDistY;
          }//end of if (rayDirY < 0)
          else
            stepY = 1;
            sideDistY = (mapY + 1.0 - rayPosY) * deltaDistY;
          }//end of else
          //perform DDA
          while (hit == 0)
            //jump to next map square, OR in x-direction, OR in y-direction
            if (sideDistX < sideDistY)
              sideDistX += deltaDistX;
              mapX += stepX;
              side = 0;
            }//end of if (sideDistX < sideDistY)
            else
              sideDistY += deltaDistY;
              mapY += stepY;
              side = 1;
            }//end of else
            //Check if ray has hit a wall      
            if (worldMap[mapX][mapY] > 0) hit = 1;
          }//end of while (hit == 0)
          //Calculate distance of perpendicular ray (oblique distance will give fisheye effect!)   
          if (side == 0) perpWallDist = fabs((mapX - rayPosX + (1 - stepX) / 2) / rayDirX);
          else       perpWallDist = fabs((mapY - rayPosY + (1 - stepY) / 2) / rayDirY);
          //Calculate height of line to draw on screen      
          int lineHeight = abs((int)(h / perpWallDist));
          //calculate lowest and highest pixel to fill in current stripe
          int drawStart = -lineHeight / 2 + h / 2;
          if(drawStart < 0) drawStart = 0;
          int drawEnd = lineHeight / 2 + h / 2;
          if(drawEnd >= h) drawEnd = h - 1;
          //texturing calculations
          int texNum = worldMap[mapX][mapY] - 1; //1 subtracted from it so that texture 0 can be used!
          //calculate value of wallX
          double wallX; //where exactly the wall was hit
          if (side == 1) wallX = rayPosX + ((mapY - rayPosY + (1 - stepY) / 2) / rayDirY) * rayDirX;
          else       wallX = rayPosY + ((mapX - rayPosX + (1 - stepX) / 2) / rayDirX) * rayDirY;
          wallX -= floor((wallX));
          //x coordinate on the texture
          int texX = (int)(wallX * (double)(texWidth));
          if(side == 0 && rayDirX > 0) texX = texWidth - texX - 1;
          if(side == 1 && rayDirY < 0) texX = texWidth - texX - 1;
          int y;
          for(y = drawStart; y < drawEnd; y++)
            int d = y * 256 - h * 128 + lineHeight * 128; //256 and 128 factors to avoid floats
            int texY = ((d * texHeight) / lineHeight) / 256;
            int color = texture[texNum][texWidth * texY + texX];
            //make color darker for y-sides: R, G and B byte each divided through two with a "shift" and an "and"
            if(side == 1) color = (color >> 1) & 8355711;
            buffer[x][y] = color;
          }//end of for(y = drawStart; y < drawEnd; y++)
          //SET THE ZBUFFER FOR THE SPRITE CASTING
          ZBuffer[x] = perpWallDist; //perpendicular distance is used
          //FLOOR CASTING
          double floorXWall, floorYWall; //x, y position of the floor texel at the bottom of the wall
          //4 different wall directions possible
          if(side == 0 && rayDirX > 0)
            floorXWall = mapX;
            floorYWall = mapY + wallX;
          }//end of if(side == 0 && rayDirX > 0)
          else if(side == 0 && rayDirX < 0)
            floorXWall = mapX + 1.0;
            floorYWall = mapY + wallX;
          }//end of else if(side == 0 && rayDirX < 0)
          else if(side == 1 && rayDirY > 0)
            floorXWall = mapX + wallX;
            floorYWall = mapY;
          }//end of else if(side == 1 && rayDirY > 0)
          else
            floorXWall = mapX + wallX;
            floorYWall = mapY + 1.0;
          }//end of else
          double distWall, distPlayer, currentDist;
          distWall = perpWallDist;
          distPlayer = 0.0;
          if (drawEnd < 0) drawEnd = h; //becomes < 0 when the integer overflows
          //draw the floor from drawEnd to the bottom of the screen
          for(y = drawEnd + 1; y < h; y++)
            currentDist = h / (2.0 * y - h); //you could make a small lookup table for this instead
            double weight = (currentDist - distPlayer) / (distWall - distPlayer);
            double currentFloorX = weight * floorXWall + (1.0 - weight) * posX;
            double currentFloorY = weight * floorYWall + (1.0 - weight) * posY;
            int floorTexX, floorTexY;
            floorTexX = (int)(currentFloorX * texWidth) % texWidth;
            floorTexY = (int)(currentFloorY * texHeight) % texHeight;
            //floor
            buffer[x][y] = (texture[3][texWidth * floorTexY + floorTexX] >> 1) & 8355711;
            //ceiling (symmetrical!)
            buffer[x][h - y] = texture[6][texWidth * floorTexY + floorTexX];
          }//end of for(y = drawEnd + 1; y < h; y++)
        }//end of for(x = 0; x < w; x++)
        //SPRITE CASTING
        //sort sprites from far to close
        int i;
        for(i = 0; i < numSprites; i++)
          spriteOrder[i] = i;
          spriteDistance[i] = ((posX - sprite[i].x) * (posX - sprite[i].x) + (posY - sprite[i].y) * (posY - sprite[i].y)); //sqrt not taken, unneeded
        }//end of for(i = 0; i < numSprites; i++)
        combSort(spriteOrder, spriteDistance, numSprites);
        //after sorting the sprites, do the projection and draw them
        for(i = 0; i < numSprites; i++)
          //translate sprite position to relative to camera
          double spriteX = sprite[spriteOrder[i]].x - posX;
          double spriteY = sprite[spriteOrder[i]].y - posY;
          //transform sprite with the inverse camera matrix
          // [ planeX   dirX ] -1                                       [ dirY      -dirX ]
          // [               ]       =  1/(planeX*dirY-dirX*planeY) *   [                 ]
          // [ planeY   dirY ]                                          [ -planeY  planeX ]
          double invDet = 1.0 / (planeX * dirY - dirX * planeY); //required for correct matrix multiplication
          double transformX = invDet * (dirY * spriteX - dirX * spriteY);
          double transformY = invDet * (-planeY * spriteX + planeX * spriteY); //this is actually the depth inside the screen, that what Z is in 3D      
          int spriteScreenX = (int)((w / 2) * (1 + transformX / transformY));
          //parameters for scaling and moving the sprites
          #define uDiv 1
          #define vDiv 1
          #define vMove 0.0
          int vMoveScreen = (int)(vMove / transformY);
          //calculate height of the sprite on screen
          int spriteHeight = abs((int)(h / (transformY))) / vDiv; //using "transformY" instead of the real distance prevents fisheye
          //calculate lowest and highest pixel to fill in current stripe
          int drawStartY = -spriteHeight / 2 + h / 2 + vMoveScreen;
          if(drawStartY < 0) drawStartY = 0;
          int drawEndY = spriteHeight / 2 + h / 2 + vMoveScreen;
          if(drawEndY >= h) drawEndY = h - 1;
          //calculate width of the sprite
          int spriteWidth = abs( (int) (h / (transformY))) / uDiv;
          int drawStartX = -spriteWidth / 2 + spriteScreenX;
          if(drawStartX < 0) drawStartX = 0;
          int drawEndX = spriteWidth / 2 + spriteScreenX;
          if(drawEndX >= w) drawEndX = w - 1;
          //loop through every vertical stripe of the sprite on screen
          int stripe;
          for(stripe = drawStartX; stripe < drawEndX; stripe++)
            int texX = (int)(256 * (stripe - (-spriteWidth / 2 + spriteScreenX)) * texWidth / spriteWidth) / 256;
            //the conditions in the if are:
            //1) it's in front of camera plane so you don't see things behind you
            //2) it's on the screen (left)
            //3) it's on the screen (right)
            //4) ZBuffer, with perpendicular distance
            int y;
            if(transformY > 0 && stripe > 0 && stripe < w && transformY < ZBuffer[stripe])
            for(y = drawStartY; y < drawEndY; y++) //for every pixel of the current stripe
              int d = (y-vMoveScreen) * 256 - h * 128 + spriteHeight * 128; //256 and 128 factors to avoid floats
              int texY = ((d * texHeight) / spriteHeight) / 256;
              unsigned int color = texture[sprite[spriteOrder[i]].texture][texWidth * texY + texX]; //get current color from the texture//??????????????????
              if((color & 0x00FFFFFF) != 0) buffer[stripe][y] = color; //paint pixel if it isn't black, black is the invisible color
            }//end of for(y = drawStartY; y < drawEndY; y++)
          }//end of for(stripe = drawStartX; stripe < drawEndX; stripe++)
        }//end of for(i = 0; i < numSprites; i++)
        //readKeys
        //move forward if no wall in front of you
        if (K_UP)
          if(worldMap[(int)(posX + dirX * moveSpeed)][(int)(posY)] == false) posX += dirX * moveSpeed;
          if(worldMap[(int)(posX)][(int)(posY + dirY * moveSpeed)] == false) posY += dirY * moveSpeed;
        }//end of if (K_UP)
        //move backwards if no wall behind you
        if (K_DOWN)
          if(worldMap[(int)(posX - dirX * moveSpeed)][(int)(posY)] == false) posX -= dirX * moveSpeed;
          if(worldMap[(int)(posX)][(int)(posY - dirY * moveSpeed)] == false) posY -= dirY * moveSpeed;
        }//end of if (K_DOWN)
        //rotate to the right
        if (K_RIGHT)
          //both camera direction and camera plane must be rotated
          double oldDirX = dirX;
          dirX = dirX * cos(-rotSpeed) - dirY * sin(-rotSpeed);
          dirY = oldDirX * sin(-rotSpeed) + dirY * cos(-rotSpeed);
          double oldPlaneX = planeX;
          planeX = planeX * cos(-rotSpeed) - planeY * sin(-rotSpeed);
          planeY = oldPlaneX * sin(-rotSpeed) + planeY * cos(-rotSpeed);
        }//end of if (K_RIGHT)
        //rotate to the left
        if (K_LEFT)
          //both camera direction and camera plane must be rotated
          double oldDirX = dirX;
          dirX = dirX * cos(rotSpeed) - dirY * sin(rotSpeed);
          dirY = oldDirX * sin(rotSpeed) + dirY * cos(rotSpeed);
          double oldPlaneX = planeX;
          planeX = planeX * cos(rotSpeed) - planeY * sin(rotSpeed);
          planeY = oldPlaneX * sin(rotSpeed) + planeY * cos(rotSpeed);
        }//end of if (K_LEFT)
    }//end of CastRay
    //sort algorithm
    void combSort(int* order, double* dist, int amount)
      int gap = amount;
      enum bool swapped = false;
      while(gap > 1 || swapped)
        //shrink factor 1.3
        gap = (gap * 10) / 13;
        if(gap == 9 || gap == 10) gap = 11;
        if (gap < 1) gap = 1;
        swapped = false;
        int i;
        for (i = 0; i < amount - gap; i++)
          int j = i + gap;
          if (dist[i] < dist[j])
            double disttemp=dist[i];
            dist[i]=dist[j];
            dist[j]=disttemp;
            int ordertemp=order[i];
            order[i]=order[j];
            order[j]=ordertemp;
            swapped = true;
          }//end of if (dist[i] < dist[j])
        }//end of for (i = 0; i < amount - gap; i++)
      }//end of while(gap > 1 || swapped)
    }//end of combSort
    the sorce file can be found here http://bruce-lab.blogspot.com/2010/04/alchemy-ray-casting-engine-source-code.html

    RadioactiveLizard, you need adobe alchemy (http://labs.adobe.com/technologies/alchemy/) to compile the C code to a swc,
    not pass variables to C directly.

  • Combining information from multiple images into a single output

    So I'm working on a class that takes input from three buffered images. The buffered images I will be using were covered in some detail [Here in this thread|http://forums.sun.com/thread.jspa?threadID=5401006&tstart=0] for the sake of reference.
    I'll be providing 3 buffered images where the value of every pixel is the ID of the cluster. What I'm planning on doing now is looking at each cluster in each of the 3 buffered images I give the class to process.
    public BufferedImage amalgamate(BufferedImage hueTemp, BufferedImage contrastTemp, BufferedImage textureTemp){
            imgWidth = hueTemp.getWidth();
            imgHeight = hueTemp.getHeight();
            hueRaster = hueTemp.getRaster();
            contrastRaster = contrastTemp.getRaster();
            textureRaster = textureTemp.getRaster();
            amalgamImage = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);
            amalgamWriter = amalgamImage.getRaster();
            imagePixelCount =  imgHeight * imgWidth;
            for (int x = 0; x < imgWidth; x++)
            for (int y = 0; y < imgHeight; y++) {           
                // assigns pixel values from each buffered image
                hueValue = hueRaster.getSample(x, y, 0);
                contrastValue = contrastRaster.getSample(x,y,0);
                textureValue = textureRaster.getSample(x, y, 0);
                // reset values of integers storing pixel counts
                huePixelCount = 1;
                contPixelCount = 1;
                textPixelCount = 1;
                //. loop iterates through images and produces a pixel count for each of the
                //currently assign pixel values (each pixel value is also used as
                // the ID for each cluster)*/
                for (int i = 0; i < imgWidth; i++)
                for (int j = 0; j < imgHeight; j++) {
                    if (hueRaster.getSample(i, j, 0) == hueValue) huePixelCount ++;
                    if (contrastRaster.getSample(i, j, 0) == contrastValue) contPixelCount ++;
                    if (textureRaster.getSample(i, j, 0) == textureValue) textPixelCount ++;
                }//end of i,j loop
                // this section will determine is the cluster is valid (i.e. makes up
                // more than 5% of the total percentage of pixels in the image)
                if (huePixelCount >= (imagePixelCount * 0.05)) hueValidCluster = true;
                if (contPixelCount >= (imagePixelCount * 0.05)) contValidCluster = true;
                if (textPixelCount >= (imagePixelCount * 0.05))  textValidCluster = true;
                //loop iterates and the Writable Raster will set the pixel values
               // of the output image to red, green or blue for Hue, contrast and
               //texture respectively and set all other pixels to black.
              //I'm using RGB so that I can use a different channel value for
              //each of the three, so that overlap will result in a new colour
              //(overlap between all 3 should = white pixel)*/
                for (int a = 0; a < imgWidth; a++)
                for (int b = 0; b < imgHeight; b++) {
                    //This is my original method I devised
                    if (hueValidCluster == true && hueRaster.getSample(a, b, 0) == hueValue) amalgamWriter.setSample(a, b, 0, 256);
                    else amalgamWriter.setSample(a,b,0,0);
                    if (contValidCluster == true&& contrastRaster.getSample(a, b, 0) == contrastValue) amalgamWriter.setSample(a,b,1,256);
                    else amalgamWriter.setSample(a,b,1,0);  
                    if (textValidCluster == true&& textureRaster.getSample(a, b, 0) == textureValue) amalgamWriter.setSample(a,b,2,256);
                    else amalgamWriter.setSample(a,b,2,0);
                  //When the image returned a completely black output I tried a different
                  //approach along these lines assuming the .setPixel method
                 //would have done what I wanted.
                  if (hueValidCluster == true && hueRaster.getSample(a, b, 0) == hueValue) amalgamWriter.setPixel(a, b, redArray);
                    else amalgamWriter.setPixel(a,b,blackArray);
                }//end of a,b loop
                //Reset booleans for next pixel in the original x,y loop.
                //I've been using ping to make sure the thing doesn't crash while it's running.
                hueValidCluster = false;
                contValidCluster = false;
                textValidCluster = false;
                ping++;
                System.err.println(""+ ping);
            }//end of x,y loop
            return amalgamImage;
        }//end of amalgamate method
    }//end of AmalgamationAs previously hinted the class seems to run to completion, but the image returned is always black so the pixels aren't being set or they're somehow being reset?
    If the error is due to me setting the pixels in the output image incorrectly then the root of the problem is temporarily eluding me.
    I'm not sure if there are compatability problems between USHORT (which is the format the input images are in) and an INT_RGB BufferedImage which could be the cause so I thought I'd mention that.
    It's also crossed my mind that in using a loop inside a loop inside a loop I possibly have done something wrong there.
    Thought I'd throw this problem out there. I've been de-bugging this one for a while.

    amalgamWriter.setSample(a, b, 0, 256);
    amalgamWriter.setSample(a,b,1,256);
    amalgamWriter.setSample(a,b,2,256);For the image type you are using, you only have 8 bits of precision each color channel. That means only a number in the range [0,255] is valid for the sample. The value 256 is equivalent to setting the sample to 0. That is ((byte) 256) = 0.

  • How to resize a photo from CameraUI?

    Hi there,
    i really need som help here. I cant seem understand how to resize an still image taken with the camera. Here are the code so far(also with the upload part). I just need a thumbnail to be uploaded to the server, not the HQ-image. Any ideas?
              Simple AIR for iOS Package for selecting a cameraroll photo or taking a photo and processing it.
              Copyright 2012 FIZIX Digital Agency
              http://www.fizixstudios.com
              For more information see the tutorial at:
              http://www.fizixstudios.com/labs/do/view/id/air-ios-camera-and-uploading-photos
              Notes:
              This is a barebones script and is as generic as possible. The upload process is very basic,
              the tutorial linked above gives information on how to post the image along with data to
              your PHP script.
              The PHP script will collect as $_FILES['Filedata'];
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              import flash.events.TouchEvent;
              import flash.ui.Multitouch;
        import flash.ui.MultitouchInputMode;
              import flash.media.Camera;
              import flash.media.CameraUI;
              import flash.media.CameraRoll;
              import flash.media.MediaPromise;
        import flash.media.MediaType;
              import flash.events.MediaEvent;
              import flash.events.Event;
              import flash.events.ErrorEvent;
              import flash.utils.IDataInput;
              import flash.events.IEventDispatcher;
              import flash.events.IOErrorEvent;
              import flash.utils.ByteArray;
              import flash.filesystem.File;
              import flash.filesystem.FileMode;
              import flash.filesystem.FileStream;
              import flash.errors.EOFError;
              import flash.net.URLRequest;
              import flash.net.URLVariables;
              import flash.net.URLRequestMethod;
                        // Define properties
                        var cameraRoll:CameraRoll = new CameraRoll();                                        // For Camera Roll
                        var cameraUI:CameraUI = new CameraUI();                                                            // For Taking a Photo
                        var dataSource:IDataInput;                                                                                          // Data Source
                        var tempDir;                                                                                                                        // Our temporary directory
                        CameraTest() ;
                        function CameraTest()
                                  Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
                                  // Start the home screen
                                  startHomeScreen();
                        // =================================================================================
                        // startHomeScreen
                        // =================================================================================
                        function startHomeScreen()
                                  trace("Main Screen Initialized");
                                  // Add main screen event listeners
                                  if(Multitouch.supportsGestureEvents)
                                            mainScreen.startCamera.addEventListener(TouchEvent.TOUCH_TAP, initCamera);
                                            mainScreen.startCameraRoll.addEventListener(TouchEvent.TOUCH_TAP, initCameraRoll);
                                  else
                                            mainScreen.startCamera.addEventListener(MouseEvent.CLICK, initCamera);
                                            mainScreen.startCameraRoll.addEventListener(MouseEvent.CLICK, initCameraRoll);
                        // =================================================================================
                        // initCamera
                        // =================================================================================
                        function initCamera(evt:Event):void
                                  trace("Starting Camera");
                                  if( CameraUI.isSupported )
                                            cameraUI.addEventListener(MediaEvent.COMPLETE, imageSelected);
                                            cameraUI.addEventListener(Event.CANCEL, browseCancelled);
                                            cameraUI.addEventListener(ErrorEvent.ERROR, mediaError);
                                            cameraUI.launch(MediaType.IMAGE);
                                  else
                                            mainScreen.feedbackText.text = "This device does not support Camera functions.";
                        // =================================================================================
                        // initCameraRoll
                        // =================================================================================
                        function initCameraRoll(evt:Event):void
                                  trace("Opening Camera Roll");
                                  if(CameraRoll.supportsBrowseForImage)
                                            mainScreen.feedbackText.text = "Opening Camera Roll.";
                                            // Add event listeners for camera roll events
                                            cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected);
                                            cameraRoll.addEventListener(Event.CANCEL, browseCancelled);
                                            cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);
                                            // Open up the camera roll
                                            cameraRoll.browseForImage();
                                  else
                                            mainScreen.feedbackText.text = "This device does not support CameraRoll functions.";
                        // =================================================================================
                        // imageSelected
                        // =================================================================================
                        function imageSelected(evt:MediaEvent):void
                                  mainScreen.feedbackText.text = "Image Selected";
                                  // Create a new imagePromise
                                  var imagePromise:MediaPromise = evt.data;
                                  // Open our data source
                                  dataSource = imagePromise.open();
                                  if(imagePromise.isAsync )
                                            mainScreen.feedbackText.text += "Asynchronous Mode Media Promise.";
                                            var eventSource:IEventDispatcher = dataSource as IEventDispatcher;
                                            eventSource.addEventListener( Event.COMPLETE, onMediaLoaded );
                                  else
                                            mainScreen.feedbackText.text += "Synchronous Mode Media Promise.";
                                            readMediaData();
                        // =================================================================================
                        // browseCancelled
                        // =================================================================================
                        function browseCancelled(event:Event):void
                                  mainScreen.feedbackText.text = "Browse CameraRoll Cancelled";
                        // =================================================================================
                        // mediaError
                        // =================================================================================
                        function mediaError(event:Event):void
                                  mainScreen.feedbackText.text = "There was an error";
                        // =================================================================================
                        // onMediaLoaded
                        // =================================================================================
                        function onMediaLoaded( event:Event ):void
                                  mainScreen.feedbackText.text += "Image Loaded.";
                                  readMediaData();
                        // =================================================================================
                        // readMediaData
                        // =================================================================================
                        function readMediaData():void
                                  mainScreen.feedbackText.text += "Reading Image Data.";
                                  var imageBytes:ByteArray = new ByteArray();
                                  dataSource.readBytes( imageBytes );
                                  tempDir = File.createTempDirectory();
                                  // Set the userURL
                                  var serverURL:String = "http://www.hidden_in_this_example.com/upload.php";
                                  // Get the date and create an image name
                                  var now:Date = new Date();
                                  var filename:String = "IMG" + now.fullYear + now.month + now.day + now.hours + now.minutes + now.seconds;
                                  // Create the temp file
                                  var temp:File = tempDir.resolvePath(filename);
                                  // Create a new FileStream
                                  var stream:FileStream = new FileStream();
                                  stream.open(temp, FileMode.WRITE);
                                  stream.writeBytes(imageBytes);
                                  stream.close();
                                  // Add event listeners for progress
                                  temp.addEventListener(Event.COMPLETE, uploadComplete);
                                  temp.addEventListener(IOErrorEvent.IO_ERROR, ioError);
                                  // Try to upload the file
                                  try
                                            mainScreen.feedbackText.text += "Uploading File";
                                            //temp.upload(new URLRequest(serverURL), "Filedata");
                                            // We need to use URLVariables
                                            var params:URLVariables = new URLVariables();
                                            // Set the parameters that we will be posting alongside the image
                                            params.userid = "1234567";
                                            // Create a new URLRequest
                                            var request:URLRequest = new URLRequest(serverURL);
                                            // Set the request method to POST (as opposed to GET)
                                            request.method = URLRequestMethod.POST;
                                            // Put our parameters into request.data
                                            request.data = params;
                                            // Perform the upload
                                            temp.upload(request, "Filedata");
                                  catch( e:Error )
                                            trace(e);
                                            mainScreen.feedbackText.text += "Error Uploading File: " + e;
                                            removeTempDir();
                        // =================================================================================
                        // removeTempDir
                        // =================================================================================
                        function removeTempDir():void
                                  tempDir.deleteDirectory(true);
                                  tempDir = null;
                        // ==================================================================================
                        // uploadComplete()
                        // ==================================================================================
                        function uploadComplete(event:Event):void
                                  mainScreen.feedbackText.text += "Upload Complete";
                        // ==================================================================================
                        // ioError()
                        // ==================================================================================
                        function ioError(event:Event):void
                                  mainScreen.feedbackText.text += "Unable to process photo";

    1. Create a BitmapData of the correct size of the full image
    2. Use BitmapData.setPixels to create pixel data from your byteArray
    3. Make a new Bitmap, Bitmap.bitmapData = BitmapData
    4. Create a matrix with the correct scaling factors for your thumbnail
    5. Create a new BitmapData the size of your thumb
    6. Use BitmapData.draw to draw your image data from the Bitmap to the new BitmapData with the scaling matrix
    7. Use BitmapData.getPixels to create a bytearray from your thumb BitmapData
    8. save it
    You'll have to look up the AS3 reference to see how all these methods work.

Maybe you are looking for