False images are picked and processed?

Hi all

I am convert (jpg, tiff, bmp) files in the folder for Tiff files in the same folder with the name of file in sequence.

My problem is that if the files are of 10 or more than 10 that the images are wrongly picked.

tetttt.png

Instead of figure 2 in figure 10 is transformed and renamed figure 2.

Please find the below script

#target photoshop

var orig_ruler_units = app.preferences.rulerUnits;          Save rule units
app.preferences.rulerUnits = Units.PERCENT

inputFolder = Folder.selectDialog ("Select a folder");

var EPSopts = new EPSOpenOptions();
EPSopts.resolution = 600;
EPSopts.mode = OpenDocumentMode.RGB;

If (inputFolder! = null) {}
List of files of the var = inputFolder.getFiles (/ \.) (TIF) | jpg | PDF | BMP | (eps) / $i);
If (filelist. Length == 0) {alert ("no file found in the folder") ;}}
else {}
for (var i = 0; i < fileList.length; i ++) {}
Alert ("file =" + fileList [i]);
Isolate the Image name
var Name = decodeURI(fileList[i]).replace (/ \.) [ ^\.] + $/, ") ;// strip extension
imagePath var = "";
While (Name.indexOf("/")! = - 1) {/ / tape path}
imagePath = imagePath + Name.substr (0, Name.indexOf("/") + 1);
Name = Name.substr(Name.indexOf("/") + 1); "
}

var ext = decodeURI (fileList [i]);
Ext = ext. Substring (ext. Length-3,);
If (ext == "eps" | ext == 'EPS') {var docRef = open (fileList [i], EPSopts) ;}
else {var docRef = open (fileList [i]);}
}

var TiffOptions = new TiffSaveOptions()
TiffOptions.imageCompression = TIFFEncoding.TIFFLZW
TiffOptions.embedColorProfile = false
app.preferences.rulerUnits = Units.PICAS
docRef.flatten)
docRef.resizeImage (null, null, 600)
var idtrim = stringIDToTypeID ("trim");
var desc2 = new ActionDescriptor();
var idtrimBasedOn = stringIDToTypeID ("trimBasedOn");
var idtrimBasedOn = stringIDToTypeID ("trimBasedOn");
var idtopLeftPixelColor = stringIDToTypeID ("topLeftPixelColor");
desc2.putEnumerated (idtrimBasedOn, idtrimBasedOn, idtopLeftPixelColor);
var idTop = charIDToTypeID ('Top');
desc2.putBoolean (idTop, true);
var idBtom = charIDToTypeID ("Btom");
desc2.putBoolean (idBtom, true);
var idLeft = charIDToTypeID ("Left");
desc2.putBoolean (idLeft, true);
var idRght = charIDToTypeID ('Rght');
desc2.putBoolean (idRght, true);
executeAction (idtrim, desc2, DialogModes.NO);

var Wid = docRef.width;
var Hig = docRef.height;
app.preferences.rulerUnits = Units.PICAS
If (Number (Wid) > 30)
{
docRef.resizeImage(29,null);
}
Another yew (Number (Hig) > 50)
{
docRef.resizeImage(null,50);
}


var newName = removeExtension (inputFolder.name);

var a = i + 1;
docRef.saveAs (new File(inputFolder+"/"+newName+'0'+a+".tif"), TiffOptions, true, Extension.LOWERCASE)
docRef.close (SaveOptions.DONOTSAVECHANGES)
$.writeln (a);
var newcmd = fileList [i] .remove)
}
{
}
Alert ('completed process', 'test')
}
}
/********************************************************************/
removeExtension (myDoc) function
{
var str = myDoc.split (".tif");
var ext = str [0]
return ext;
}
/********************************************************************/

/********************************************************************/
removeExt (myDoc) function
{
var str = myDoc.split(".");
var ext = str [1]
return ext;
}
/********************************************************************/

/********************************************************************/
function removebit (myDoc)
{
var str = myDoc.split(".");
var ext = str [1]
return ext;
}
/********************************************************************/

Kind regards

Vinoth

Do you have it works?

Tags: Photoshop

