shell script to determine the width of the file, size, resolution cs5 js

I use a Script of Michael L Hale (core.quickMetadata "that uses" xmp.getProperty "and the bridge") to determine the size and the resolution of files without having to open or place.

Unfortunately, it fails with some files (non-Photoshop generated bitmaps, seems).

(PDF, I treat differently altogether to avoid the problem determination pages pdf counties and potential problems with PDFs containing different size pages.)

"None of you do not know if and how you can reach resolution with" app.system "in CS5, the height, the width of the files?

I may have come across before, but is unable to locate such a thread currently.

Thanks for any input.

The following 2 options that you can use if you want to clear all information in text file then analyze js. You could see if one of these contain the data that you are after?

#target bridge

var foo = File('~/Desktop/SomeFile.tif');

getAllXMLSIPS(foo);

//getMetaDataMDLS(foo)

function getAllXMLSIPS(f) {
     if (f instanceof File && f.exists) {
          var shellString = "sips --getProperty allxml ";
          shellString += f.fsName;
          shellString += ' > ~/Documents/StdOut.txt';
          app.system(shellString);
     }
}

function getMetaDataMDLS(f) {
     if (f instanceof File && f.exists) {
          var shellString = "/usr/bin/mdls ";
          shellString += f.fsName;
          shellString += ' > ~/Documents/StdOut.txt';
          app.system(shellString);
     }
}

Tags: Photoshop

