Filtering images from the selection

I am writing a script that involves scaling and sorting images. Which means i have to access the geometricBounds property of the images. Now, when the selection contains either an EPS or PDF file the script fails.
So i am trying to filter through the selection array to find images that are NOT EPS or PDF. I noticed that EPS and PDF files don't have geometricBounds. So i was trying to use that property to sort it. But i am running into issues. Any thoughts? Solutions?
if(app.documents.length != 0){
  if(app.selection.length != 0){
  for(myCounter = 0; myCounter < app.selection.length; myCounter++){
  switch(app.selection[myCounter].constructor.name)
  case "GraphicLine":
  case "Oval":
  case "Polygon":
  case "Rectangle":
  if(app.selection[myCounter].contentType != ContentType.UNASSIGNED){ // checks to make sure frame contains an image.
     if(app.selection[myCounter].graphics[0].geometricBounds[0]) { // checks to see if image has a width property. else it avoids it.
           myObjectList.push(app.selection[myCounter]);
  break;
  if(myObjectList.length !=0){
                    openDialog(myObjectList, keyObj);
  // moveItems(myObjectList);
  } else {alert("Select some images, fool!")}

I noticed that EPS and PDF files don't have geometricBounds.
Hi,
Both do - check Object Model.
Looks like there is another reason as your script fails. Cant say more without details.
Notice that PDF and EPS is a standalone class (alike Image is) ==> so one does not include another.
Jarek

Similar Messages

  • If you right-click an image you can select to "Block Images" from the site, but how do you reverse this choice?

    If you right-click an image on a web page you can select to
    "Block Images from [the url of the site]".
    This works well, particularly to make the page printer-friendly, but how do you reverse this choice to see the images again?

    You can see all permissions for the current page in Tools > Page Info > Permissions
    If it is from a different domain then use this:
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Open the <i>Media</i> tab of the "Page Info" window.
    *Select the first image and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • HT4101 I discovered a fatal flaw in the iPad procedure for downloading images from camera to iPad: after selecting the images to be downloaded, an accidental touch of the "delete" button, wipes all selected images from the camera, with no warning?

    After downloading some 60 images from camera to iPad, I was "scrolling" down to select the last images, and inadvertently touched the "Delete" button that appears at the top right of the screen, when the "Select" option is chosen. I did not notice the warning "Delete 60 Images?", and continued scrolling down, when my finger touched the warning message. All my precious images were instantly deleted from the camera The sensitive touch screen feature makes this a real problem. Apple should "fix" this unacceptable feature, surely! I suggest that the images on the camera memory card should not be able to be deleted from the iPad, and this shpuld require to be done using the camera controls only. Similarly, the "Delete" or "Keep" options that appear after importing a selection from the camera, should NOT allow the images on rthe camera to be deleted, but only the imported (downloaded) images on the iPad. This unnecessary option could easily delete precious images from the camera!
    Apple should remove the option to delete images from the camera, and the iPad touch screen commands should olny delete images on the iPad. (Alternatively, the "delete option should be on a separatly accessed "page".)
    Surely enough users of the "Lightning to USB Camera Adapter" will agree with the above?

    No, I don't agree. Whenever you connect a camera to a computer you are given the opportunity to delete the photos on the camera after downloading in precisely the same way the iPad does this. The fact that you touched Delete and then ignored the Warning doesn't change anything.
    I've loaded thousands of photos on my IPad and never have had that problem.
    Don't blame a moment of carelessness on your device.
    If you want to make such a suggestion to Apple use http://apple.com/feedback

  • Drag and drop images from the OS or select images over filebrowser

    Hello,
    I want to create an image upload tool in JavaFX with similar functionality like Jumploader (http://jumploader.com/). The users should be able to select images from the filesystem that will be resized and uploaded to their website, similar as in Facebook. The difference is that I want users to be able to crop images directly in my application. This is something, other upload tools do not offer.
    I was searching weeks on the web trying to find a sample on how to drag and drop images in to a JavaFX 1.3.1 app or also to create a file browser. I have found many examples but they seem to be outdated. Is it to early yet to try and start projects like these with JavaFX as JavaFX is still under development? Or can anybody lead me in to the right direction?
    Thanks,
    Chris

    To be more precise, you can setup a JComponent or JPanel on top of your JavaFX nodes that has a TransferHandler that can convert the (AWT/Swing) images dragged to the app to JavaFX image and then insert it into the underlying node.
    As for the file chooser itselft: ListView and the JavaFX composer can allow you to create one quite easily. TreeView can aslso be used to a lesser extend (still a big buggy). For both of these, there are small bugs in the Cell API that may (or may not) prevent from displaying a proper thumbnail in the cells.
    You can also use a regular JFileChooser if you do not mind the dialog box having a different LnF from the rest of your application.

  • Aperture does not recognize that there are images to be imported on an SD card. My workaround is to copy the images from the ST card to a folder and then import the images from the folder. Aperture also imports incredibly slowly after the update to 3.4

    Aperture does not recognize that there are images to be imported on an SD card. My workaround is to copy the images from the SD card to a folder and then import the images from the folder. Aperture also imports incredibly slowly after the update to 3.4

    Check your Import settings in the Import Panel, i.e. all that might exclude the image type you want to import:
    If you did not exclude any file types, and still Aperture will not import, remove your ImageCapture preferences fro your user library:
    To remove the image capture preferences:
    If Aperture is running, quit Aperture,  and log off and on again.
    Open your user library from the Finder's Go menu: Hit Command Shift G (⌘⇧G) and then type in: ~/Library/Preferences/  then hit return.
    In the window that opens remove "com.apple.ImageCapture.plist"
    and look into the subfolder "ByHost": if there are files named com.apple.ImageCapture  something .plist  remove them too.
    then try again.
    And if that still does not help, remove the Aperture preferences as well:
    ~/Library/Preferences/aperture.plist
    Regards
    Léonie
    P.S. in MacOS Lion and later the user library ~/Library is hidden by default.
    You can reveal it also  from the Finder's "Go" menu:
    Finder > Go,   then hold down the options ⌥ key, until the Library appears in the drop-down menu, select it and open the Library folder. Then go to the "Preferences".

  • I have my camera (Canon 5D MARK 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put ab

    I have my camera (Canon 5D Mark 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put about 700 images in an untitled project folder, but all the images are the JPEGs.  What am I missing?
    Thanks,
    upsjdris

    Have you checked your "Import" settings for "Raw&Jpeg" pairs in the "Import" panel?
    You can set Aperture to import raw, jpeg, or raw&jpeg.
    If you imported Raw&Jpeg, but have set Aperture to use the Jpeg as original, you will see the imported image as Jpeg image, not as a raw image, even if the raw has also been imported. You can switch between Raw and Jpeg originals for selected images from the Photos menu:
    Photos > Use Raw as original.
    Regards
    Léonie

  • Show only images in the selected folder

    Hi All,
    It would be nice if I could show only the images in the selected folder without including images in subfolders. For example a check box next to the folder name could switch between "selected folder only" and "include subfolders" viewing modes.

    Un-check Menu/Library/Include Photos from Subitems.
    It is already there in V1.1.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Cannot separate images from the link panel

    Hi Sir,
    I need advice and tip to ungroup or separate the individual images from the link panel. I cannot select specific image from the rectangle frame. I have screen captured as belew. Any help is greatly appreciated.

    Hi Peter,
    I am using CS6, I managed to select each image using the Direct Selection Tool. However, I noticed that there is a "Link Icon" on the top left corner. Why does it appear?

  • Can BI Publisher read the images from the Database?

    Hi All,
    Can BI Publisher read the images from the Database?
    if yes how it can be achieved?
    Thanks
    Aravind

    Hi,
    There is an example in oracle db. Use the schema PM (Print Media).
    Select the corresponding table that contains the column AD_PHOTO.
    In your RTF template simply to print the image stored in the db use:
    <fo:instream-foreign-object content-type="image/jpg"> <xsl:value-of select="AD_PHOTO"/>
    </fo:instream-foreign-object>
    RUn the RTF template and it should show you all.
    Cheers
    Jorge
    p.s. If this answers your question then please grant the points and close the thread

  • I saw Corey Barker do a demo where he extracted an image from the background, then cleaned up the edge with a process that allowed him to de-fringe it.  I can't remember how he did it. And I can't find it.  Help!

    I saw Corey Barker do a demo a few weeks ago where he extracted an image from the background, then used a technique I was not familiar with to clean it up. You selected the area, then did something that involved going either to edit or select, then there was a dialog box that allowed you to dial it in, depending on the color background you were removing.  I can't find this anywhere. Can't remember.  It's driving me crazy!  If someone can help me find this, I would be very glad and grateful. Thanks!  Laura

    In technical support, sometimes you have to make educated guesses. I'm sorry that you were offended.
    iTunes does prompt when it is going to erase a device, and the message is clear.
    She said in her message that she was able to successfully sync the old ipad. This indicated to me that itunes wiping the data was not an issue, because either it had been setup at the apple store (in which case it doesn't actually wipe the ipad despite saying it will*) (*based on a single case I saw), or because the itunes media folder was migrated.
    Furthermore, my solution was to tell her how to backup her ipad (by either doing it manually, or as a last resort, by deleting the corrupt backup -- that she couldn't access anyway.)
    I got that last part of the instructions from the "Taking Control of your iphone" book which I found samples of when I did a google search for "corrupted backup itunes".
    She marked this as a solution, so it worked for her.

  • Adding image for the selected Tree leaf???

    Hi All,
             I am working with flex tree component in which i have to add
    an arrow image for the  selected leaf node. I tried to do this using itemclick event
    but cant make it. can you help me out in doing this???
    Note: I have written custom Tree and TreeItemRenderer...
    -Sundar

    Thanks for ur reply Grizzzzzzzzz,
                                                    is there a way to identify the selected leaf from within MyTreeItemRenderer(Extends TreeItemRenderer)?
                                                   If this is possible,i can add the image to the selected leaf of the tree.
    Right now i am assigning images to all the leaf nodes of the tree as follows:
    public  
    class MyTreeItemRenderer extends TreeItemRenderer
    * Override to draw a line in case current item is a leaf.
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):
    void{ 
    // Call super method 
    super.updateDisplayList(unscaledWidth, unscaledHeight);
    if(super.data){
    if(TreeListData(super.listData).hasChildren){
    // logic for parent node comes here
    else{ 
    //Adding leaf Image
    //Logic to add images to leaf 
    myImage.source = leafImage;
    myImage.x =
    super.label.x;
    //The above code adds images to all leaf nodes. CAN I ADD THIS IMAGE ONLY TO THE SELECTED LEAF NODE???
    //HOW TO FIND THE SELECTED LEAF NODE FROM HERE??? SO THAT SELECTED LEAF WILL BE ADDED WITH THE IMAGE???
    //The above code adds images to all leaf nodes. CAN I ADD THIS IMAGE ONLY TO THE SELECTED LEAF NODE???
    //HOW TO FIND THE SELECTED LEAF NODE FROM HERE??? SO THAT SELECTED LEAF WILL BE ADDED WITH THE IMAGE???
    THANKS,
    SUNDAR 

  • I have an Air running Mountain Lion. I also have a digital point-and-shoot camera, but have never downloaded any images from the camera to this Air. If I connect the camera to the Air, what might I expect? Will connecting the camera to the Air by a cable

    I have an 11" Air with lots of remaining capacity running Mountain Lion. I also have a digital point-and-shoot camera. I have never downloaded images from the camera to this Air. However, if I just connect the camera to the Air's USB port, with the camera's available cable, and the Air is open, will a program like ImageCapture or iPhoto, auomatically come up, and I can begin to download wanted images? Or, will this sort of connection delete or fry everything on the Air? Do I need any other software on board? Will current Apple onboard programs allow me to download images from my camera and not destroy everything else?

    Answered. Thanks.

  • Is it possible to get the image from the i pad when mirroring via Apple TV to fill the screen instead of appearing as a screen within a screen?

    When mirroring, is it possible to get the image from the ipad to fill the screen on the TV instead of appearing as a screen within a screen?

    Welcome to the Apple Community.
    No, the iPad has an aspect ratio of 4:3, a TV has an aspect ratio of 16:9, to fit one into the other is impossible without distorting the picture. If your TV has a zoom feature, you may be able to use this to fill the screen a little more to your liking, but this will result in cropping top and bottom.

  • How do I reorganize my photos on iPad 2?  I need to move (not copy) photos from one album to another.  When I use the copy function to another album, and then try to delete an image from the original album, the system wants to delete the photos from all a

    How do I reorganize my photos on iPad 2?  I need to move (not copy) photos from one album to another.  When I use the copy function to another album, and then try to delete an image from the original album, the system wants to delete the photos from all albums.  Please help.

    You can't do it directly on the iPad - the new album functionality basically only allows you to copy photos into those new albums, you can't move them. The way that I think of it as working is that you are just creating pointers to the photos in those new albums, so if you then delete the original photo on the iPad you therefore automatically delete all the pointers to it.
    If you want to re-organise your albums then you will need to do it on your computer and then sync those albums over to the iPad

  • How can I get an image from the screen? Like screen printer in PC to pasting after in word or other program.

    How can I get an image from the screen? Like screen printer in PC to pasting after in word or other program.

    If you do Cmd+Shift+3 you'll get a full screen image saved to your desktop as a jpg file.
    Also, you can use Cmd+Shift+4 and you'll get a cursor which you click+drag to draw a box. When you release the drag the boxed in area will be saved to the Desktop as a jpg file.

Maybe you are looking for