Create randomized fill from set of images

I have a set of images that are all different, but tile nicely together. I would like to create a pattern (or similar) that I can use to fill an area using those images randomly selected. That is, they should all be aligned in a grid, but each tile of the grid should be chosen at random from one of the images. The purpose of this is to have a tiling that doesn't repeat, a la http://en.wikipedia.org/wiki/Wang_domino and, more generally, http://en.wikipedia.org/wiki/Penrose_tiling
Here are a few images from a set as an example of what I would like to randomly tile:
Of course I could place them manually, but I may need to fill an area with thousands of these, and even if I did place them by hand, it wouldn't be very flexible as far as reshaping/resizing the tiled area, etc.
I'm trying to do this with Illustrator CS6 if it helps. Thanks in advance for any help!
-Greg

Mike Gondek wrote:
Does this help?
Not in any way I can see. That (basically) just downsamples the selected image to create a tiled look that mimcs the original image. I need to fill a space exactly like a pattern would, but with each tile of the pattern being randomly selected from a set of images.
For clarity, here's a full example:
Given these three tiles:
Fill a space with random tiles to generate something like the following:
Note that in the above example, I did the placement by hand, which is both tedious and probably not very random on a large scale, nor flexible at all for different fills or later modification.

Similar Messages

  • Acrobat 7.0.5 for Windows -- Problem creating a PDF from a TIFF image

    I have a user who is attempting to create a PDF from a TIFF image using the Adobe PDF print driver (Acrobat 7.0.5). His computer is a 3.4 GHz Intel Pentium 4 with 1 GB of RAM. His operating system is WinXP Pro SP2. The TIFF file he is trying to convert is about 2000 pages long. Is this even possible given the hardware and resources I've described?

    Sorry, I should have been more explicit...The TIFF image is a multi-page image and is stored in a database here at our office. The user has a proprietary (internally-coded) viewer that's used to open the image from the database, and there's no way to save the image locally. The user wants to be able to search within the image, so he converts it to a PDF. Ordinarily, this works very nicely, but this is his first time trying to do it with an image of more than 1000 pages length.

  • Creating multiple links from one map image in Flash CS4

    I have been tasked with creating multiple links from one map image using flash. Each link would go to the main website page with that location. I assume I could create a button for each location on the map but not having a lot of experience any help / tutorial you know of would be super helpful.. Thanks! Not looking for someone to work me thru it but a little guidance would be great!

    If I was to answer the problem, I would be giving you what you asked not to be given... the solution.  So I'll suggest that you start by researching the getURL() function.  That is what AS2 uses for opening web pages.
    As for coding a button, I'll recommend the following article for you... it will explain the proper approach to coding a button, which will give you an advantage over others who don't follow it, but instead use the way the article says not to.
    http://www.adobe.com/devnet/flash/articles/as_bestpractices_04.html
    Google is one of the best resources available for learning how to do things with Flash--it's the first place I go when I have a wondering.  In general, if you type in the right keywords, you get fairly good search results.  In your case, combinations of "AS2", "button", "getURL", "tutorial" would probably work well.

  • How does one Create Bootable DVD from downloaded iso image in Windows?

    I have a completely empty system I want to load Solaris Express on. I have access to web on a Windows XP machine and have downloaded the Solaris iso image. Using WindowsXP facilities simply copies the iso image as an intact iso image file and resulting disc is not bootable. Windows knowledge base very conveniently says that what happened to me is what happens. No obvious referral to how to do it....
    A) So for a non-Windows savy person who does not want to become Windows savy (That is why I downloaded Solaris!) Where is a set of instructions on how to (inside Windows XP) "extract" an iso image to a CD / DVD disk so it will be bootable?
    B) It sure would be nice if Solaris were able to be loaded onto a USB Flash drive and booted at will from any USB computer. Just plug it in and boot. Has this been done?
    C) Getting a physical disk by snail mail from Sun is very slow for me.... (3 weeks and still watching the mail box...)

    A) So for a non-Windows savy person who does not want to become Windows savy (That is why I downloaded Solaris!) Where is a set > of instructions on how to (inside Windows XP) "extract" an iso image to a CD / DVD disk so it will be bootable?http://www.sun.com/software/solaris/download_instruction.xml
    You probably copied the .iso file as one single very large file onto media. Instead, you can use a utility such as Roxio DVD Creator or Nero (or freeware like cdrecord) , and select the option to burn an image that already exists. No special boot options are needed, because the ISO image already contains the boot information needed.
    B) It sure would be nice if Solaris were able to be loaded onto a USB Flash drive and booted at will from any USB computer. Just plug > it in and boot. Has this been done?With the Newboot project introduced into Solaris Express, I believe it is now possible. I'm not a USB expert, though, so cannot say for sure.
    C) Getting a physical disk by snail mail from Sun is very slow for me.... (3 weeks and still watching the mail box...)I can't comment on that.
    -- Alan

  • How to create recovery media from HDD recovery image?

    When I tried to recover a fresh Windows from HDD recovery my little son stopped the proccedure by accident.
    When I tried to restart I get the message bootmgr is missing. I have a copy from HDD recovery file but din not create a recover DVD.
    The question is if I can make a bootable recover DVD or USB file file from the HDD recovey file?
    Thanks!!!

    There is a method to create bootable USB stick from recovery DVDs or ISO file - http://aps2.toshiba-tro.de/kb0/HTD4103KB0000R01.htm but I dont think this will help you.
    Problem is that such back-up is actually useless. There is also option to order original recovery installation disc. You can order it on https://backupmedia.toshiba.eu/landing.aspx

  • How do I create an outline from a .JPG image?

    I have Illustrator CS6 for Windows 7.
    I'm trying to create an outline for the image. It's just a single .jpg image.

    You mean something like this?
    Make two circles with the same top origin. Select both and rotate/copy them 120° to the left and right. Select them all, use the Pathfinder panel to combine them. Delete the the center triangle. Ungroup them. Add the small center circle and the other shape and make it a compound path (should knockout the center). Give it a stroke. Make the back two circles and make a compound path and send to back.

  • Newbe question, how do I create a fill from a png?

    I'm new to illustrator. How do I take a png and turn it into a fill?
    Thanks,
    Bubba

    If I understand you correctly you either drg it into the swatch panell and make it a pattern fill or pattern swatch if you wish to call it that.
    Pattern fill with a relatively large placed image
    Pattern Fill made with a small dimension placed image
    Or you take the shaped path you want to fill place it on top of the image (place png) and selec both and then make it a clipping path Command 7 or Control 7 or Object>Clipping Mask>Make
    Clipping path simialr to a patten fill made with a relatively large image

  • Creating CD's from downloaded ISO images

    Hi
    I've downloaded the 3 ISO images for Solaris 8 2/04 (for sparc). I've unzipped the install file & tried to burn it using Nero6. Only 146KB is used on the CD..Can some-1 tell me what I'm doing wrong?

    If you are referring to the first installation-CD, this is just actually
    equivalent to boot-floopy disk to boot the PC and configure it.
    The succeeding CDs contain the actual OS installation and they
    should be euqivalent to the size of a 700MB cdrom more or less.

  • Creating random numbers

    how do you create random numbers between a given set of integers?
    for example, how would you create random numbers from 2 to 9?

    public class Test {
        public static void main (String[] parameters) {
            for (int i = 0; i < 100; i ++) {
                if (i > 0) {
                    System.out.print (", ");
                    if (i % 10 == 0) {
                        System.out.println ();
                System.out.print ((int) (8 * Math.random ()) + 2);
    }code]Kind regards,
      Levi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Script for making random thumbnails from single image

    Hi all,
    I need something like a hundred different thumbnails from each image in a series of images, that is, hundred random sections of the same image, saved in a folder as jpg,  and i was hoping that i could find a script for this.
    What the script has to do is:
    select the size of the crop (this would also be the dimensions of the thumbnail saved)
    rotate crop selection in a random orientation and place the crop randomly on the canvas
    save the image as a jpg in a folder
    return to original image,
    repeat process x times before quitting script.
    I dont think this should be to difficult to make a script for, but unfortunately i don´t know how to code.
    Is there anybody that could help me with this?
    This would save me a lot of time!

    You can give this a try:
    // create copies with pseudo random clipped and rotated parts of image;
    // thanks to xbytor;
    // 2012, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.POINTS;
    // set name for folder to save jpgs to;
    var folderName = "rotatedJpgs";
    // set number of jpgs;
    var theNumber = 100;
    // width and height;
    var theWidth = 500;
    var theHeight = 500;
    // calculate some values;
    var theDiagonal = Math.sqrt ((theWidth * theWidth) + (theHeight * theHeight));
    var diagAngle = angleFromRadians(Math.acos((theWidth) / (theDiagonal)));
    // get file name and path;
    var myDocument = app.activeDocument;
    var docName = myDocument.name;
    try {
              var basename = docName.match(/(.*)\.[^\.]+$/)[1];
              var docPath = myDocument.path;
    catch (e) {
              basename = docName;
              var docPath = "~/Desktop";
    // create folder if it does not exist yet;
    if (Folder(docPath + "/" + folderName).exists == true) {
              var docPath = docPath + "/" + folderName;
    else {
              var theFolder = Folder(docPath + "/" + folderName).create();
              var docPath = docPath + "/" + folderName;
    // document dimensions;
    var docWidth = myDocument.width;
    var docHeight = myDocument.height;
    // jpg options;
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = 10;
    jpegOptions.embedColorProfile = true;
    jpegOptions.matte = MatteType.NONE;
    // duplicate image;
    var theCopy = myDocument.duplicate (theCopy, true);
    var origResolution = theCopy.resolution;
    theCopy.resizeImage(undefined, undefined, 72, ResampleMethod.NONE);
    var docHalfWidth = theCopy.width / 2;
    var docHalfHeight = theCopy.height / 2;
    var theLayer = smartify2010(theCopy.layers[0]);
    theCopy.resizeCanvas (theWidth, theHeight, AnchorPosition.MIDDLECENTER);
    var theHistoryState = theCopy.activeHistoryState;
    // do the variations;
    for (var m = 0; m < theNumber; m++) {
    var theAngle = Math.random() * 360;
    theLayer.rotate (theAngle, AnchorPosition.MIDDLECENTER);
    //theCopy.resizeCanvas (theWidth, theHeight, AnchorPosition.MIDDLECENTER);
    // get tolerance offset;
    var theHor1 = Math.abs(Math.cos(radiansOf(theAngle + diagAngle)) * theDiagonal / 2);
    var theVer1 = Math.abs(Math.sin(radiansOf(theAngle + diagAngle)) * theDiagonal/ 2);
    var theHor2 = Math.abs(Math.cos(radiansOf(theAngle - diagAngle)) * theDiagonal / 2);
    var theVer2 = Math.abs(Math.sin(radiansOf(theAngle - diagAngle)) * theDiagonal / -2);
    // calculate max offset for unrotated overall rectangle;
    var thisHalfWidth = docHalfWidth - Math.max(theHor1, theHor2);
    var thisHalfHeight = docHalfHeight - Math.max(theVer1, theVer2);
    // calculate random offset for unrotated overall rectangle;
    var randomX = thisHalfWidth * (Math.random() - 0.5) * 2;
    var randomY = thisHalfHeight * (Math.random() - 0.5) * 2;
    var aDiag = Math.sqrt (randomX * randomX + randomY * randomY);
    var anAngle = angleFromRadians(Math.asin((randomY) / (aDiag))) + theAngle;
    anAngle = anAngle + Math.floor(Math.random() * 2) * 180;
    // calculate  offset for rotated overall rectangle;
    var offsetX = Math.cos(radiansOf(anAngle)) * aDiag;
    var offsetY = Math.sin(radiansOf(anAngle)) * aDiag;
    //alert (theAngle+"\n\n"+offsetX +"\n"+ offsetY+"\n\n"+ thisHalfWidth+"\n"+thisHalfHeight);
    theLayer.translate(offsetX, offsetY);
    theCopy.resizeImage(undefined, undefined, origResolution, ResampleMethod.NONE);
    theCopy.saveAs((new File(docPath+"/"+basename+"_"+bufferNumberWithZeros(m+1, 3)+".jpg")),jpegOptions,true);
    theCopy.activeHistoryState = theHistoryState;
    // clean up;
    theCopy.close(SaveOptions.DONOTSAVECHANGES);
    app.preferences.rulerUnits = originalRulerUnits;
    ////// radians //////
    function radiansOf (theAngle) {
              return theAngle * Math.PI / 180
    ////// radians //////
    function angleFromRadians (theRad) {
              return theRad / Math.PI * 180
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
              var theNumberString = String(number);
              for (var o = 0; o < (places - String(number).length); o++) {
                        theNumberString = String("0" + theNumberString)
              return theNumberString
    ////// function to smartify if not //////
    function smartify2010 (theLayer) {
    // make layers smart objects if they are not already;
              app.activeDocument.activeLayer = theLayer;
    // process pixel-layers and groups;
          if (theLayer.kind == "LayerKind.GRADIENTFILL" || theLayer.kind == "LayerKind.LAYER3D" || theLayer.kind == "LayerKind.NORMAL" ||
          theLayer.kind == "LayerKind.PATTERNFILL" || theLayer.kind == "LayerKind.SOLIDFILL" ||
          theLayer.kind == "LayerKind.TEXT" || theLayer.kind == "LayerKind.VIDEO" || theLayer.typename == "LayerSet") {
                        var id557 = charIDToTypeID( "slct" );
                        var desc108 = new ActionDescriptor();
                        var id558 = charIDToTypeID( "null" );
                        var ref77 = new ActionReference();
                        var id559 = charIDToTypeID( "Mn  " );
                        var id560 = charIDToTypeID( "MnIt" );
                        var id561 = stringIDToTypeID( "newPlacedLayer" );
                        ref77.putEnumerated( id559, id560, id561 );
                        desc108.putReference( id558, ref77 );
                        executeAction( id557, desc108, DialogModes.NO )
                        return app.activeDocument.activeLayer
              if (theLayer.kind == LayerKind.SMARTOBJECT || theLayer.kind == "LayerKind.VIDEO") {return theLayer};
    ////// get an angle, 3:00 being 0˚, 6:00 90˚, etc. //////
    function getAngle (pointOne, pointTwo) {
    // calculate the triangle sides;
              var width = pointTwo[0] - pointOne[0];
              var height = pointTwo[1] - pointOne[1];
              var sideC = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
    // calculate the angles;
              if (width+width > width) {theAngle = Math.asin(height / sideC) * 360 / 2 / Math.PI}
              else {theAngle = 180 - (Math.asin(height / sideC) * 360 / 2 / Math.PI)};
              if (theAngle < 0) {theAngle = (360 + theAngle)};
              return theAngle

  • Creating a pdf from a word doc and the image and footer will not show

    I am trying to create a pdf from a word doc that has an image and footer. Neither will show in the pdf. Also getting this message "Adobe Acrobat Updater has not been able to check for updates recently. Check online to see if solutions are available from the Adobe website." My Cloud says it is updated.

    What was the Original?
    If it was from Word, chances are the top and bottom Margins were set too narrow. (should not be less than .5 inches even more safety 1" would be better). As for graphics. Check in Word preferences (may be called different in a windows machine) make sure in view and Print settings "Graphics" is checked (show Graphics and Print Graphics).

  • Corrupt image formatting when creating pdf from embedded visio image in MS word

    Hello, Using Adobe Acrobat 9 standard and trying to create a PDF file from an MS word (version 2003) document.  PDF file created is fine except for an image (embedded visio diagram imported into word).  When created in PDF, the image is missing many of the diagram labels, and other text boxes are in the wrong font and wrong location.  I don't know if it's my Adobe Acrobat or MS Word settings that need to be updated.
    thanks, NB

    Dear fellows,
    the problem is still present.  My system:Windows 7 32-Bit Prof, MS Office 2010 Prof, Acrobat X Pro 10.1.1, Vision 2010 Prof, all updates installed.
    Problem #1: Even the latest Acrobat X 10.1.1 version causes Visio 2010 to start with error messages, origin: the Acrobat Add-In.  Therefore I de-activated the Acrobat Add-In, again, as in the past.
    As I design grafics with Visio 2010, I mark them in the active Visio window, copy the marked parts and then insert them into my Word-Document.  So far, so good and as I want it.
    The (still present) problem: I can produce a PDF file using the "save as Adobe PDF", but the Visio drawing is incomplete and corrupt.  E.g. arrows as line endings have disappeared.
    PS: But using Adobes PDF printer sets the embedded Visio drawing correctly!  But using the printer one looses some features of the "save as Adobe PDF" command.
    Well, probably one day ...
    Regards,
    Rückenlehne.

  • How to create multiple page PDF from multiple jpg images?

    I have three jpeg images with pixel dimensions 1008 x 1464. I wish to create a PDF file with one image per page. Apparently Preview previously performed this function, and this functionality was deliberately removed by the time of Mac OS X 10.6.
    I use Mac OS X 10.6.8. I have combined the images via Gimp into one jpeg image of size 1008 x 4392, but it would be better if I could create a PDF file. I have been unable to figure out how to do this via GraphicConverter, which trial version constantly displays the 30 second "buy me" window before loading -- annoying: I once accidentally opened it, and it would not let me close the application until the "buy me" window finished...
    I have been able to create a PDF file through the action of "printing" (cf. https://discussions.apple.com/message/12395021#12395021), but that reduces the image size and creates a white margin around the images (as if printing on a sheet of paper), which I wish to avoid.
    Thank you for your time and help!
    Message was edited by: ethereality -- added another "workaround" attempt

    I drag and dropped from Finder into TextEdit, and it only copied the file path as text. From what software would I drag the images into TextEdit?
    First, set the TextEdit document to Rich Text Format - you can do that via the Format menu in TextEdit. This will allow the inclusion of pictures.
    Then you can either -
    • Drag an image file into the TextEdit window, and a preview-sized image will be inserted. If this is too small for your purposes -
    • Open the image file in Preview (or an image editor, if you choose), size the image to your liking, press Command-A (Select All) and the press Command-C (Copy) - doing this will place a copy of the image on the Clipboard. Then switch focus to the TextEdit document and press Command-V (Paste). This will place a large-size image of the file.

  • Creating an animation from a series of image, snow leopard Quicktime 7 fails

    Quicktime 7 allowed a user to be able to select a series of images and create an movie file with a time interval..
    The Quicktime 7 for Snow Leopard from the Snow Leopard Installer dvd does not allow you to select more than one image..
    How can I create a movie from a series of images jpgs.s...
    We do scientific work climate modeling and this was a great tool to create animations..
    Where did it go.. there is no ability to do this in Quicktime X..
    Does anyone know how to make this functionality work?

    Ok I got it...
    Just select the first frame and then you get a dialog box that sets the time interval...
    It AUTOMATICALLY selects all the rest of the images if they are sequentially numbered...
    doh..

  • FramePosicioningControl for processor created from list of images

    Hi,
    I need to create a FramePositioningControl for processor created from a list of bufferedimages.
    I 've followed the instructions in the next code:
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.html and
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/Cut.html
    First thing i do is create a source stream for the list of bufferedimage: SourceStream class.
    Then i created a data source that contains an instance of SourceStream: ListImageDataSource class
    Finally i created a processor using an instance of ListImageDataSource.
    I get the next error when i try to create FramePositioningControl control for that processor:
    The processor does not support FramePositioningControl.
    The example program is the next. Its a little long but easily understandable.
    I test my program with a video file and it works but when i try test it from a list of images i get the error.
    Can it be because format chosen of every image? i use RGB but i dont know if that is correct
    I need to have a method called getFrame(int index) that returns the frame at the specified index.
    If a processor doesnt support framepositioningcontrol when it is created from a list of image, can i use a interface (seekable or other) to do that?
    import java.awt.Dimension;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.util.Vector;
    import java.net.*;
    import java.io.*;
    import javax.imageio.*;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    import javax.media.Buffer;
    import javax.media.ConfigureCompleteEvent;
    import javax.media.ControllerEvent;
    import javax.media.ControllerListener;
    import javax.media.EndOfMediaEvent;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.PrefetchCompleteEvent;
    import javax.media.Processor;
    import javax.media.RealizeCompleteEvent;
    import javax.media.ResourceUnavailableEvent;
    import javax.media.Time;
    import javax.media.control.FrameGrabbingControl;
    import javax.media.control.FramePositioningControl;
    import javax.media.control.TrackControl;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullBufferDataSource;
    import javax.media.protocol.PullBufferStream;
    public class PositionableVideo implements ControllerListener{
         Processor p = null;
         Object waitSync = new Object();
        boolean stateTransitionOK = true;
        int width = 0;
        int height = 0;
        FramePositioningControl fpc = null;
        FrameGrabbingControl fgc = null;
        int totalFrames = 0;
        ListImageDataSource ids = null;
        public static void main(String args[]){
             String [] images = {"http://farm3.static.flickr.com/2084/2068533005_87b8b15914_m.jpg",
                       "http://farm1.static.flickr.com/158/336360357_3a183e2e61_m.jpg"};
             Vector<BufferedImage> bivector = new Vector<BufferedImage>(images.length);
             for(int i = 0; i < images.length; i++){
                  System.out.println("Reading image: "+(i+1)+"/"+images.length);
                  try{
                       URL url = new URL(images);
                   bivector.add(ImageIO.read(url));
              }catch(Exception e){
                   System.err.println("Error loading images: "+e);
         System.out.println("Images read");
         PositionableVideo pv = new PositionableVideo(bivector, 25);
         pv.getClass();
    public PositionableVideo(Vector<BufferedImage> images, int frameRate) throws NullPointerException{
              if(images != null){
                   ids = new ListImageDataSource(images, frameRate);
              if(!open(ids)){ return; }
              System.out.println("JMFVideo created");
              else{
                   throw new NullPointerException();
         private boolean open(ListImageDataSource ids){
              try {
              p = Manager.createProcessor(ids);
              } catch (Exception e) {
              System.err.println("Cannot create a processor from the data source");
              return false;
              p.addControllerListener(this);
              p.configure();
              if (!waitForState(p.Configured)) {
              System.err.println("Failed to configure the processor");
              return false;
              // p.setContentDescriptor(null);
              // Query for the processor for supported formats.
              // Then set it on the processor.
              /*TrackControl tcs[] = p.getTrackControls();
              Format f[] = tcs[0].getSupportedFormats();
              for(int i = 0; i <tcs.length; i++){
                   Format fc[] = tcs[i].getSupportedFormats();
              if (f == null || f.length <= 0) {
              System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
              return false;
              tcs[0].setFormat(f[0]);
              System.out.println("Setting the track format to: " + f[0]);
              // Put the Processor into realized state.
              p.realize();
              if (!waitForState(p.Realized)) {
              System.err.println("Failed to realize the processor");
              return false;
              // Prefetch the processor.
              p.prefetch();
              if (!waitForState(p.Prefetched)) {
              System.err.println("Failed to prefetch the processor");
              return false;
              System.out.println("start processing...");
              // OK, we can now start the actual transcoding.
              p.start();          
              //wait to images are ready: try{Thread.sleep(3000);}catch(Exception e){}
              // Create a frame positioner.
              fpc = (FramePositioningControl) p.getControl("javax.media.control.FramePositioningControl");
              if (fpc == null) {
              System.err.println("The processor does not support FramePositioningControl");
              return false;
              // Create a frame grabber.
              fgc = (FrameGrabbingControl) p.getControl("javax.media.control.FrameGrabbingControl");
              if (fgc == null) {
              System.err.println("The processor does not support FrameGrabbingControl");
              return false;
              return true;
         private boolean waitForState(int state) {
              synchronized (waitSync) {
              try {
                   while (p.getState() != state && stateTransitionOK)
                   waitSync.wait();
              } catch (Exception e) {}
              return stateTransitionOK;
         public void controllerUpdate(ControllerEvent evt) {
              if (evt instanceof ConfigureCompleteEvent ||
              evt instanceof RealizeCompleteEvent ||
              evt instanceof PrefetchCompleteEvent) {
              synchronized (waitSync) {
                   stateTransitionOK = true;
                   waitSync.notifyAll();
              } else if (evt instanceof ResourceUnavailableEvent) {
              synchronized (waitSync) {
                   stateTransitionOK = false;
                   waitSync.notifyAll();
              } else if (evt instanceof EndOfMediaEvent) {
              p.close();
              System.exit(0);
         class ListImageDataSource extends PullBufferDataSource{
    SourceStream streams[] = null;
    Time duration = null;
    public ListImageDataSource(Vector<BufferedImage> images, int frameRate) throws NullPointerException{
              if(images != null){
                   streams = new SourceStream[1];
              streams[0] = new SourceStream(images, frameRate);
              duration = new Time( ((double) images.size() / frameRate) ); //seconds
              else{
                   throw new NullPointerException();
         public PullBufferStream[] getStreams() { return streams; }
         public void connect(){}
         public void disconnect(){}
         public void start(){}
         public void stop(){}
         //Content type is of RAW since we are sending buffers of video frames without a container format
         public String getContentType() { return ContentDescriptor.RAW; }
         public Time getDuration(){ return duration; }
         public Object[] getControls() { return new Object[0]; }
         public Object getControl(String type) { return null; }
         class SourceStream implements PullBufferStream {
         Vector <BufferedImage> images;
              int width, height;
              VideoFormat format;
              int frameRate;
              int nextImage = 0;     // index of the next image to be read.
              boolean ended = false;
              public SourceStream(Vector <BufferedImage> images, int frameRate) {
              this.width = images.get(0).getWidth();
              this.height = images.get(0).getHeight();
              this.frameRate = frameRate;
              this.images = images;
              format = new VideoFormat(VideoFormat.RGB, new Dimension(width, height),
                        Format.NOT_SPECIFIED, Format.intArray, (float) frameRate);
              public boolean willReadBlock() { return false; }
              public int getFrameRate() { return frameRate; }
              public void read(Buffer buf) throws IOException {
              if (nextImage >= images.size()) { // Check if we've finished all the frames.
                   buf.setEOM(true);
                   buf.setOffset(0);
                   buf.setLength(0);
                   ended = true;
                   return;
              Object data = buf.getData();
              int maxDataLength = width * height * 3;
              // Check to see the given buffer is big enough for the frame.
              if (data == null || !(data.getClass() == Format.intArray) ||
    ((int[]) data).length < maxDataLength) {
                   data = new int[maxDataLength];
                   buf.setData(data);
              BufferedImage bi = images.get(nextImage);
              bi.getRGB(0, 0, width, height, (int[]) data, 0, width);          
              Save every image. It works
              try{
              OutputStream salida = new FileOutputStream( "frame"+data.toString()+".jpeg" );
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder( salida );
              encoder.encode(bi);
              salida.close();
              } catch(IOException e){}
              buf.setOffset(0);
              buf.setLength(maxDataLength);
              buf.setFormat(format);
              buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
    buf.setSequenceNumber(nextImage);
              buf.setTimeStamp( (long) (nextImage * (1000 / frameRate) * 1000000) );
              nextImage++;          
              public ContentDescriptor getContentDescriptor() {
              return new ContentDescriptor(ContentDescriptor.RAW);
              public Format getFormat() { return format; }
              public long getContentLength() { return 0; }
              public boolean endOfStream() { return ended; }
              public Object[] getControls() { return new Object[0]; }
              public Object getControl(String type) { return null; }
    Thanks so much                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Thanks.
    I found a way of doing it by creating a view and calling it recursively everytime a user swipes

Maybe you are looking for

  • Problem in import iview

    Dear All, In our production portal we had a problem with import iview. when i click on import iview under transport package i am not able to view it in Navigation Area. Regards Subash

  • Delete(xml) in Flex namespace problem

    hihi I have problem with AS3 xml I want delete nodes in the folowing XML, which has title "undefined". A sample from the xml: <xml> <page> <title>Szabályalapú reprezentáció</title> <id>tudásterület_74</id> <revision> <id>1</id> <timestamp>2008-05-27T

  • HT201302 How to import photos that are imported from itunes back to iphoto?

    I had imported photos from Itunes( Iphoto ) to my iphone and i deleted all the photos in Iphoto. Now I wanted to control some of the photos but I can't! If I sync photos again, all the photos will be gone. So I wanted to import the photos in my Iphon

  • Has anyone dropped their new iphone yet?

    So I dropped my phone on the carpet the other day, well actually it rolled on the carpet and I had a speck purple case on it.  So far it has been working fine.  Just wanted to get an opinion from others who may have dropped their phone, if it still w

  • Running Form " Browser Problem "

    hiiii everybody ... my problem is that when trying to run a form the browser starts and before it loads the form the browser close automaticaly ... this is anew problem i dont know what are the possible causes for it ... Hope too find any help here .