Image with width percentage causes the offset Y

When I put an image spark or mx on a percentage width, or 30%, the image is shifted location Y expected / desired. I have the Image in a HBox and I wait until it is flush with the top, but it seems to keep the same focus as the image full-size adding padding to the top.

Any suggestions?

Try to do the following:

  1. PaddingTop set to the myBox 0
  2. PaddingLeft set to the myBox 0

Image of the spark isn't horizontalAlign and verticalAlign, if the steps above don't work, try with a mx Image and setting the horizontalAlign and verticalAlign on the image for the top and left.  Looking at your picture, it seems that it is the scale of the image horizontally and vertically and the pixels of the image of drawing in the vertical center of the Image.  You must specify the Image in order to align the top and left.

Tags: Flex

Similar Questions

  • Tables of Images with different heights, causing the removal of Menu

    OK, I posted this issue in the Council of LabVIEW before I realized that it was associated with Vision.  I made some progress, narrowing of the cause, so I thought it would be best to start a new post here.  Here is the original post:

    http://forums.NI.com/T5/LabVIEW/blank-pop-up-menus/m-p/3281194#M958610

    I'm running into a problem with all of my menus of LabVIEW to shutter when I create arrays of images where the heights do not match.  I have attached a vi I created to illustrate the issue.  In this document, I take a starting image and then extract subsets of it.  Because I don't know how much I'll have to check out until the moment of execution, I'm subpictures in an array.  What I've discovered, is that if the heights of subpictures don't match, I get a weird bug that causes all the menus in LabVIEW empty.  This includes all right click pop up in the façade, block, or Project Explorer diagram and drop-down selections as for enums and ring controls.  It also includes the file menu at the top of the window.

    Rerun this vi with subpictures equivalent height or no subpictures corrects hidden menus.  In addition, running IMAQ Dispose (with Boolean true of images) corrects the problem.

    I'm relatively new to the Vision, so I don't know if I'm missing something basic, but please let me know what you think.  Is there a better way to do this?

    Thank you

    Tim

    Hi Tim,.

    Thanks for reporting this problem. I have reported as a bug.

    I recommend using a Cluster or the KING for manual zoom toolbar. If you want to use an array, each element of the array must maintain the same amount of zoom. (Similar to each LED in a table must have the same color.)

    Sorry you came across this bug.

    Kind regards

  • Setting the width and the height of the elements (texts, images), with custom percentages associated with the width of the browser

    Dear Muse-Geeks,

    I'm really pleased with the ability and especially the ease use of Muse. But I couldn't imagine that the width of a text box, image, the box cannot be defined as a percentage of the width of the browser.

    But now after some research on the web I really seems the only option is the 100% browser width.

    I just missed something to set a value in percentage (vertical/horizontal) size?

    Concerning

    André

    Hi Woods

    When you talk about the size of objects as a % of the browser, I think you are talking about the responsiveness of the site. If Yes, then it is not possible to create sensitive sites in Muse at the moment. But yes, you can set the width to 100% for some items and a slide show full-screen only.

    Kind regards

    Aish

  • Executives ignored in the acquisition of images with 4 Configuration of the camera (cards 2 x 1430), record only half of the expected data

    Hi all

    I have a VI that puts in place a continuous grab for four camera link cameras at 100 Hz (512 x 640).  I have the cameras running on an external clock of 100 Hz for synchronization (comes from box NI DAQ, trigger ports on 1430 cards are not connected to anything).  The VI sticks all the frames in a queue, and then I (slowly) he writes to disk after that I get what I want.

    The problem is, for a minute 4 capture, I get only about 14 000 items in the queue instead of 24 000.  Also, each image gets populated with a number of buffer, so I can see it is missing all the other images or something like that, sometimes it will jump 10 in a row, sometimes it will jump rare... any ideas?

    Here is a picture of my installation of collection (Scripture on the part of the disk is not displayed, but that pours out of the queue is fine)-

    Hello

    I see a number of problems with the approach in your VI that I'll try to cover...

    Your consumption with queues and images won't work as you wrote because the images are a type of reference data and so put them in the queues is not copy data values, only the references. So if you keep to the same reference to the image in a queue, they are all pointing to the same data of the image (which may be substituted).

    A better approach is to have two queues of images, representing the 'free' pads and then one that represents the images 'full' (your queue current consumer). You would then have your acquisition loop pull a 'free' image, fill it with data via a Get buffer call and then queue it for your use. Your consumer could pull this queue, do its thing and then queue the image to the queue 'free' for the producer to use again.

    In addition, your code does not currently use the lower level is VI buffer, so you take advantage of the buffering model input-output IMAQ uses internally. The simple Grab acquire VI returns only the most recent image, but if you fall at all it does not use the FIFO. You want to call make buffer with a buffer incremeenting number so that you do not skip the buffers and are allowed to get behind up to the number of buffers in the buffers configured list.

    Eric

  • Background image with scrolling not for the screen

    Hi all.

    I use the following code to make the background dropdown not image, and it works for all BlackBerry Storm2 (OS 5.0) except (I tried it on a simulator):

    public class MyScreen extends MainScreen{
    
    ...
    
        public MyScreen() {
           super(NO_VERTICAL_SCROLL);
           bitmap=loadBG();       super.add(mContainer = new BGVerticalFieldManager(bitmap));
        }
        public void add(Field field){        mContainer.add(field);    }...
    
    }
    
    public class BGVerticalFieldManager extends VerticalFieldManager {
        Bitmap mBgBitmap = null;
        int mBgWidth = -1;
        int mBgHeight = -1;
        int mBgX = -1;
        int mBgY = -1;
    
        public BGVerticalFieldManager(Bitmap background) {
            super(USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL
                    | VERTICAL_SCROLLBAR);
            mBgBitmap = background;
            mBgWidth = mBgBitmap.getWidth();
            mBgHeight = mBgBitmap.getHeight();
            mBgX = (Display.getWidth() - mBgWidth) >> 1;
            mBgY = (Display.getHeight() - mBgHeight) >> 1;
    
        }
    
        protected void paintBackground(Graphics graphics) {
            paintBackgroundBitmap(graphics);
        }
    
        protected void sublayout(int maxWidth, int maxHeight) {
            mBgX = (Display.getWidth() - mBgWidth) >> 1;
            mBgY = (Display.getHeight() - mBgHeight) >> 1;
            super.sublayout(maxWidth, maxHeight);
        }
    
        private void paintBackgroundBitmap(Graphics graphics) {
            if (null != mBgBitmap) {
                int x = mBgX
                        + getHorizontalScroll();
                int y = mBgY
                        + getVerticalScroll();
                graphics.drawBitmap(x, y, mBgWidth, mBgHeight, mBgBitmap, 0, 0);
            }
        }
    
    }
    

    The Storm2 scrolls the background image, looks that getVerticallScroll() does not work.

    Can someone help me with this?

    Thank you.

    also have glance at this:

    http://supportforums.BlackBerry.com/T5/Java-development/use-a-background-image-in-application-screen...

  • Pick activity with transaction XA causing the double mistake

    Hi all

    Hi all

    I have a BPEL service that reads the message to a JMS queue and then waits for a response with a PICK 5 min on alarm activity. Now there are rare cases, when I did not receive the answer within 5 minutes (but after > 5 min) and the Pick activity goes into alarm and error. But my JMS queue has an active XA transaction and that translates into a retry of the function of the source. This re-triggers all of the services and another pick activity is created. the choice of the second activity ends sometimes successfully, but sometimes also with the double-error error activity.

    The exact error message is attached here... Note also that we set the correlation id for the intervention on the pick activity...

    concerning

    Rakesh

    Hello

    That's an option... but I try to understand what is causing this intermittent problem to throw the double error message.

    Thank you

    Rakesh JS

  • Having problems capturing the image with 2 cameras and the PCIe-1430

    I have problems of switching between my two cameras and breaking or capture images in Labview or MAX. I can switch between cameras and capture images very well so that in the Vision Development Module, but not in Labview or MAX. However, it does not work the first time I have capture an image of a port, but not after that.

    This the error I get LabVIEW:

    1074397150 error occurred at Snap.vi IMAQ

    Possible reasons:

    NOR-IMAQ: A timeout error has occurred while you wait for it
    specified event.  If you expect a picture, check that all the videos
    data are acquired during the period.  If waiting for a
    signal, check that the assertion of signal occurs within the time limit
    period.

    This error I get from MAX:

    The IMAQ error

    Error 0xBFF60022

    A timeout error occurred while you wait for the specified event.
    If you expect a picture, make sure all video data is acquired
    during the period. If you wait for a signal, check that the
    affirmation of signal occurs within the time limit.

    The following list is what I currently use:

    1 card PCIe-1430

    2 cameras JAI Pulnix CM-140MCL

    LabVIEW 9000 f3

    Vision Assistant build 20090611041452

    MAX 4.6

    NEITHER Vision 9.0

    IMAQ 4.3


  • Export all images with an aspect of the specified image (Adobe indesign)

    Hi all

    Please answer this question

    This is an original Image:

    bv.jpg

    After placing in indesign, I manually do adjustment as below

    juice.png

    In my Indesign document , I did like this layout about 30 images. When I make package, in the links folder contain only original image. This editing option manual not exported. But I need the second a (fitting manual image).

    Someone help me please!

    When I make the package in the folder of links contain only the original image

    Rectangle frame in indesign play like mask and no image editing, if you want to change image made it to photoshop, then place it in indesign.

  • Last image in LR cropping causes the flicker of the image

    reqlly do not know how to deny this, but I need modify a group of pictures today and was the first time since the last update. When cropping an image, the image flashes and seems pretty rough during the operation. Never used to do this, so I don't know what it's the devil.

    Now, I must confess I also updated OS X last week who could be a part also. Any ideas?

    Try to uncheck the option preferences > performance > CPU graph use.

  • smoothing causes the offset of the brush

    I have a cintiq companion 1 and have had no problems with it until recently. When you use Flash Pro CC it lags when I fast repetitive shots. When I draw a series of vertical lines slowly, there is no problem, but when I draw vertical lines quickly, the bottom of a single line will connect to the top of the next line. the circles drawn slowly looks good but circles drawn quickly are more like a "D" ' instead of an "O". I had a similar problem with the intuos model, but it was fixed by restoring a previous backup. There is a period where the brush stroke is be smooth. No other line is saved until the first line is smooth (smoothing has 26 and takes about a half second) so I can't quickly draw lines which is very annoying.

    I uninstalled and reinstalled Flash and the Tablet driver. I disabled "hold for right click on", "shortcuts" and "windows ink".

    The lag is worse in files that have the most content, and new documents have less lag. There is no lag in photoshop but flash is what I most need.

    It started three days ago and I have no idea what is wrong. Neither Flash or the driver has received an update recently

    64-bit Windows
    8 GB RAM
    i7 processor

    No, it is not likely to corrupt, but you have probably reached the amount of wall of vectors in the comfort zone of the Flash. It is also possible that you have added to many executives. How long lasts the timeline? He started the bog nearly 10,000 and much sooner if you have large elements in the files. Also if you tween a large vector element it will be certainly small decrease in performance. A few ways to solve this problem is to untween and wait until you're done, or to hide this layer which will sometimes help. IF you try to make a movie with several scenes that have origins and animation in each they typical that did in a production environment is to break down each scene individually and then export them separated for the assembly in a video such as Final Cut Pro or Premiere Editor.

    Also the amount of blank space you have on your drive hard drive can affect performance as well. If the file is huge and it lags behind, then you close and open a new or another file and it continues to accuse, then this might be a memory problem. Zipper, restart the computer, when it's done open Flash and start a new file. HE hangs out? If Yes, then your question could be Flash prefs are corrupt, or it is possible that you have a hardware problem. If there is NO lag, then open the disturbing of the file, and then close and reopen another file and if there is lag then it is likely that the problem is the loss of free memory after opening the file because your computer will not release the freed memory after that the troubled file sucked everything.

    In any case, that's all I can think of at the moment so I hope that one of those is a good solution.

  • How to bind dynamically image with a path to the image?

    XML given by path of the image. How to link to the image field in adobe livecycle?

    Try the LiveCycle forums...

  • Problem with video Capture where the connection settings are unavailable

    I have two capture - Dazzle Platinum 100 and Game2 PC cards. The issue is the same with both, so it must be something to do with a setting on my laptop.  I can't access the setting of the video input in the Capture menu of one of the capture software I've tried. I can select the device in the Source menu, but nothing happens when I click on the menus of the video input (the options are missing). As such, I can't select the composite input. The audio seems ok.

    The xbox and tv are connected using a separator and the component drive with connectors yellow, red and white coming on TV and I tried the two Pal 50 and 60 in the settings menu of xbox. I have set the settings to capture PAL and have also tried all the others.

    I also disabled the webcam and uninstalled the webcam software in the case which has been cause of conflict. The dazzle card detects an entry but cela there is no picture, just a white screen with lines. The dazzle card also caused regular dumps while the Game2PC only gives the incorrect parameter error 0 x 80070057/11878 they both.

    I've now provided all that may be in conflict has been uninstalled. I tried to change the capture settings and they are not available. Device Manager checked again and it appears Windows detects the device as device not video and Audio. Why would you think?

    I solved this by downloading a new driver from the manufacturer's website. The disk driver provided seems to have been inconsistent with Windows and caused the device to be considered an audio device only. Windows drivers has also caused this problem.

  • Built-in Windows 8 camera causes the crash

    I have a 15 dashboard recently I upgraded to Win 7 Pro for Windows 8 Pro.  Everything seems to work fine EXCEPT the built-in camera.  Whenever I have try and use it with Skype, it causes the computer crash blue screen with a KERNAL_SECURITY_CHECK_FAILURE.  Check closely, there seems to be a lot of complaints about this, but no new update driver Win 8, Lenovo.  Any information would be appreciated...

    Hi, studew

    I have a workaround possible for you until Lenovo can release the camera built into your system and Windows 8 driver.

    If display you the charm bar from the desktop or the main screen of the metro and select Search, then type "Troubleshooting" and change the filter settings, a parameter called Troubleshooting should appear. Select this option. A list of programs should appear. Scroll down and select Skype. From there you should be able to put Skype to run in Windows 7 compatibility mode.

    Because you are using a Windows 7 driver for your computer, as it was the last version, then Skype running in compatibility mode with Windows 7 can help you use your camera in this function.

    Hope this helps and let me know how it goes.

    Adam

  • Need a Script to the space of images on a total gap, then tag each image with the percentage of the total image space

    By editing the other scripts, I found here and other sites (including the labels size rorohiko), I worked on a script that will each image with the dimensions of the label and calculate the percentage of the spread of everything (including the text, white space).

    Now, I was invited to a script that tagged the images with the percentage of total image on a gap space. This script is so space images on a total gap, then tag each image with the percentage of the total image space. For example if there is an image that is 10 x 10 inches and four pictures that are images of 2.5x2.5, 10 x 10 would be tagged with 50% and the 2.5x2.5 would be tagged with 12.5%.

    This is the script that does the percentage of total circulation. Can some clever person get to do what I need?

    Suze

    (Sorry, I don't know how to post the script here with line numbers!)

    //

    This script adds printing of information labels to each graphic image. The labels are on a separate layer

    named "PercentageLabels" so that all these added labels can be removed again by simply removing

    the layer.

    //

    If you move or resize items, simply re-run the script to update the labels.

    //

    Before (re) start the script, you can define a paragraph style "SizeLabelStyle".

    This style will apply to all content on labels.

    //

    Before (re) start the script, you can set a style of object 'SizeLabelObjectStyle '.

    This style of object apply to all executives of the label - so if you want a specific background

    fill out or frame, do it through this object style.

    //

    You can change the units of the size label. I put in inches. Change the line below that has

    kUnitToUse - you can use:

    MeasurementUnits.CENTIMETERS

    MeasurementUnits.CICERO

    MeasurementUnits.INCHES

    MeasurementUnits.MILLIMETERS

    MeasurementUnits.PICAS

    MeasurementUnits.PIXELS

    MeasurementUnits.POINTS

    //

    By default the script will not attempt to label the "nested" images If you also want to label

    nested images (for example inline images, anchored frames, pasted images in the images,...) to change the line

    below to read:

    kLabelNestedItems = 1

    //

    If you want a specific image to stay without a label, you can use the Script label palette for

    assign a script called 'ignore' for this frame. The script will then not label this framework to the

    the title of the script is removed again.

    //

    Change the lines with kDontLabelImageFrames, kDontLabelTextFrames, kDontLabelOtherFrames

    below if you want to restrict labelling to only certain types of images: replace the '0'

    in "1" to enable these options.

    //

    Change the line with kShowImageFileName if you also want to display the names of the image in the

    size for the picture frames.

    //

    Small frames are not labelled - the cutoff point is currently a less than 0.1 inch high framework

    or 0.1 inch wide. You can change the cutoff point by adjusting the lines with kDontLabelBelowWidth

    or kDontLabelBelowHeight below.

    //

    var Girard;

    var gScriptFile;

    var gCaches;

    // ****************

    That's cheating spread automatically calculated

    var doc = app.activeDocument;

    doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;

    doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;

    PageWidth = doc.documentPreferences.pageWidth var;

    stucture var pagewidth = * 2;

    var spreadheight = doc.documentPreferences.pageHeight;

    var spreadsquinch = stucture * spreadheight;

    Alert ("the total measure of square inch of spread is:" + spreadsquinch);

    //******************

    VR;

    {

    If (app.activeScript instanceof file)

    {

    var gScriptFile = app.activeScript;

    }

    }

    catch (Girard)

    {

    }

    If (typeof (kLogLevel) is "undefined")

    {

    const kLogLevel = 5;

    const kMaxLogNestLevel = 5;

    const kLogToMessageBox = 0;

    const kLogToConsole = 0;

    const kLogToFile = 0;

    const kLogFileName = "PercentageLabels.log";

    const kIgnoreFrameLabel = "ignore."

    const kSizeLabelLayerName = "PercentageLabels";

    const kLabelNestedItems = 0;

    const kDontLabelImageFrames = 0;

    const kDontLabelTextFrames = 1;

    const kDontLabelOtherFrames = 0;

    const kUnitToUse = MeasurementUnits.INCHES;

    const kShowImageFileName = 0; This set to 1 to precede the name of the image file in the tag

    Below all of the measures are expressed in kUnitToUse (e.g. inches if MeasurementUnits.INCHES is used)

    const kRoundToDecimals = 2;

    The separator to use between objects - for example MyImage.jpg - 7.22 x 9,34

    const kSeparatorBetweenNameAndSize = "-";

    const kSeparatorBetweenHeightAndWidth = "H x"; "

    const kSeparatorAfterWidth = "W";

    const kDontLabelBelowWidth = 0.1; In kUnitToUse

    const kDontLabelBelowHeight = 0.1; In kUnitToUse

    const kLabelStyleName = "SizeLabelStyle";

    const kLabelObjectStyleName = "SizeLabelObjectStyle";

    const kLabelHeight = 0.6; In kUnitToUse

    const kLabelWidth = 2.5; Expressed in kUnitToUse (e.g., inches).

    }

    var gRunState =

    {

    logToMessageBox: kLogToMessageBox,

    logToConsole: kLogToConsole,.

    logToFile: kLogToFile,.

    functionNestLevel: 0,

    logFunctionEntry: true,

    logFunctionExit: true,

    logLevel: kLogLevel,.

    logFileName: kLogFileName

    };

    Main();

    // ****************

    function ConvertToFrame (thePageItem)

    {

    / * / / / LogEntry ("ConvertToFrame");

    var retVal = thePageItem.getElements () [0];

    / * / / / LogExit ("ConvertToFrame");

    Return retVal;

    }

    // ****************

    function CollectionToArray (theCollection)

    {

    / * / / / LogEntry ("CollectionToArray");

    var retVal = theCollection.everyItem () .getElements () .slice (0);

    / * / / / LogExit ("CollectionToArray");

    Return retVal;

    }

    // ****************

    function GetImageFile (pageItem)

    {

    / * / / / LogEntry ("GetImageFile");

    var imageFile = null;

    do

    {

    Try

    {

    pageItem = ConvertToFrame (pageItem);

    If (!) (("allGraphics" in pageItem))

    {

    break;

    }

    var allGraphics = pageItem.allGraphics.slice (0);

    If (allGraphics.length == 0)

    {

    break;

    }

    var chart = allGraphics [0];

    var graphic.itemLink = link;

    imageFile = new File (link.filePath);

    }

    catch (Girard)

    {

    }

    }

    While (false);

    / * / / / LogExit ("GetImageFile");

    return imageFile.

    }

    // ****************

    function GetImageName (pageItem)

    {

    / * / / / LogEntry ("GetImageName");

    var imageName = "";

    do

    {

    var imageFile = GetImageFile (pageItem);

    If (imageFile is nothing)

    {

    break;

    }

    imageName = imageFile.displayName;

    }

    While (false);

    / * / / / LogExit ("GetImageName");

    return imageName;

    }

    // ****************

    function GetOuterPageItem (pageItem)

    {

    / * / / / LogEntry ("GetOuterPageItem");

    var retVal = null;

    do

    {

    Try

    {

    retVal = pageItem.parent;

    If (retVal instanceof spread | retVal instanceof Page)

    {

    retVal = pageItem;

    break;

    }

    If (retVal instanceof character)

    {

    retVal = GetOuterPageItem(retVal.parentTextFrames[0]);

    break;

    }

    }

    catch (Girard)

    {

    retVal = null;

    }

    }

    While (false);

    / * / / / LogExit ("GetOuterPageItem");

    Return retVal;

    }

    // ****************

    function LogMessage (message, collapseLines)

    {

    If (gRunState.logToConsole)

    {

    $.writeln (message);

    }

    If (gRunState.logToFile)

    {

    var logFile = new file (gScriptFile.parent + "/" + gRunState.logFileName);

    var now = new Date();

    logFile.open ("a");

    logFile.write (now.toString () + ":"+ message + "\n" ');

    logFile.close ();

    }

    If (gRunState.logToMessageBox)

    {

    Alert (message);

    }

    }

    // ****************

    LogEntry (message) function

    {

    If (gRunState.logFunctionEntry)

    {

    If (gRunState.functionNestLevel < kMaxLogNestLevel) {}

    for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)

    {

    message = "" + message;

    }

    Filled (message + "<", true);

    }

    }

    gRunState.functionNestLevel ++;

    }

    // ****************

    function LogError (message)

    {

    If (gRunState.logLevel > = 1).

    {

    LogMessage ("* ERROR *:" + message, false);

    }

    }

    // ****************

    function LogExit (message)

    {

    -gRunState.functionNestLevel;

    If (gRunState.functionNestLevel < 0)

    {

    LogError ("LogExit: unbalanced nesting of function");

    }

    If (gRunState.logFunctionExit)

    {

    If (gRunState.functionNestLevel < kMaxLogNestLevel) {}

    for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)

    {

    message = "" + message;

    }

    Filled (message + ">", true);

    }

    }

    }

    // ****************

    function LogNote (message)

    {

    If (gRunState.logLevel > = 3)

    {

    LogMessage ("Note:" + message, false);

    }

    }

    // ****************

    function LogWarning (message)

    {

    If (gRunState.logLevel > = 2)

    {

    LogMessage ("WARNING:" + message, false);

    }

    }

    // ****************

    function Main()

    {

    / * / / / LogEntry ("Main");

    var savedUserInteractionLevel = app.scriptPreferences.userInteractionLevel;

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

    do

    {

    Try

    {

    activeDocument var = app.activeDocument;

    If (!.) (activeDocument instanceof Document))

    {

    LogError ("hand: activeDocument isn't a Document");

    break;

    }

    var savedHorizontalMeasurementUnits = activeDocument.viewPreferences.horizontalMeasurementUnits;

    activeDocument.viewPreferences.horizontalMeasurementUnits = kUnitToUse;

    var savedVerticalMeasurementUnits = activeDocument.viewPreferences.verticalMeasurementUnits;

    activeDocument.viewPreferences.verticalMeasurementUnits = kUnitToUse;

    var savedRulerOrigin = activeDocument.viewPreferences.rulerOrigin;

    activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;

    do

    {

    Try

    {

    ProcessFrames (activeDocument);

    }

    catch (Girard)

    {

    Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."

    }

    }

    While (false);

    activeDocument.viewPreferences.rulerOrigin = savedRulerOrigin;

    activeDocument.viewPreferences.horizontalMeasurementUnits = savedHorizontalMeasurementUnits;

    activeDocument.viewPreferences.verticalMeasurementUnits = savedVerticalMeasurementUnits;

    }

    catch (Girard)

    {

    Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."

    LogError ("Hand throw" + Girard);

    }

    }

    While (false);

    app.scriptPreferences.userInteractionLevel = savedUserInteractionLevel;

    / * / / / LogExit ("Main");

    }

    // ****************

    function ProcessFrames (doc)

    {

    / * / / / LogEntry ("ProcessFrames");

    var err;

    do

    {

    If (!.) (doc instanceof Document))

    {

    LogError ("ProcessFrames: doc should be a Document");

    break;

    }

    Try

    {

    var existingLayer = doc.layers.itemByName (kSizeLabelLayerName);

    existingLayer.id;

    existingLayer.remove ();

    }

    catch (err)

    {

    }

    If (kLabelNestedItems)

    {

    var pageItems = doc.allPageItems.slice (0);

    }

    on the other

    {

    var pageItems = CollectionToArray (doc.pageItems);

    }

    var frameReferences = [];

    for (var pageItemIdx = 0; pageItemIdx < pageItems.length; pageItemIdx ++)

    {

    do

    {

    var pageItem = pageItems [pageItemIdx];

    If (pageItem.itemLayer.name is kSizeLabelLayerName)

    {

    break;

    }

    var pageItem = ConvertToFrame (pageItem);

    If (instanceof TextFrame pageItem)

    {

    If (kDontLabelTextFrames)

    {

    break;

    }

    }

    ElseIf (pageItem graphic instanceof)

    {

    If (kDontLabelImageFrames)

    {

    break;

    }

    }

    on the other

    {

    If (kDontLabelOtherFrames)

    {

    break;

    }

    }

    If (pageItem.label.toLowerCase () is kIgnoreFrameLabel)

    {

    break;

    }

    var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];

    var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];

    If (width < kDontLabelBelowWidth)

    {

    break;

    }

    If (height, kDontLabelBelowHeight)

    {

    break;

    }

    frameReferences.push (pageItem);

    }

    While (false);

    }

    var sizeLabelLayer = doc.layers.add ({name: kSizeLabelLayerName});

    for (var pageItemIdx = 0; pageItemIdx < frameReferences.length; pageItemIdx ++)

    {

    Try

    {

    var pageItem = frameReferences [pageItemIdx];

    var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];

    var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];

    var labelItem = doc.textFrames.add (null, LocationOptions.BEFORE, GetOuterPageItem (pageItem));

    labelItem.itemLayer = sizeLabelLayer;

    var boxsquinch = width * height

    var boxpercent = (boxsquinch / spreadsquinch) * 100

    var roundpercent = Math.round (boxpercent)

    var labelText = "";

    If (kShowImageFileName)

    {

    var imageName = GetImageName (pageItem);

    If (imageName! = "")

    {

    labelText += imageName + kSeparatorBetweenNameAndSize;

    }

    }

    labelText += RoundString (height, kRoundToDecimals) + kSeparatorBetweenHeightAndWidth + RoundString(width, kRoundToDecimals) + kSeparatorAfterWidth + ' \r\n'+ roundpercent + '% ';

    labelItem.contents = labelText;

    xPos = pageItem.geometricBounds var [1];

    yPos = pageItem.geometricBounds var [0] + kLabelHeight;

    labelItem.geometricBounds is [Posy, xPos, yPos + kLabelHeight, xPos + kLabelWidth];.

    Try

    {

    labelItem.parentStory.characters.everyItem () .appliedCharacterStyle = doc.characterStyles.item (0);

    }

    catch (err)

    {

    }

    Try

    {

    labelItem.parentStory.paragraphs.everyItem () .appliedParagraphStyle = kLabelStyleName;

    }

    catch (err)

    {

    }

    Try

    {

    labelItem.appliedObjectStyle = doc.objectStyles.itemByName (kLabelObjectStyleName);

    }

    catch (err)

    {

    }

    }

    catch (err)

    {

    }

    }

    }

    While (false);

    / * / / / LogExit ("ProcessFrames");

    }

    // ****************

    function RoundString (numVal, decimal)

    {

    / * / / / LogEntry ("Round");

    var retVal = Math.round (numVal * Math.pow(10,decimals)) + "";

    retVal = retVal.substring(0,retVal.length-decimals) + "." + retVal.substring(retVal.length-decimals);

    / * / / / LogExit ("Round");

    Return retVal;

    }

    What do you mean?

    var myDoc = app.activeDocument;
    var mySpreads = myDoc.spreads;
    var myRectangles = myDoc.rectangles;
    var myImages = 0;
    for (var i = 0; i < mySpreads.length; i++) {
        var mySpreadWidth = 0;
        var mySpreadHeight = myDoc.documentPreferences.pageHeight;
        for (var j = 0; j < mySpreads[i].pages.length; j++) {
            mySpreadWidth += myDoc.documentPreferences.pageWidth;
            }
        var mySpreadArea = mySpreadWidth * mySpreadHeight;
        var myImages = mySpreads[i].rectangles;
        var myTotalImageArea = 0;
        var myIndividualImageArea = [];
        for (var j = 0; j < myImages.length; j++) {
            var myImageGeometricBounds = myImages[j].geometricBounds;
            var myImageWidth = myImageGeometricBounds[3] - myImageGeometricBounds[1];
            var myImageHeight = myImageGeometricBounds[2] - myImageGeometricBounds[0];
            myIndividualImageArea[j] = (myImageWidth * myImageHeight);
            myTotalImageArea += myIndividualImageArea[j];
            }
        for (var j = 0; j < myIndividualImageArea.length; j++) {
            alert("Image percentage of total images on spread " + (i + 1) + " = " + (myIndividualImageArea[j] * 100) /myTotalImageArea);
            }
       alert("Total image percentage on spread " + (i + 1) + " = " + myTotalImageArea);
       }
    
  • Acquisition of images with 3 USB cameras causing too many uses of the memory/cpu

    Dear experts,

    I'm trying to capture images with 3 cameras USB, located in 3 different positions. I have to initialize each cameras using USB list vi camera when switching between cameras. I realize that, by making this method causing too many uses of the memory/cpu and can cause CPU hang up. If I stop the program, the memory/cpu counter are down.

    Do you know how to reduce this problem.

    Thank you

    Hart


Maybe you are looking for

  • How can I configure my Airport Express to mesh with new cable modem bridge mode?

    Time Warner sent me a new cable modem and my Airport express still flashing orange light. How can I configure the Airport express in bridge mode?

  • Skype 7.12.0.101 stops automatically in windows 10 home 64-bit

    Hello The Skype app for my windows 10 stops automatically at startup. The problem started with version 7.11. I tried uninstalling and reinstalling several times but nothing helped. I enclose the dxdiag info. I have 2 graphics card in my system: Intel

  • Do I unstall unexpected 6s iphone apps

    What is the process to uninstall previously downloaded app from Iphone 6 s?

  • Satellite A60 accidents

    Hello. I recently bought a Satellite A60-205. For some reason, the laptop crashes after a while. The screen is frozen and even my mouse cursor does not move.What is an overheating problem? I have a P4HT 3.2, but I don't use heavy programs. Just surf

  • How to send a pulse to a relay

    Hello I'm using LabVIEW 8.6 to control a solenoid via a C series relay module. I want to activate the relay for a period of time and then turn it off. This function is controlled by a feedback loop. I have attached a simple vi showing my code. The pr