Newbe Question: Setting a cursor image from a source file

I have a panel that is dynamiclly loaded with images from files. I wanted to set the cursor to the image, originally I was going to load a sprite with the image and have it follow the cursor but I figured that it might be better using the CursorManager. I've used the cursormanager with a image that is embed as a class but I'm having a problem doing it from the spark image object. Any suggestions?
Thanks,
Bubba

Ok guys - managed to solve my problem - used the following code:
try {
FileReader file = new FileReader("C:/wherever ya put your file");
BufferedReader in = new BufferedReader(file);
String line;
while((line = in.readLine()) != null) {
groupMonth = line;
in.close();
}catch (Exception e) {}
I then used the setText() function to assign the value to the JLabel.
All is well :P
Chuck
P.S Thanks for the pointer it certainly helped.

Similar Messages

  • Figuring out how to extract images from a PDF file

    Hi,
    I'm trying to write a small app that extracts all images from a PDF file. I already wrote a nice parser and it works good but the only problem is that I can't quite figure out from the reference how to decode all images in a PDF file to normal files such as tiffs, jpegs, bmps etc. For now I'm focusing on XObject images and not dealing with inline images.
    From what I understand so far just by trying and looking at open sources I figured that if I see a XObject Image with a DCTDecode filter, taking the stream data without doing anything to it and saving it as a jpeg file works. But doing the same to FlateDecoded streams or CCITTFax didn't work.
    What is the right way to properly extract the images?

    In general you have to
    * decode the stream
    * extract the pixel data
    * use ColorSpace, BitsPerComponent, Decode and Width to unpack pixel
    values
    * reconstruct an image file format according to its specification
    There are no other shortcuts. The DCTDecode shortcut (which doesn't
    work for CMYK JPEG files) is just a piece of fantastic good luck.
    Aandi Inston

  • I have two editors working on FCPX in two different cities. Here is the question: How can a project timeline be shared if they are working from mirrored source files?

    I have two editors working on FCPX in two different cities. Here is the question: How can a project timeline be shared if they are working from mirrored source files? Is there any easy way to share a project time line?

    There an episode of MacBreak Studio where Steve Martin explains exactly how to share a project, while having two separate copies of footage and events:
    http://www.youtube.com/watch?v=Hu-ga7fxKh8

  • How do I save Lightroom image edits in source file?

    My experience with the trial version of lightroom is very positive in terms of the convenient and powerful capabilities for editing images and the associated metadata.  But I can't find a way to save the "develop" edits to images into the source file for the photo I am working with.  So far, I am able to save the metadata into the file but not the image editing.  From what I read, I fear this is not possible without silly round about exporting to new files then copying / moving multiple copies around, etc. Without this ability, I am pretty sure I will not purchase lightroom and will miss out on all the powerful features.  Without an OPTION that turns on the equivalent of a SAVE button, managing my photos collection would be a nightmare. 
    So my question is: How do I save the edited (i.e., developed) version of a photo back into the same file where the original photo was stored?
    Please, please spare me all the reponses telling me how stupid I am for wanting to do this and that the cognisenti and professionals would NEVER do this.    But please just tell me there is a secret place to turn on this option in lightroom.
    Thanks in advance.

    I had the same requirement to save in JPEGs files all non-metadata edits performed in Lightroom, in order to share modified pictures without duplicating files. By the way, I think it’s going to be more and more required by casual Lightroom users, as people get used to instant photo sharing in many situations where quantity matters more than quality
    Here’s a nearly automatic (at least, scalable) solution that works, although it slightly lowers the quality by re-compressing the original pictures.
    Once for all:
    Download and install the wonderful Lightroom plugin “jf Run Any Command”, provided as donationware by Jeffrey Friedl here: http://regex.info/blog/lightroom-goodies/run-any-command. This “export filter” plugin allows you to run a command of your choice with each exported file, as part of the export while it’s going on. (You may also browse Jeffrey’s blog to find many other useful and beautiful things.)
    In Lightroom, pre-define an export settings as follows:
    Export to the hard drive, to the original picture folder, without adding the exported file to the catalog
    Name the exported file “EXPORTED-{Filename}” (or anything different from the original file name)
    JPEG format, 76% quality (see An Analysis of Lightroom JPEG Export Quality Settings at http://regex.info/blog/lightroom-goodies/jpeg-quality)
    Keep all metadata
    Here’s the interesting part, the Run Any Command settings:
    Command to execute for each exported picture: copy "{FILE}" "{Path}\{LIBRARYFILENAME}" (this replaces the original file with a copy of the exported file)
    Command to execute upon export completion: del {FILES} (this deletes all exported files).
    NB: One could wonder why not directly export with the original file name and silently replace the original files (I believe Lightroom would allow this). It’s just a matter of error handling: in case the export goes wrong, no original file is changed at all.
    The easy part: each time you want to save edits:
    In Lightroom, select the pictures to save, and export them with the pre-defined settings. You're almost done. The JPEG files are ok, but inside Lightroom you see the modification effects doubled, as their specifications remain in the catalog database and they apply on modified JPEG instead of the original files.
    While the entire set of "saved" pictures is still selected, in the Develop module switch Autosync on and click Reinit to erase all modification specifications from the catalog for all pictures, then press CTRL-S to write down to disk any metadata updated by Lightroom -and accept if required to confirm that Lightroom values should replace externally set values.
    Stephane
    PS: Papa Ben, I'm curious about the decision you  finally made

  • Cannot read from the source file or disk

    I had to get a new hard drive for my Satellite A665 old one kept freezing up; had a recovey disk from Geek Squad when I got it but they did not work.  So I ordered a Recovery Disc set from Toshiba. 
    A few minutes after I insert the 3nd disc, I get the following message:
    Cannot read from the source file or disk
    PREINST14.SWM
    Type: SWM File
    Size:  670 MB
    Modified: 10/29/2010 11:24pm
    Clicking [Try Again] or [Skip] clicked try again twice. Gave same message so clicked skip. Got another message.
    Cannot read from the source file or disk
    PREINST18.SWM
    Type: SWM File
    Size:  372 MB
    Modified: 10/29/2010 11:24pm
    Clicking [Try Again] or [Skip] clicked try again twice. Gave same message so clicked skip after checking do it for next one. Got error message.
    An error has occurred.
    Error:  10-FC06-0002
    Recovery Error.
    Please press [OK] to turn off the computer.
    I tried erasing the disk, then running the Recovery Wizard again, but wind up in the same place.

    It's hard to know exactly what the problem is. You might want to contact customer support because it could just be a faulty disc.
    - Peter

  • Multiple Output formats from Single Source File? (Like Squeeze)

    I'd really love to be able to batch process encodes in the following manner:
    Drop my source video file into AME CS5, select an MP4 preset, and then have it encode multiple bitrate versions while adding filename extensions [e.g. _High (700 kb/s), _Mid (550 kb/s), _Low (400 kb/s)].
    The simple answere is to drop, or duplicate, my input clip 3 times and just select 3 presets I could set up under the Hi, Mid, Lo parameters. But that's exactly what I'm trying to work around. I encode video ads for major web-video sites, and the volume is just manageable to batch process these (drag and drop large quantities, select multiple presets at once, hit Start.) To handle each ad we service would be far too time consuming, even for as simple as AME makes it to duplicate/choose new preset. (In the end, our ads jump onto our FTP via AME's FTP upload option, one of it's smartest features!)
    We have quite a bit of encoding resources here at work, but AME has been giving us the most favorable results. Other options, such as Sorenson Squeeze, let you import your source clips, then apply 2 or more presets to them, before encoding the whole batch. Is there any similar functionality in Media Encoder? (Really don't want to move our workflow into Squeeze, with it's inferior MP4 encoding.)
    Does anybody have any experience with this sort of high-volume multiple-outputs from individual source files? Any tips with scripts or Apple's "Automator" that could streamline this type of batch processing?

    Any update on this ability?  We create many in house videos that need to be encoded to 14 different
    bitrates for use with Flash Media Server as dynamic http streams.
    Currently when I am ready to export a finished sequence, I will pick my first preset and queue it in AME.  Then I duplicate that thirteen times, setting each of the new thirteen queued items to their appropriate bitrates.  Then I have to change each of the output names to be "filename_bitrate.flv".
    This process is much slower when queued in AME than if I exported each individually from PP.  I just don't have the time to manually export each version.
    I have also started noticing that some of the last few projects won't render beyond the quality of the first queued item.  Do I need to render the largest bitrate file first?
    Any indication from Adobe on the correct workflow to create multiple bitrate files to be consumed by FMS as dynamic http streams would be appreciated.
    The link above is dead.  Does anyone have an updated link to the document above?

  • Windows Easy Transfer (WET) Issues with External Hard Drive - "Can't read from the source file or disk"

    I work for Office Depot, in the tech department. Basically, one of our associates was supposed to do a data backup, and re-install Windows 7, then transfer the files back. He used Windows Easy Transfer and compacted everything into a 163 GB file. 
    Now comes the hard part. When we try to put it back on his computer ((drag-and-drop to the desktop) which has been wiped back to factory settings using the recovery partition), it stops at 79.5 GB remaining (you know how it doesn't give you a % of completion,
    it just shows how many GB are remaining) and then says "Can't read from the source file or disk" and gives you an option to try again, or cancel. It gets hung up on the same point each time.
    Normally, this wouldn't be a huge issue, but the contents on the drive are his wife's architect blueprints and interior design stuff, along with wedding photos, etc, which are the only copies they have. On top of those, they have court documents and other
    important files that we are unable to access now.
    I wasn't involved with this transfer, so I'm trying to clean up the mess as best I can. I remembered that the customer's wife was Russian, and had some files typed with a Russian keyboard, so on and so forth. I wonder if that's the issue? If not, I really
    have no idea how to manually extract things from a ".mig" file, or how to diagnose what area is potentially corrupted.
    In light of this situation, we tried using "Recuva" to recover the files post-wipe, but everything was corrupted or unable to be opened, and it also extracted and recovered all of the "useless" photos, such as the skype logos, up and
    down arrows for browsers, etc (it was 160,000+ photos).
    Trying to avoid a potential lawsuit, unhappy customer, and costing the company lots of money to see if professionals can get into this external hard drive.
    Other relevant information:
    We used a Toshiba 500 GB (465 GB) external hard drive.
    Customer's computer is an HP Pavilion P6000 Series (Model No. p6520y) running Windows 7 Home Premium 64-bit Service Pack 1.
    Any other information that is needed can be provided, thanks in advance, and hopefully we can find a solution to this issue quickly!
    -John

    I think there's a lack of understanding somewhere.
    "If you even can't start the process, please unplug it from your new PC. Then head back to your new computer and plug
    the external drive back in to your new computer. "
    Unplug from new, head back to new, plug it back in? That doesn't make much sense! Haha.
    I knew what you meant though, somewhat. When I search through the drives after clicking yes (Has windows easy transfer
    already saved your files blah blah blah) I click on the transfer file and it says "Windows Easy Transfer could not open the file".
    Rather than drag-and-drop the file to the desktop, I now tried to double-click on the file itself while it was plugged
    into the computer. It opened, and it started transferring until it was about 70% completed, and then an error popped up saying "WET can't open the easy transfer file, make sure your USB device is plugged in or check your internet connection". 
    I checked, and the USB hard drive's light wasn't on. Now, I unplug it and plug it back in, and the light comes back on,
    so I click Retry, and it resets the bar back to nothing and says "Transfer time: 1 minute".
    Rather than continue trying, I clicked "Cancel" instead of Retry, and it says "Your transfer did not complete successfully."
    It says to click "view report" for more information, but there's no "view report button".
    At the moment, I am scanning the External Drive for bad sectors using the check disk tool in properties. It's frozen
    at "0 USN bytes processed".

  • Any Tutorial / Sample to create Single PDF from multiple source files using PDF assembler in a watched folder process.

    Any Tutorial / Sample to create Single PDF from multiple source files using PDF assembler in a watched folder process. I have a client application which will prepare number of source files and some meta data information (in .XML) which will be used in header/footer. Is it possible to put a run time generated DDX file in the watch folder and use it in Process. If possible how can I pass the file names in the DDX. Any sample Process will be very helpful.

    If possible, make use of Assembler API in your client application instead of doing this using watched folder. Here are the Assembler samples :  LiveCycle ES2.5 * Programming with LiveCycle ES2.5
    Watched folder can accept zip files (sample : Configuring a watched folder to handle multiple input files and write results to a single folder | Adobe LiveCycle Blog ). You can also use execute script to create the DDX at runtime : LiveCycle ES2 * Application Development Using LiveCycle Workbench ES2
    Thanks
    Wasil

  • Accessing comapny code from the source file name

    Hi,
    Iam doing FILE –FILE to scenario.
    My source file name is XXXX237061606.txt. (XXXX is company code)
    My requirement is …
    Based on company code from the source file name; I need to send the file to the corresponding receiver.
    How to retrieve the company code from the source file name?
    Thanks,
    Hem.

    hem chand wrote:>
    > Hi Varun,
    >
    > Could u please provide me detailed procedure to get the company code.
    >
    > Reg,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    This will get you the File name...TRuncate it to extract company code...
    Then have a mapping program with the receivers message type which is persent under SAP BASIS component....
    There map to the required receiver by getting the file name above..
    Create an int mapping for the above mapping and use that in ur enhanced recv determination

  • Documentation generator directly from C source files

    Hello,
    Is there any tool to generate HTML documentation directly from C sources files using Documentation Tags like "/// HIFN "?
    I know we can generate documentation with function panels documentation generator but that's not what I'm looking for. I'm looking for something like doxygen or javadoc with NI documentation tags support. 
    Regards,
    Aurélien.

    Hello AReeves!
    LabWindows/CVI features a documentation generation tool able to output HTML and XML format documentation from your C source files.
    You can use the source code documentation tags (e.g. HIFN, HIPAR, etc) to document your functions in the source code, similar to doxygen.
    The option is located in Build » Target Settings » Generate source code documentation. There you can select your output format.
    Here is a useful link related to generating documentation from source files using CVI:
    http://zone.ni.com/reference/en-XX/help/370051T-01/cvi/usermanual/tagsforsourcecode/
    Regards,
    - Johannes

  • Newbie question - how to save images out of an fla file

    I have what I'm sure is a very basic flash question. I have a flash movie (swf) and the accompanying fla file. I can open the fla file, and see all the images used in the file (symbols in the library), but how can I export or save one of these images separately from flash?

    you can right click, copy an image and then paste it into your choice of photoediting software.

  • Question on importing existing Images from 2.2.2

    What is the easiest way of importing existing images from OVM2.2.2 to OVM3.0.3 , would it work if I just import the .img files as disks and 'create virtual image' with them? Currently I zip them up and import as templates, but thats very slow process.

    Thanks for the quick reply, I've just been told they now want a code 39 code instead of ITF. This means I should be able to import a CSV file and convert it to the code 39 font which technically solves my problem. If I create linked text boxes and import the barcode data it should all fall in to place.
    Appreciate the help Haakenlid

  • I want to embed text AND image from same XML file

    Hey,
    I got following problem:
    I want to put 1 image AND my text in 1 external XML file.
    I can load either one of them in seperate XML files.
    I need this because I want my content to be scrollable on my website and with this my image has to scroll with my text.
    I got following AS3 put in now:
    (ACTIONSCRIPT3.0)
    //LOADING EXTERNAL XML & IMAGE//
    var xml:XML;
    var urlRequest:URLRequest = new URLRequest("externaltext/welkom_content.xml");
    var urlLoader:URLLoader = new URLLoader();
    urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
    urlLoader.load(urlRequest);
    function urlLoader_complete(evt:Event):void {
        xml = new XML(evt.target.data);
        welkom_content_text.text = xml.toXMLString();
    //LOADING EXTERNAL PICTURES//
    var xmlData:XML=new XML();
    var pHeight:Number = 200;
    var pWidth:Number = 200;
    var listLoader:URLLoader = new URLLoader( new URLRequest("externaltext/testxmlimage.xml") );
    var picLoader:Loader = new Loader();
    listLoader.addEventListener(Event.COMPLETE, gotList);
    function gotList(evt:Event):void {
       var xmlData:XML = XML(listLoader.data);
       var numImages:Number = xmlData.pix.length();
       var stImage:String = xmlData.image
    picLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, gotPic);
    picLoader.load( new URLRequest(stImage) );
    listLoader.removeEventListener(Event.COMPLETE, gotList);
    function gotPic(evt:Event):void {
    var thisBmp:Bitmap = Bitmap(evt.target.content);
    thisBmp.x = 0;
    thisBmp.y = 0;
    var thisWidth:Number = thisBmp.width;
    var thisHeight:Number = thisBmp.height;
    thisBmp.scaleX = pWidth/thisWidth;
    thisBmp.scaleY = pHeight/thisHeight;
    addChild(thisBmp);
    picLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, gotPic);
    (/ACTIONSCRIPT3.0)
    And my XML file for the text content is as following:
    (XML TEXT FILE)
    <?xml version="1.0" encoding="utf-8"?>
    .... ALL OF MY CONTENT
    (/XML TEXT FILE)
    And for my image the XML file is as following:
    (XML IMAGE FILE)
    <?xml version="1.0" encoding="utf-8"?>
    <imagelist>
    <image>externaltext/testpicxml.jpg</image>
    </imagelist>
    (/XML IMAGE FILE)
    Does anyone know how to fix this and how to do it?
    Thanks in advance!
    Every help is appreciated!

    Thanks!
    And again... I'm doing some things wrong.. I feel dumb!
    Trying to make a website in ASP.NET almost whole day, so my head isn't set to AS3 at all..
    My code now to embed XML looks like:
    var xml:XML = new XML();
    var XMLURL:String = "externaltext/welkom_content_pic.xml";
    var myXMLURL:URLRequest = new URLRequest(XMLURL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    var page:Sprite = new Sprite();
    myLoader.addEventListener("complete", urlLoader_complete);
    function urlLoader_complete(evt:Event):void {  
    addChild( page );
    page.addChild( welkom_title_text );
    page.addChild(  welkom_content_text );
    page.addChild(  welkom_image_holder );
    xml = new XML(evt.target.data);   
    welkom_title_text.text = [email protected]();   
    welkom_content_text.text = xml.item.toString();       
    //use URLLoader to load the image from the path [email protected]()
    Probably set some things wrong..
    And what exactly do I have to set to load my image with it?
    We were all a beginner once.. but I'm the uber annoying beginner I think... hehe
    I probably won't be answering untill thursday, because I got a day off, so..
    Thanks!!!!!!!!!!!!!!!!

  • Getting a high resolution image from a fla file

    I have the source to a fla file. I would like to get a still
    image from the video in in as high quality as possible so I can
    make a print. Playing the file I can zoom in quite a bit but the
    only way I can figure out how to get a still is a screen shot which
    is sub par quality. Any suggestions?

    Exporting Image Versions
    Select the Image.  "File➞Export➞Version".  Specify an Image Export Preset that is set to "Original Size".  If you use JPG, set quality to 10 or higher.
    Image Export Presets are set at "Aperture➞Presets➞Image Export ... ".

  • Issues with Loading Images from a Jar File

    This code snippet basically loops through a jar of gifs and loads them into a hashmap to be used later. The images all load into the HashMap just fine, I tested and made sure their widths and heights were changing as well as the buffer size from gif to gif. The problem comes in when some of the images are loaded to be painted they are incomplete it looks as though part of the image came through but not all of it, while other images look just fine. The old way in which we loaded the graphics didn't involve getting them from a jar file. My question is, is this a common problem with loading images from a jar from an applet? For a while I had tried to approach the problem by getting the URL of the image in a jar and passing that into the toolkit and creating the image that way, I was unsuccessful in getting that to work.
    //app is the Japplet
    MediaTracker tracker = new MediaTracker(app);
    //jf represents the jar file obj, enum for looping through jar entries
    Enumeration e = jf.entries();
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    //buffer for reading image stream
    byte buffer [];
    while(e.hasMoreElements())
    fileName = e.nextElement().toString();
    InputStream inputstream = jf.getInputStream(jf.getEntry(fileName));
    buffer = new byte[inputstream.available()];
    inputstream.read(buffer);
    currentIm = toolkit.createImage(buffer);
    tracker.addImage(currentIm, 0);
    tracker.waitForAll();
    images.put(fileName.substring(0, fileName.indexOf(".")), currentIm);
    } //while
    }//try
    catch(Exception e)
    e.printStackTrace();
    }

    compressed files are not the problem. It is just the problem of the read not returning all the bytes. Here is a working implementation:
    InputStream is = jar.getInputStream(entry);
    ByteArrayOutputStream os = new ByteArrayOutputStream(1024);
    try{
    byte[] buf = new byte[1024];
    int read;
    while((read = is.read(buf)) > 0) {
    os.write(buf, 0, read);
    catch(Exception e){
         e.printStackTrace();
         return null;
    image = Toolkit.getDefaultToolkit().createImage(os.toByteArray());
    This works but I think you end up opening the jar a second time and downloading it from the server again. Another way of getting the images is using the class loader:
    InputStream is = MyApplet.class.getResourceAsStream(strImageName);
    In this case, the image file needs to be at the same level than MyApplet.class but you don't get the benefit of enumerating of the images available in the jar.

Maybe you are looking for

  • Ipod not being recognised after updating software on it

    i bought the ipod some 3 months back and it worked fine all these days until 2 days back when i connected it to my friend's computer to use it as a disk. A dialog box popped up as soon as i connected the ipod saying i could either update or restore t

  • Constant Selection in BEx Query Designer on BI7

    Hi guys According to this blog <a href="/people/prakash.darji/blog/2006/09/19/the-hidden-secret-of-constant-selection Selection</a>, we can create constant selection on both Characteristics and Key figures. I understand how to do it with restricted k

  • [ALV] Text in color and bold

    Hello, I have an ALV Grid and I would like one cell, with text color in red and in bold. I'm in OOP's with CL_GUI_ALV_GRID. I've tried like that : CONSTANTS :             c_bold(4)           TYPE x       VALUE '00000020',             c_red(4)        

  • Setting the top picture for a photo album

    My conversion to the new iWeb has gone smoothly so far. I'm doing some re-ordering of my site to use the new My Albums pages. The thing is, when I drag one of my old Photo pages under the My Albums page, it always shows the first photo. How do I chan

  • Feature Request: 1. Clarify metadata updating in Guide, and 2. make errors visible.

    A couple things would help immensely: 1. Clarify metadata schema/version updating in the guide, and 2. make errors visible - as it stands, these flash by so fast they are unreadable. I've a feeling there's some useful information in them thats going