Similar Questions

  • My images are upside and gray scale. On another computer, it loads fine - any suggestions?

    My images are upside and gray scale. On another computer, it loads fine - any suggestions?

    Thanks for the info-2 restarts later and it works now. If it happens again, I'll try a more complex approach.

    Thank you!

  • Firefox manages not to display images much (but not all) on the Web sites that I visit, certain images are displayed and some are not even if they are in the same format.

    I recently changed my ISP because I had connectivity problems. Especially my router would be closed sporadically. As part of my attempt to identify issues, I ran some spyware that I was told that I could trust. Since then, I have a problem looking at many websites as much (but not all) images are missing, even on websites that I know very well, including my own. What is odd, is that on one site each page has an image jpg under the navigation bar and all these jpg appear except for one who does not even appear when I reload images. This problem also makes security of sensitive sites as my amateur full site look Bank that scares me. The problem does not occur on other web browsers.

    What spyware software do you run?

    Make sure that allow you pages to choose their colors and you have not enabled high contrast in the Windows accessibility settings.

    • Check the permissions for the domain in the active tab in "tools > Page Info > Permissions.
    • Check that the images are enabled: Tools > Options > content: [X] loading images automatically
    • Check exceptions in "tools > Options > content: Load Images > Exceptions.
    • See the tab "tools > Page Info > media ' for blocked images (scroll all the images with the cursor key).

    If an image in the list is grayed out and there is a check mark in the box "block Images of..." and remove this mark to unlock the images from this area.

    There are also extensions (Tools > Modules > Extensions) and security software (firewall, antivirus) that can block images.

  • Images are broken and are not loading duplicate pages?

    Hello

    It's probably a problem really noobish. I worked with happiness on Dreamweaver CS3 all day and had no problems.

    Just went to a new html page and when the copy on Divs and containers that contain images, images are broken, despite the situation does not change. My other pages with the same images show no broken links, no more. If I replace the image with itself, it works, however I have a lot of pictures and they don't always click in the exact spot that I would like, in the first place so copy/paste. The worst it is until I made this page on that it was not broken for everything else I was working!

    I'll have to duplicate the pages instead, which is not really useful.

    I am not trained in coding, I'm a designer and I want to keep this site as simple as possible, as I manage all this. My knowledge is limited to modest amounts of html and CSS.

    Thank you!!

    Below: What the page looks like, highlighting the top div and copying it to the new page, where I paste and it becomes broken.

    page1.PNGpage2.PNG

    Hello, same,

    DW is sometimes somewhat obstinately like a mule, and therefore you must delete your images first and insert them again with the command "insert." If you should have any success with this procedure, please charge to the top of your site, regardless of how it looks like and send us a link to it.

    Hans-Günter

  • I create an image composite and some I am trying to add images are invisible and I can't understand why.

    I guess I had too many things open and Photoshop a bit frozen. I closed everything and tried again. Everything worked!

    Hi wyowind15,

    Everything works well, or are you still face problems when creating a composite image in Photoshop?

  • Could not watch television and the images are black and white on Qosmio

    Hi, live Saudi Arabia
    I have problem with my TV Tuner. When I scan the channel it is find frequency for some channels, but cannot look at them!

    also when I try to capture using model-SVIDEO color balck & white that I try to use PAL nothing changed
    And thanks for the help

    Hello

    One question; Did you purchse the notebook in your country?

    I guess that the black and white image appears on the TV. Am I wrong?
    This can happen if the TV doesn t s-video or if the s-video option is not enabled on the TV.

    In addition, I would recommend to check the version of the driver installed tuner.
    Then go to the page of the Toshiba driver and check the version of the tuner driver.
    If the new driver is available, so please download and install on the Qosmio.

  • Photoshop - new Images are black and white only

    I'm working on a wallpaper and I import the background and I'm going to hide the logo until the inside of the outline of the logo is an image. I'm looking online for some good photos test and see what I like best. I uploaded a photo and the colors were only black and white. I thought that maybe something was wrong with the picture so I had another image, and the same thing happens.

    Screen Shot 2015-10-13 at 9.49.36 PM.png

    I have found something like this but desaturated colors, although not all black and white. My proof Setup is: work CMYK. I do not think that I have never changed it, so I don't know if this actually caused this problem. I don't know exactly all the settings in Photoshop so if you describe something like change a setting, it would be very appreciated if you told me where he was, etc.

    Thank you, fofana

    Hi Coler

    You have chosen as the Image Color Grayscale > Image Mode

    Change it to RGB/CMYK

    Concerning

    ~ Assani

  • Why the images are blocked in my emails?

    My e-mail work fine except that some images are blocked and contain a small box with a red x in it. Also when I open Thunderbird, it says that it cannot connect to the proxy server.

    ... it says it cannot connect to the proxy server.

    Check your network settings, then correct for the proxy. If you do not use a proxy, adjust the setting accordingly.

  • "images are not a recognized format" boredom

    a previous post - 2013 - illuminated the problem.

    I'm having issues importing still images in a sequence of time in photoshop and would appreciate suggestions!

    I want to create a time using a sequence of photographs.  All file names are in name order / numbered.

    I use the workspace of proposal and followed all the instructions available.

    • Create correct size document (film and video).
    • Create a video montage.
    • Pace of game.
    • Choose 'create new video layer from file '.
    • Point to the first image in the folder where the pictures are stored.

    At this point, no matter what I tried, I get this error:

    error.png

    end of the previous post.

    I have the same problem and it is extremely frustrating because I have to export via LR6 thousands of images as tif files in a different folder, because; file, new layer of the file (in ch cc) does NOT RECOGNIZE on my photoshop jpeg files.

    He acknowledges that tif files?

    I tried stuarts how to use file, layer, new layer of the file instead, and although it seems to work it doesn't matter all files? When I try and export the video, the work area is stuck at 0-59

    and Yes, all my images are renamed and numbered sequentially.

    I don't understand what setting may need to be changed to allow it to load all images. can there be something in the preferences which addressed this?

    My ps cc created vids mp4 perfectly to the exported JPEGs LR, tiff (in thousands at the time) files but does not load JPEG files, I get this msg:

    "Unable to complete the new video layer from file because the film is not a recognized format"

    Thanks for any help with this annoyance "footage is an unrecognized format.

    TWS

    Have you seen Julianne Kost on Lynda.com tutorial?  I think it's free show without subscription Lynda.

    Photoshop CC Essential Training (2015)

    If this does not give you the answer, come back and I'm sure someone here can give you more specific advice.

    [EDIT]  I just saw the other thread that you hit.  As you say, that is three years old, and things are different with new versions of Photoshop, so the question is, which version do you use?  If you have a version of CS6 pre, then maybe something like Quicktime Pro could be better.  You mentioned the proposal workspace, so I think that you have the latest version, in which case that old thread is probably more relevant.

  • the imported images are there but does not appear

    Hello

    I'm new to Lightroom, but not to the digital imaging.  I am deciding whether or not to use Lightroom as archiving software.  I have imported photos with various types of files in Lightroom, copy them into the default location and convert NEF photos in .dng files.  Everything seems as it should in what concerns the lists on the left, and the files are where they are supposed to be in the default locations and are operable and viewable in photoshop.

    The problem is that everything that is displayed in the environment Viewer are rectangles greyed.  No images.  Can I export an image in a different file type to an external location and display it correctly.  So all the images are there and LR know where they are (since he created and put them there).  The film in low also rectangles is just gray.

    I have no idea what prevents images from appearing and I hope someone here can help.  I am running XP SP3 and Lightroom 2.5 632038 Raw 5.6.  I import files NAVE of Nikon and a D300 camera Coolpix 4000 Scanner.  Photoshop reads all of these pictures raw with their plug-ins.  Moreover, I also imported jpg and tiff files and they do not appear in the screen either.

    Thanks in advance

    dmm108

    Believe it or not, your monitor profile is corrupt. A corrupted profile can sometimes manifest only in LR and not in other programs managed by color as Photoshop.

    Either use a hardware standard, which is the best thing (look up on the web Spyder), or modify your monitor profile by default in sRGBxxxx, with the rest of your profiles. On Windows XP, you can do this through control of management/display/settings/advanced/color of the Panel. Make the second of these two things is really just a stopgap. If you don't calibrate it with a hardware device, you will always have incorrect colors.

    Anyway, to convince yourself that the profile is in fault, change it in the color management.

    HAL

  • Acquire and process multiple images

    Hi, I use an acquisition card NI PCIe-1427 and tried acquisition and treatment of multiple image permanently. To be more precise, how can I extract a buffer of 4 images and perform some processing on the 4 images? For the examples, I can acquire 1000 images (or continuous), but must be extracted 4 images each time to combine them into a single image before saving the final image (on the handset). Thank you for viewing and comment. I woild appreciate if there are examples that I could learn too.

    Hi sp@davis,

    Did you look at This example that passes by sewing and processing of a video stream? There are tons of examples of different types of image processing on the community of NOR (like this one) If you have a type of mind-specific treatment. I hope this helps!

  • The images are blurred in FM 12 CHM and WebHelp output.

    Hello

    I use the trial version of 12 FM and trying to export both CHM and WebHelp.

    We would like to use the original images, but the publication process is their resizing. I read that the maximum size, Width, and Height to 0 will cause the program does not resize the image. However, when I put L/H to 0, the images are removed from the output of my project.

    When I generate WebHelp I noticed that the HTML has a style of play, but I don't have the options selected in the style of the Image.

    < class p = "FM_Figure" > < img alt = "UserRoles04NewRole.png" style = "width: 306.319pt; height: 96.559pt; margin-bottom: 0.000pt; ""id = "3" src ="UserRoles04NewRole.png" / > < / p >

    I am pleased that the HTML is referencing the original icon, I thought that for sure that the graphics have been converted during the publication process. But how do I configure my .sts so that images are not resized?

    Thank you!

    Hi sosammsi,

    Maximum Width and Height definition for 0pt will set the property max-width and height of inline output to 0pt which allows you to hide the image.

    Please try to set preferred Width and Height to 0pt. This should generate better quality without the styles inline images.

  • Icons and images are distorted. Only happens in firefox. The reset does not help.

    Hey there,

    So today when I opened Firefox, this is what she looked like. Icons and images are distorted. Text is fine, the scrolling is fine. And this only happens in Firefox (i.e. other programs on my computer, including other browsers are fine).

    No idea what it is and how to fix it?

    Thank you.

    Try disabling graphics hardware acceleration. As this feature has been added to Firefox, it has gradually improved, but there are still some problems.

    You will need to restart Firefox before this takes effect so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Click the menu button

      then select the Options under Windows or Preferences on Mac or Linux.

    2. Select the Advanced Panel, then on the general tab.
    3. Uncheck the use hardware acceleration when available.
    4. Restart Firefox and see if the problems persist.

    This solve your problems? Please report to us!

    If the problem is resolved, you should check the updates for your graphics driver by following the steps in these articles in the knowledge base:

    Thank you.

  • I get emails with pictures and when I send them to others. they open them but the images are not displayed. The photos are there when I send them. Thank you

    I get emails with pictures and when I send them to others. they open
    their place but the images are not displayed. The photos are there when I send a
    them. Thank you

    Make sure that your security software (antivirus) is not blocking attachments.

  • What the handles, threads, and processes means or function, they are performing?

    My son will ask me a question and I could not answer (it is perhaps a good thing because I think he will try to enter and change something he doesn't know) so I thought that I felt I'd better try to find out. He and I are eager to know what the handles, son and process average or functions, they do. They are in the performance tab in Windows Task Manager.


    Thank you

    Hello

    A process handle is an integer value that identifies a Windows process. The Win32 API call a HANDFUL.

    When you start a program, this program runs as a "process". It's something that runs in its own protected area, with its own memory. Other processes cannot touch this memory.

    A few times, the program needs to do several things at once in a way of multitasking, similar to how the multitasking process. For example, a spreadsheet can recalculate the cells you enter data. He * could * start another process, but they can't (easily) share the memory, he would need to if recalculate cells!

    Must be a different sort of process that is not quite as separated. It is a "thread".

    Process: the number of applications that are running at some point in the computer.

    Hope this information helps.

Maybe you are looking for