Similar Questions

  • Essbase calc script to determine the number of occurrence

    Hello

    is it possible within a calc script to determine the number of occurrence of a value in the account dimension?

    I have an account called ranks which can contain any value between 1 and 10.  I would like to know how many times each value is repeated for a specific cost center.  It's in a database of planning BSO.

    Thanks in advance for your contributions...

    CL

    This isn't the typical calculation you would do in an OLAP architecture, but yes it is certainly possible.

    you will need to create 10 accounts such as occurrence_of_1, occurrence_of_2 etc.

    Then you increment them according to the value of the 5th year.

    Don't forget to put in your calculation!

  • Pass the Shell script variable to the plsql block

    Hello
    I have a shell script and pass the parameter of Shell script in a PLSQL block, I use the code but impossible to get any result, below
    Can someone help me with this issue?

    Shell script: test.sh


    * #! / bin/sh *.

    var1 = $1

    SQLPLUS = 'sqlplus-s ".
    Login = "gmisowner/gmisowner1".

    day ='$SQLPLUS $LOGON < < ++
    set the position
    Set feedback off

    Start
    select count () from mis_ref_codes where ref_description = & var1; *

    end;

    "exit";
    ++`

    echo $day

    Execution at the command prompt: >./test.sh Underline
    returns nothing

    1. I was hoping the count (*) in the number of lines in him select statement is stored in the day, but nothing returned as output of the plsql block
    the select statement above is an example, but I'll have to run a much larger plsql block

    I have syntactically doing something wrong? Please suggest

    Published by: Camilla January 14, 2012 12:35

    First of all you needget get rid of anonymous PL/SQL block:

    var1=$1
    
    SQLPLUS="sqlplus -s"
    LOGON="gmisowner/gmisowner1"
    
    day=`$SQLPLUS $LOGON <<++
    set heading off
    set feedback off
    select count(*) from mis_ref_codes where ref_description=&var1;
    exit;
    ++`
    echo $day
    

    But it still does not work. Your SQL * more script a proxy & var1. It has nothing to do with shel environment variable var1. That is why SQL * PLus prompts you to enter the value just after she readings

    Select count (*) in the mis_ref_codes where ref_description = &var1;

    And since you redirected input to your script, you must put value of var1, which isn't what you want, right? So what you need is:

    dev > # I'll set $1 to X
    dev > set X
    dev > var1 = $1
    dev > SQLPLUS = 'sqlplus-s ".
    dev > login = ' / '.
    dev > ='$SQLPLUS $LOGON < < EOF
    > set position
    > leave your comments
    > set verify off
    > select ' Have a nice day! "twice where dummy ="$var1 ";
    > "exit";
    > EOF'
    dev > echo $day
    Good day!
    dev >

    SY.

    Published by: Solomon Yakobson on 13 January 2012 15:17

  • After the update the new version cannot determine file downloads. In the eyes to determine the file, but download files go in C / documents and settings even

    After the update the new version cannot determine file downloads. In the eyes to determine the file, but download files go in C / documents and settings even if I chose another folder

    Hello, there is a general regression in firefox 27 allowing any files to upload directly to a root drive. Please try to create a subfolder (like D:\Downloads) and set as the default location for downloads...

    See also bug #958899.

  • Script to save the file and close without user Interaction

    Hello

    I have a lot of script that closes a transform file, but it does not save the changes.

    I need the script to save the file and then close without user interaction.

    I looked at the script save slot, but this will require some user input.

    Can an advisor if please how to save and close the file without prompting can be reached?

    Script is the following:

    this.closeDoc (true);

    Look at the documentation for the saveAs method in Acrobat JavaScript Reference. This method is available in Adobe Reader for documents that have save the usage rights.

  • When lowering pixels of resolution of a video, the file size becomes smaller...

    Hello!

    My question is this:

    I am importing a tiff of scope (2048 X 858) 2K sequence in Premiere Pro CC 2015.

    When I go to the export section, as you can see in this video link:

    First Pro CC 2015 (resolution size) export settings - YouTube

    and try to lower the resolution 2048 X 858, 5 X 2 or 854 X 480 or 1280 X 536! the size of the file remains the same! Is this possible?

    This means that if I have a 4K video and a video card, they will have exactly the same file size!

    I tried to make a sequence of low resolution and drop tiff sequence and adjustment of the sequence in the image of low resolution tiff, but I have the same problem.

    I've even nested sequence of high-resolution sequence of lower resolution, but... Nothing...

    Does this make sense? What I am doing wrong?

    Thank you!

    Yiannis

    Yiannis, Yes. Unlike a photo, a video, the file size is determined by the data rate. However, the data/flow isn't what determines quality, you need to consider in the codec you use.

    For example, a 50 Mbit/s, 720 x 480 H.264 file and a 50 Mbps DV (video only, forgetting the audio codecs) will be exactly the same size. but the H.264 file is going to be better because it's a step more coded with a better compression algorithm.

    Another factor that determines the size of the file is the frame rate. I'm not saying that you should drop your rate to save space, but know that if you save 2 files with the same exact settings, but we're 30 p or 25 p and the other is 50 p or 60 p, then the latter will be twice as large.

  • Create new report if the file size is too large

    The sequences I run in TestStand have the ability to generate large reports and I am looking for a way to start a new sequence of intermediate report if the file size exceeds certain limits, either start a new report every night at midnight.

    I am currently using TestStand 2014 and reports ATML 5.00.

    Here, any help would be greatly appreciated.

    mattb1 wrote:
    [...]

    I was hoping I'd be able to use some substitutions to get there, but it sounds a bit more complex than that. [...]

    There is no specific substitutions that solve this problem 'in configuration and only few implementation".

    The point is that you should follow the following steps:

    1. check the size of the file after writing a new segment of report data.

    2. If size > configured the file size, create a new file. Write a footer in the previous file, duplicate the header for the new file information and store the handle to file for all the previous files.

    3. once the test is complete, update the header in all files (remember: the header contains the overall result of the ESA.) This is known only when the test is finished!) and finalize all the report files.

    In the plugins default report, none of the above functions is applied.

    You want may also focus on 'File offline results' as a reporting mechanism. It might be easier to change things using this approach, unless you go the recommended manner: database.

    Norbert

  • What should be the file size of Vista SP2 through Windows Update If SP1 is already installed?

    Hello

    Please could someone clarify this? I read on a few messages that if Vista SP1 is already installed then the Vista SP2 update file size should be around 40-50 MB.

    I checked manually through Windows Update > check for updates. He finds updated Vista SP2, but the file size is of approximately of 340-350 MB.

    Thanks in advance for your suggestions.

    http://TechNet.Microsoft.com/en-us/library/dd335036.aspx

    Indicates that there should be ~ 43meg for 32-bit and ~ 60meg for 64 bit.

    It can be substantially larger depending on how many updates between SP1 and SP2 are not already installed. Microsoft partner

  • Error: The file size for all drives of paging can be a little larger than the size you specified, when you open windows in Windows 7

    Original title: paging notice when open windows on mac, divide the hard disk

    I have a split hardrive on a MAC and windows, and quickbooks installed on this drive.  When I open windows, I get a notice of paging file.  -size of the paging file.  "The file size for all drives of paging can be a little larger than the specified size.  IM using Bootcamp for the windows side.  It is to show the memory almost full and I did not yet get many date in QB.  Don't know what I have to do.

    Hello

    1. have you done any software or changes to the material on the computer before this problem?

    2. it worked correctly previously?

    3. how many hard drives are in the computer?

    4. is the problem with a partition or a particular hard drive?

    Try the steps from the link.

    Change the size of virtual memory

    http://Windows.Microsoft.com/en-us/Windows7/change-the-size-of-virtual-memory

    What is virtual memory?
    http://Windows.Microsoft.com/en-us/Windows7/what-is-virtual-memory

    Hope this information is useful.

  • The file size and YouTube

    I'm relatively new to videos. I have incorporated a few YouTube videos on my site, but I started to play with the Prime Minister in the hope to learn to make my own videos. I wonder if someone could help me to answer a few questions about the size of the file.

    A large image can greatly increase the size of the page file, in order to put a video on a page should have a huge impact. Or is the negligible impact because the video doesn't "load" until someone clicks on it?

    When someone plays a video, it probably uses a lot of bandwidth.

    So it occurred to me that the obvious solution to the file size band bandwidth problems and probably is bandwidth. Instead of hosting videos on my sites, I could upload them to YouTube and then embed them on my web pages.

    If I use this strategy, which would help a lot in terms of use of bandwidth and page load time?

    Maybe I should have put my question this way: what are the advantages and disadvantages of video hosting on your site rather than publish them on YouTube? I guess that I retain the copyright for all the videos I put on YouTube.

    Thank you.

    If played from YouTube or your own web server, the file size of the video will not add anything significant to the size of the web page.  They are simply text files, very small in comparison.  Adding a video is a few lines of code pointing to the reading software and the video file itself.

    If you host the file on your own server, then the bandwidth will count towards your monthly totals, while only hosted on YouTube, he obviously won't.  But the web page itself will not change much in size.

    Don't know or the other of these issues matter much, however.  You can get hosting packages unlimited bandwidth for $100 / year, maybe less.

    Copyright is another problem.  YouTube will take down or limit some videos under certain conditions.  (And these days, not all these conditions are fair and appropriate under the U.S. Copyright Act).  Their accommodation on your own site, this isn't a concern.  (However, it does not necessarily legal, either.)

  • The file size of data pump-

    DBA dear friends,

    I use below syntax to export a schema, using the file size to limit the maximum size of each dump file to 50G.

    expdp dumpfile=soa._%U.dmp filesize = 50G = DPP patterns parallel soa = directory = 4 logfile = soa.log

    I see one of the files has exceeded 90GB and continues to increase, his writing to 4 files at the same time, but has not yet created a 5th file. I would be surprised that this file > 90 GB more? Appreciate your thoughts

    Thank you

    925414 wrote:

    DBA dear friends,

    I use below syntax to export a schema, using the file size to limit the maximum size of each dump file to 50G.

    expdp dumpfile=soa._%U.dmp filesize = 50G = DPP patterns parallel soa = directory = 4 logfile = soa.log

    I see one of the files has exceeded 90GB and continues to increase, his writing to 4 files at the same time, but has not yet created a 5th file. I would be surprised that this file > 90 GB more? Appreciate your thoughts

    Thank you

    It seems that he does not know the size of the FILE when you incorrectly specify.

    It could work differently & better for you as a FILESIZE = 50 GB

  • The file size is huge despite the linked files

    Hi, I met a very strange thing.

    I am just placing some raster files in my illustration. I have always used the link option, because I keep my files in good condition and I really like the small files. (The contrary would be the Embed option, which saves the content placed in the file have.)

    But, despite a link to raster instead of embed files, my file have size gets really huge with the placed content. As a general rule, 80 MB with three raster images placed. It includes of course placed in any case files. And they are recorded in a sort of uncompressed format, too; the actual jpg file weigh only about 3 MB in total.

    Even more strange is the fact that if I move the content placed outside my work plan, the size of the file down again normal values (usually 600 kB). Means that the file size is something to do with the preview of the file or something, which (I think) is limited to the artboard.

    This has never been the case with Illsutrator before, has it?

    Is this really how Illustrator should behave, or I have some very odd here?

    InDesign handles content exactly how I like it: no incorporation of all.

    It is the ability to save a PDF compatible file that incorporates the images.

  • How can I reduce the file size?

    Hi all

    I'm running into a bit of a problem here, and I can't find a workaround. I was hired to create a few small icons for a TeamSpeak 3 channel and my files must be 16 x 16 pixels and under 8 KB size, otherwise TeamSpeak will not accept the picture.

    I don't want to degrade the quality of the icons that I made, and the smallest I could get the file size was 16 k with 10 KB for JPG and PNG. All the icons are color. I can get a few simple icons to fall under 8KB, but there are a few others that I can't.

    What is the best way to reduce the size of the file on the small photos, and how to get the file size less than 8 KB? TeamSpeak seems to accept any image format, so pretty much everything is allowed. This one is over my head when it comes to small technical details.

    Thank you in advance! (:

    Hi donaldgroomphotography,

    Open the Image in Photoshop, change the size or pixels according to the requirement.

    Then save for web on the file menu.

    You can choose the JPEG format.

    Let us know if it helps.

    Kind regards

    ~ Mohit

  • I'm new to Lr, can someone tell me if there is a limit of size PRACTICE to a Lightroom catalog file? Should I keep the file size within a certain range of size of GB and then create a new? Thank you I would be grateful of any advice.

    I'm new to Lr, can someone tell me if there is a limit of size PRACTICE to a Lightroom catalog file? Should I keep the file size within a certain range of size of GB and then create a new? Thank you I would be grateful of any advice.

    He has no such limit, and in fact some users in this domain and other forums report catalogues over 1/2 million pictures works well.

    The idea to create multiple catalogs because you don't want to get too big catalog file size is a bad idea that you should never think of it again.

  • I'm trying to reduce the file size of a jpeg file, but the dialog box under image &gt; image size reflects a much smaller that the file is. I saved the image after resampling and by reducing the size of the image, reduced the pip to 72 and lowered the qua

    I'm trying to reduce the file size of a jpeg file, but the dialog box under image > image size reflects a much smaller that the file is. I saved the image after resampling and simplistic image, the pip size reduced to 72 and lowered the low quality only to see the minimum file size reduction. Why the dialog box in photoshop gives me a different file size than my computer and how do I solve this problem? Thank you!

    The Image Size dialog box dialog box shows the uncompressed size.

    Your operating system (Explorer/Finder) shows the size compressed. (size on the disk)

    If you use save for Web, you can see the compressed size, but also an overview.

Maybe you are looking for