2 Replies Latest reply on Feb 6, 2012 6:46 AM by jonht

    getting geometricBounds of image

    jonht Level 1

      Hi,

      Can someone please explain what I'm doing wrong here.

       

      I'm trying to get the geometicBounds of a image, and of its parent frame.

       

      In the code below, the line myImageGeoBounds = myLinks[i].geometricBounds throws an error saying this object does not support the property or method 'geometicBounds'.

      The following line (myFrameGeoBounds = myLinks[i].parent.geometricBounds) is valid though.

       

      Is there another way to get the size of a image, not just the container frame?

       

      for (i = 0; i < myLinks.length; i++) {
                if (myLinks[i].linkType === "TIFF" || myLinks[i].linkType === "JPG") {
                          myImageGeoBounds = myLinks[i].geometricBounds;
                          myFrameGeoBounds = myLinks[i].parent.geometricBounds;
                          if (ImageLargerThanParentFrame(myImageGeoBounds, myFrameGeoBounds)) {
                                    found++;
                                      //do something
                            }
                }
      }
      
      
      

       

      Thanks for reading.

      John