How to close pictures that are opened by JAI.create("fileload",filename)

After doing some deletion tests, it seems that all picture I'm loading with
JAI.create("fileload",filename) or JAI.create("filestore",pb) stay open and prevent me from deleting those pictures.
Do you have an idea on how I could close those pictures ?
thank you !
Edited by: dnlfrnc on Feb 13, 2008 10:42 AM

Short answer: you can't if you use JAI.create("fileload",filename) :you can't rely on making a call to the garbage collector, because you can't be sure it will work.
Instead, use the sream operator:
       FileSeekableStream stream = null;
        try {
            stream = new FileSeekableStream(sourceImageFile.getAbsolutePath());
            // use the stream operator because the fileload operator does not allow to release the handle on the opened file
            PlanarImage input = JAI.create("stream", stream);
            // do your stuff
        } finally {
            // close the stream.
            stream.close();
        } Why you don't have any means (besides gc, but I don't call that an option) of releasing the handle on a file you opened with the fileload operator is beyond me, though (especially as this operator is widely used in the tutorials, and thus is bond to end up in a lot of code)

Similar Messages

  • HT201365 How do you close your apps that are open

    How can I close the apps that are open

    Ive got a fix
    Dubble click your home button and swipe the picture of the application up and not the icon
    soo
    Dubble click your home button ---> Find app you want to close --> Swipe up on picture of application
    and it should be closed
    Hows the batterylife like on your phone?

  • HT4623 I recently upgraded my i-phone 4s phone with the new iOS7. Since that all the applications that I have opened will not close. How do I close applications that are running in the background?

    I recently upgraded my i-phone 4s phone with the new iOS7. Since that all the applications that I have opened will not close. How do I close applications that are running in the background?

    Double click your Menu button and swipe up the open Apps to close them.......

  • TS1702 I have just updated the op system on my phone, it now won't let me close down any apps that are open in the background, any ideas?

    I have just updated the op system on my phone, it now won't let me close down any apps that are open in the background, any ideas?

    Double-click the Home button to bring up the app screen, then swipe upwards on the app.
    http://howto.cnet.com/8301-11310_39-57602601-285/how-to-force-close-apps-on-ios- 7/
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base before you post a question.

  • HT4859 My phone was stolen.  I synced with my computer and lost some pictures that are backed up on the cloud.  How do I get pics from the cloud that are not in my photostream?

    My phone was stolen.  I first backe up from the icloud but then synced with my computer and lost some pictures that are backed up on the cloud.  How do I get pics from my old phone which are backed up on the cloud but are not in my photostream?

    If you have an iCloud backup, restore it to your phone as explained here: https://support.apple.com/kb/ph12521.  If you have a backup on your computer instead, restore it to your phone by connecting your phone to your computer, opening iTunes and going to File>Devices>Restore from Backup.

  • I can't seem to update my software, every time I do it says that there is a problem and to close everything that is open. Once I close everything it still doesn't work. How do I get it to complete?

    I can't seem to update my software, every time I do it says that there is a problem and to close everything that is open. Once I close everything it still doesn't work. How do I get it to complete?

    Make sure there's enough free space on the startup disk to install software updates...
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure there's a minimum of 15% free disk space.
    Freeing Up Hard Disk Space - Mac Guides

  • HT201205 How do I close applications that are running in the background on iOS 7.0?

    I used to close apps that stayed open in the background by. Double clicking on the home button and the holding one the apps till a Red X came on how can I do the same on iOS 7?

    Double tap the Home button...slide the last used view of the app(above the icon) up. Tap Home button when finished.

  • How do I see my pictures that are in my aperture library in finder?  I would like I be able to select  photos in finder when I am making photo books online without having to export them first from aperture jinto a new folder. Is there any way to view

    How do I see my pictures that are in my aperture library in finder?  I would like I be able to select  photos in finder when I am making photo books online without having to export them first from aperture jinto a new folder. Is there any way to view and download my pictures directly from finder?

    SamanthaR22 wrote:
    How do I see my pictures that are in my aperture library in finder?  I would like I be able to select  photos in finder when I am making photo books online without having to export them first from aperture jinto a new folder. Is there any way to view and download my pictures directly from finder?  [Emphasis added.]
    The digitization of data has introduced a complexity to our interactions with it that we continue to struggle with.  "Picture" and "Photo" now mean different things in different contexts.  In this case (and in general) defining our terms clearly is the first step towards understanding what we are trying to do.  Understanding is the path that allows us to do it.
    All pedantic, but please stick with me here  .
    You record a set of instantaneous data with a camera.
    That data is processed by your camera and saved to a file.
    The file format is usually either RAW or JPG.
    You transfer those files to your computer, and you import them into the program Aperture (often in one operation).
    From each camera-file imported, Aperture creates a record in its database (called, imho unhelpfully, a Library) and an Image that you see in the Aperture Browser and Viewer.
    Aperture links the Image and the imported file.
    The imported file is called, within Aperture, an Original.
    Every Image has an Original.
    The Image is not the Original.  The Image is what you see in Aperture.
    The Original is a file that is stored on your computer.
    You can make changes to an Image.
    Aperture calls these changes Adjustments.
    Adjustments are saved to another file attached to the record in the database.  Let's call this file the Changes File.
    Aperture uses these two files attached to the record in the database to create the Image.
    Image = Original + Changes File.
    The Image is not a file.
    Because the Image is not a file, it cannot be shared with other programs.  It exists only inside of Aperture.
    In order to share an Image with another program, you must first create a file of the Image.
    You do this by exporting Images ("File ▹ Export ▹ Version" is the command in Aperture; should be, imho, "File ▹ Export ▹ Image").
    You may ask, "Why all the complexity?  Why doesn't Aperture save Images as files?"  The answer is simple:  Images can require less — and in many cases very very much less — storage space than files of Images.  Rather than save a full-size file for every Image, Aperture saves only instructions on how to make that full-size file.  The gain in storage efficiency is huge.  The trade-off is that although your Images are always available to be made into share-able files, you must create those files when needed (which you do by exporting selected Images).
    Here is your question reworded with more precise terms:
    SamanthaR22 might have written:
    How do I access Images in my Aperture Library in the Finder?  I would like I be able to select files in the Finder when I am making photo books online without having to create them by exporting Images from Aperture into a new Finder folder. Is there any way to view and download my Images directly from the Finder?
    No, there is not.  Images exist only in Aperture, and are not accessible for use in other programs.  You must create, for each Image in your Aperture Library, a new file outside of your Aperture Library in order to use it with another program.
    Aperture does allow you to create and save within your Library share-able files of your Images.  These files are called Previews.  You specify the file parameters in Aperture Preferences on the Previews tab.  These files are available to other programs via the OS X Media Browser.  These files are what you get when you drag selected Images out of the Aperture program and drop them on another program or on your desktop (which is part of the Finder).
    HTH.
    —Kirby.

  • Having read how one might be able to send a video that is too large, it seems that those videos and still pictures that are sent, well at least for me anyway, end up 90 degrees to the horizontal...how do i send a pic, or video that is the right way up???.

    my question relates to the orientation of the videos, and still pictures that are sent via the ipad2...they always seem to be 90 degrees to the horizontal...can anyone suggest how to send them so that they will be the right way up???

    my question relates to the orientation of the videos, and still pictures that are sent via the ipad2...they always seem to be 90 degrees to the horizontal...can anyone suggest how to send them so that they will be the right way up???

  • HT4623 How do I close apps that are running in the background.  If you double click button you used to be able to press and hold for the "x" to come up to allow you to close, but now I can't .

    How do I close apps that are running in the background.  You used to double press the button, and then press and hold to allow the "x" to come up, so you could close them down.

    Close all apps in multi-task window
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen

  • How can I silently print all PDF documents that are opened automatically?

    For a special terminal PC I want to print all PDF's that are opened to be printed automatically and without user interaction. The PDF is loaded in an iFrame in the browser, this PDF then needs to be printed.
    I don't want to modify the PDF's, the PDF's are supplied by another resource.
    I was thinking about using a folder level script that prints each PDF document automatically as soon as it is opened, but I don't know how to accomplish this.

    Macropanther wrote:
    I don't think the installation process will allow that unless the printer is connected.
    Incorrect. Win or Mac, you can install a printer driver w/o the printer being connected.
    I have tried MS PowerPoint (which can't seem to accept paper wider than 56 inches) and have  used NeoOffice Draw
    You're using the wrong tools. PP shouldn't even be in consideration; I don't know about NeoOffice, but I tried its cousin LibreOffice, and it has issues with custom paper sizes; which is not surprising, given what these apps were designed for.
    What you need for actual banners (not web page banners) is a vector drawing tool or a DTP app. I'd say Illustrator or InDesign, but Adobe CS is expensive, and, if you're thinking of PowerPoint for this job, you're not ready for it.
    You can try Pages; although not quite DTP, it can do the job and it's inexpensive. There are other options, such as Swift Publisher (a DTP app) or Intaglio (a drawing app) -- both are more expensive than Pages, but still affordable; or you can go open source with Scribus (DTP) or InkScape (vector; requires X11). You already know the ups and downs of using open source. (These are just examples; you can find others if you look for them.)
    Although it's better to have Kinko's printer driver, to make sure of the correct options, you don't actually need it to print to PDF. You should be able to define a custom page size (eg, 12in × 72in) and create the PDF from it. Any app which uses the Mac OS X standard print function should be able to do it.

  • Software update failed how do I save the pictures that are on the phone?

    software update failed how do I save the pictures that are on the phone?

    You should have imported all pics taken with your iphone to your computer regularly as with any digital camera.
    Did you fail to do this?
    You would need to import them if you can.

  • HT201317 how do i look at my pictures that are in my photo stream after i log in on my icloud account?

    how do i look at my pictures that are in my photo stream after i log in on my icloud account?

    By syncing them from your iphoto using that article
    iOS and iPod: Syncing photos using iTunes - Apple - Support
    Or if last 30 days of pictures is enough for you, you just need to sign in to your icloud on the phone and turn photostream "ON".

  • How to connect to icloud - to view pictures and send pictures that are in cloud ?

    How to connect to iCloud to view and send pictures that are in the cloud?

    You can connect to iCloud from a computer by logging in to https://www.icloud.com
    You won't be able to view or send pictures from there however. Backups are stored in iCloud but all you can do with them is restore them to a device. Photostream pictures can be thought of as going through iCloud but you can't see them at iCloud -- just from another device. More Photostream info at http://support.apple.com/kb/HT4486

  • I just bought a macbook pro and I want to know how to restore pictures that were backed up on iCloud but then deleted from my phone. Isn't that the point of the backup so I can delete and make more space. Please help!

    I just bought a macbook pro and I want to know how to restore pictures that were backed up on iCloud but then deleted from my phone. Isn't that the point of the backup so I can delete and make more space. Please help!

    Log into the iCloud on your MacBook Pro and enable Photo Stream:
    Then launch iPhoto and set iPhoto's Photo Stream preferences to the following:
    Then check the Photo Stream section of iPhoto:
    This is to confirm that the photos are still in Photo Stream. If they are they will be imported into the library. 
    NOTE: not all photos in an iPhone will be in the Photo Stream. PS only keeps photos in it for 30 days.
    If you have the missing photos in your library put them in an album.  Connect your iPhone to the Mac and open iTunes.  In iTunes you can select that album in the library and sync the photos to your iPhone to get them back on the iPhone.
    OT

Maybe you are looking for

  • How can I install Photoshop 5.0 with Windows Vista?

    I have Photoshop 5.0 LE and have tried and tried to install it on windows vista. Does anyone have suggestions on how I can install it. My system Type is x64-based PC and my system directory is C:\windows\system 32. Any suggestions are welcome, I will

  • Upgrading Acrobat Standard 9  to Standart XI

    To upgrade Acrobat Standard 9 to Standard XI; Australian website, cost AU$199.00 US website, cost US$139.00 Why the cost diparity? Is there a difference in software? Why souldn't I upgrade from the US website and save 1/3 of the price?

  • Un Mount Time Machine

    I have Time Machine set up on an external hard drive connected to my MacBook Pro. When I try to unmount the external drive I get the message "The disk "Time Machine Backups" is in use and could not be ejected. Try quitting applications and try again"

  • Japanese language texts in an adobe interactive form

    How to implement Japanese text in Adobe form ? Also i want to know whether graph / chart functionality can be acheived in Adobe Form. I am using Adobe LiveCycle Designer 8.2 along with Webdynpro Java and Netweaver Version 7.0. Thanks in advance for t

  • TS1363 How can I get my phone out of recovery mode?

    How do I get my iphone 4 out of recovery when it says that it doesn't recognize my phone is connected to my laptop?