[CS2][JS]Relink images for web and print

Scripters i need help with this one:
We have 2 sets of images .tif and .eps. i have no problem with the .tif but my problem is the eps images. There are 2 versions of .eps: "_print" and "_web". Is there anyway a script can relink (e.g.) image01_print.eps with image01_web.eps or vice versa automatically? All images are in same folder.

Hi Charles,
Try this:
var myImages = app.activeDocument.allGraphics;
for (i = myImages.length-1; i >= 0 ; i--) {
   var myImage = myImages[i].itemLink;
      if (myImage.filePath.match("_web") != null) {
         var myNewName = myImage.filePath.replace(/_web/, "_print");
      else if (myImage.filePath.match("_print") != null) {
         var myNewName = myImage.filePath.replace(/_print/, "_web");
   var myNewLink = new File (myNewName);
   if (myNewLink.exists) {
    myImage.relink (myNewLink);
    myImage.update();
Kasyan

Similar Messages

  • Color management for web and print.

    Hi there.  I would like to post my images and have them print ready for clients.  When I read about both of these I find one thing for web and one thing for print. I don't want to edit them twice. What would you suggest for easiest workflow?  I like to post the images in an online gallery for my clients and if I really like them maybe use on my homepage.  Do I have to edit twice or what is the optimal setting for a photographer.  I do mostly portraits --family, baby, couples, etc.
    I am pretty well versed in actual editing processes but my understanding in this portion is still lacking.  I am trying prophoto rgb on photos today, but will this compromise my online quality? 

    brwmmw wrote:
    …I knew of this option but did not know if it was optimal quality…
    You define the quality of the saved image in the Save for Web and Devices dialog box.
    brwmmw wrote:
    …I have just been… using same files for web and print.  I wanted to increase quality across the board in print and web…
    That is absurd!  (Sorry.) By doing that you are generating unconscionably and unnecessarily large image files.  You're clients won't like that.
    Remember that you have no control over how anyone sees your images on the web.  Something like 97% of Internet users are running non-color-managed web browsers and uncalibrated monitor.
    You and you're clients are best served when you stick to the lowest common denominator, namely sRGB images, for web.
    brwmmw wrote:
    …What mode do you use for prints?…
    Personally, I like to stay in 16-bit ProPhoto RGB when I print my images myself.  If sending them to a pro lab, I discussed it with the lab techs.  But I have gathered a lot of experience by now.  One really has to know exactly what one's doing to edit in ProPhoto RGB and stay in that color space.  If sending my images to a cheap lab like Costco, I stick to 8-bit tagged images that I soft-proof with the specific printer profile that will be used by the local store.
    You should—and probably do—know that ProPhoto RGB has a very wide gamut that includes colors that cannot be printed by many printers, and it's up to you to compensate for that.  If you run into problems with ProPhoto RGB consider converting to Adobe RGB for print.  Make sure the printer drivers that will be used to print actually support 16-bit printing, otherwise convert to 8-bit.
    Since you're a pro, I would warmly recommend you watch the video tutorials comprising the "From Camera to Print - Fine Art Printing" series by Jeff Schewe and Michael Reichmann, that are/were available for download from the Luminous Landscape.  They're working on a new 2011 edition, but the 2008 edition was just superb.  Best $35 or so I've spent in a long time.
    http://www.luminous-landscape.com/videos/camera-print.shtml
    Wo Tai Lao Le  (no connection to Adobe or Schewe/Reichmnan/Luminous_Landscape.)
    我太老了

  • Color profiles for web and print

    Hi,
    I am editing photos from my DSLR. They were shot as jpg in Adobe RGB. I am editing photos for both web and print at the moment and was wondering if there is a way to do that so that I would be able to edit for both simultaneously in the Photoshop process.
    Here are the details for what I normally do:
    For print, I would work photos over in AdobeRGB while the Proofing option is set to Working CMYK (usually SWOP, depending on what printer I use). Then I'd flatten the artwork, resize and sharpen, and change the color mode to CMYK, save as TIFF.
    For web, I usually edit while RGB Color Settings are set to sRGB IEC61966-2.1, and Proofing is set to Monitor RGB. I flatten, resize and sharpen, and Save for Web.
    Is there any way I can edit a single photo (shot in Adobe RGB) so that they can be used for BOTH print and web? I know CMYK vs. RGB would mean that they would end up looking different in the end, but is there any way I can have a single Photoshop file for a photo and go through the necessary steps to make it ready for print and for web... or is it that due to color profiles and proofing options, there's nothing I can do but to edit each photo twice?
    Thanks in advance to anyone who might be able to help.

    karoleend wrote:
    Thanks for the advice. I'll try that out.
    I posted my second question before I read your response, but yes, it does seem the best choice to convert to sRGB when Saving for Web. And you say you place your .psd file into an InDesign document? Do you do that if you only wish to save as a pdf... what do you personally do when saving as TIFF for print?
    I don't save Tiffs for print. I use PSDs. I don't ever give ID files with all linked files to the printer only PDFs. If i'm working on something like a coffee table book I would do the conversion in Photoshop. but most magazines and newspapers, CD covers, posters, brochures everything stays aRGB until I make the PDF.

  • Exporting files for web and print at the same time.

    been searching a while now and no joy with an answer.
    So I want to know 2 things.
    Is there an option on LR to export 2 different extensions at once?
    So a JPG at say 5mb and one at 500k?
    Also would I 'resize to' 1024x768 if I was going to use for web?
    Hope you can help.
    Thanks.

    It is possible to pick a desired file size that is too small for the image's pixel dimensions. Where that line is drawn will depend on the individual image.
    Normally if you are picking a max file size, you are also resizing the file to be smaller, like your 1024x768 example above. This size would easily be under 500 kb.

  • Optimizing images for Help and Print/PDF

    i'm struggling with how to optimize graphics so they look good in both Help and print/pdf output.
    I use Snag-it to Capture and save as PNG 300 dpi.
    I often put the images in Vision and add callouts and save as PNG.
    From RH I generate a printed output (Word) which I convert to PDF.
    So with all the programs an image goes through (snag-it > visio > RH > Word > PDF) i'm not always sure what the best settings are.
    Does anyone have guidelines/suggestions  ?
    Thanks

    I've had very good luck going from a SnagIt capture to Robohelp to Word to PDF. I add callouts directly in SnagIt to save myself a step and save the files as a 24-bit (True Color) PNG. The graphics are very legible in the WebHelp output, in the Word document, and in the printed PDF.
    The only thing that doesn't work well, I've found, is when I reduce the size of a graphic in either SnagIt or Robohelp. Instead, to keep a graphic's dimensions manageable, I either shrink the s/w application window before I grab the screen, capture just a portion of the screen, or crop the screen shot in SnagIt.
    What problems have you been encountering?

  • Photoshop stalls on Measuring memory & save for web and devices

    Mac OS X 10.6.4
    MacBook Pro
    CS4 Photoshop Extended
    Hey there,
    I would be grateful if anyone can shed any light this problem which has occured out of nowhere.
    I'm a web designer so this problem is causing chaos at the moment. When I try to save an image for 'web and devices' - I will get to the 'save for web and devices' window but then Photoshop 'freezes'. It doesn't seem to make a difference on file size big or small - Photoshop just freezes up. Sometimes Photoshop wont do it instantly, I will be able to save about 3 - 4 files and then it will freeze up. The only way to re-start the process is to force quit the application and start again.
    However sometimes when I re-start Photoshop, the application will hang on 'measuring memory' instruction on the start up panel - where I then have to force quit and sometimes re-start my machine. This whole process is obviously very time consuming and a right pain.
    Just for info I have played around in the Preferences - just to see if changing the 'memory usage' would have any effect - this doesn't seem to of made a difference. I currently have the setting at 2211mb (71%) which is within the ideal range (1689-2211mb).
    Any guidance or help would be most grateful.
    Cheers
    T

    Definitely – it may or may not help but it’s easily done (command-alt-
    shift on starting the program).
    Though it is somewhat annoying having to recreate the Preferenes-
    settings one has changed and getting the Tools back to the preferred 
    settings.
    If you should trash your prefs just don’t forget to save your custom 
    Presets (Brushes, Patterns etc.) before.

  • Best Procedure for Creating Web and Print Images

    Windows XP SP2, Adobe CS3 Design Premium
    Hello,
    I have created a book in InDesign and have placed the art from Illustrator into the pages and cover of the book. At the time the book was designed, I gave no thought to the need for having the cover and certain pages also available on the web. (Silly me...)
    Is there any way to duplicate the native illustrator files and make them web safe (with the web safe colors) without having to create new swatches and use live paint to recolor the image?
    Is there a standard procedure for designing images in Illustrator when you know you will be needing both web and print output? (I'd like to do it 'right' next time.)
    Thank you so much for your help.
    Cathy

    Hi
    if you want to create the web service using the function module do the following steps.
    the main requirement for creting the web service using the function module is the function should be RFC enabled.
    1. To create web service of this Function Module
    Go to Utilities ->More utilities->create a web service->from function module
    2. A new wizard will be open to create the web service and click on continue.
    3. Enter the web service name (any name that you want to give) and give the short description, select the Endpoint type as Fuinction Module and click on continue.
    4. Select the Function Module name that you are using.
    5. select the profile as Basic Authentication: SOAP Pro.
    6. Press continue to release the web service. The web service is now created
    To check the web service Go to the transaction WSADMIN and select the node
    SOAP Application for RFC-Complaint FMs and expand the node and select your web service that you have created and expand the web service node up to the last .
    Now to test the web service select the last node and click on the web service home page button and it will open the home page.
    from this page u will get the wsdl file as well as you can testthe web service.
    Thanks
    Rinku

  • Slice and 'saving for web and devices' not saving all images in selected area

    Ive designed my site in illustrator and now im using slices and save for web and devices.
    When I save a slice as a jpeg or gif it saves the text and but not the background image behind it. I haven't locked the background image and all the content is on the same layer in illustrator so why is it doing this and how can I stop it?
    Thanks
    James

    Thanks for your reply.  Yes, my Photoshop CS5 is updated to 12.1.  I'm running OSX 10.5.8 and have tried viewing in Safari, Firefox, and Chrome with no improved success.
    I have been reading these forums for about 3 hours trying to find the answer to this question but am still at a loss.  I have found one article here: 
    http://stackoverflow.com/questions/7974006/overlapping-image-in-photoshop-splice-how-to-fl oat-with-css
    which explains using an "absolute" value in CSS to lock images in place.  I'm currently working in Dreamweaver to see if it's a common error in Photoshop when resizing browser but is easily fixed on the CSS side.
    Any help would be appreciated
    Thanks!

  • I am using CS6 and when I go to save an image for Web the image does not retain its quality

    I am using CS6 and when I go to save an image for Web the image does not retain its quality. The first week I did this it worked just fine and now the images save very pixely.
    Here is a screenshot of my image on the artboard as I am editing it
    Here is a screenshot of the image as I'm trying to save it for Web
    As you can see, the image becomes pixely. I have tried to save it as every type of png and jpeg but nothing seems to work. I have no idea why it has started to do this. Please help!

    Change None to Art optimized then click apply(alteast in CS5 there was an apply, believe they removed that in CS6 as so many people missed that part).

  • "Save for web and devices" making images saturated

    I have been using the "save for web and devices" option for quite some time but suddenly it has started to make all images very saturated compared to the actual file. I made no changes to the output settings or the color management settings. Even when I change those sttings it makes no difference. The image is saturated no matter what. Any idea what's going on? I am about ready to uninstall and reinstall the software in hopes that it will make the problem go away, but I'm hoping there is an easier fix. Thank you

    These are my settings. Are they the same in your SFW dialog?

  • Saving Images for Web

    Hi,
    Whenever I save images for the web they seem to loose the richness of their color. I've not noticed this until working on a particular project that involves resizing and preparing images of artwork for a website.
    The images are in sRGB color profile and I am "saving for web and devices" with ICC checked and optimization at 70. Still, the images look a bit faded overall. Is there anything else that I can do to retain the color?
    Thanks!

    I am wondering why my advice was any worse than yours. I admit I mistakenly suggested Monitor RGB instead of Windows RGB but as far as I know sRGB is the default for most monitors. This would put them all pretty close. Am I missing something?
    I would think that having someone set the images with icc profiles and then adjusting their own browser to correctly display such images would cause the exact same problem you say my solution does. It would give the image editor an impression of the image that nobody else is going to see. I don't know anyone that uses icc profiles for web work. In general I don't think you will find many people who have set their browsers to correctly view images that have these profiles. So it seems like someone that has will be thinking the images look great on their system but not on someone else's.
    If someone may eventually repurpose these for print then worry about icc profiles for the printer. It seems like a huge waste of time for anything that is purely on screen.
    I am not trying to battle with you over who is correct I just want to understand what your saying.

  • Save for web and devices, .png (trying to make an icon)

    I'm trying to make a 57x57 px .png file for an iPhone icon.  I'm pretty new to Illustrator, but have been watching some videos/tutorials online.  I started with the default Print document, and made my icon that looks ok.  Nothing fancy, just an ellipse, another ellipse inside of it, and some icon inside the two ellipses.  (the two ellipses serve as a ring around my icon).  After creating the ring+icon, I put a colored square behind everything for my background color.  The total size is 382x382.  I created a new Print document to be 57x57.  I copied and pasted everything from the first 382x382 image into the 57x57 file, and shrunk the 382x382 to 57x57.  I then Saved for web and devices, selected PNG 24, no transparency, and I got my image. 
    When I look at my image at this size, it looks pretty bad.  Like even for the ellipse parts, it looks like it's grainy and that there are jaggies.  When I look at other iPhone icons, they just seem so much more smoother and fluid.  Is there something I'm doing wrong with saving or shrinking that I need to take into account for?  Or are there standard stroke sizes that should be used to get a smooth circle?  Thanks!

    The smoothing process is called anti-aliasing. It fills in the border pixels with a shade of gray, giving the illusion of a smooth curved object.
    That being said, keep in mind the smaller in size pixels wise, the harder it is to keep the quality.

  • Saving Sliced files in Illustrator CS6 like it was in CS5 "Save for web and devices" gone?

    Hello,
    I used to save all my slices in CS5 and it would give me the option to save for web and devices, then when I was in there it would let me choose the option at the bottom Other... then I could go in and save it as a html and images and then it would automatically make div's for me when I brought it in to dreamweaver.  Where did this option go in CS6?  Can someone help I am on a big deadline, and I lost all my work transfering it back into cs5 to try it there like I used to.  Attached is a .png to show what I mean.
    Thank you,
    DariusB
    These options are not here in CS6 and I cant find it.  I would really appreciate the help.
    Thanks again.

    Hi,
    There have been some other changes too - here is the link to the article that describes the changes: http://blogs.adobe.com/ivandavid/illustrator_cs6_save_for_web/.
    Cheers,
    David

  • When I save for web and device in Illustrator, I see all the pixels... What is wrong?

    I have created a vector image. When I save for web and device in Illustrator, the image does not come out clear even if I'm saving the image the same size as the artboard. I can see the coutours (pixels)... I've opened the file on another computer and everything is perfect. What is wrong on my computer?
    I have reinstalled the program and did all the updates. What else can I try?
    Thank you!

    So that you know next time that option is no longer available so to speack it is now under a dropdown wiht the default none then Type Optimized or Art Optimized in CS 5 and operhaps CS 4 as well

  • Saving two dimensions od image for web

    Hi there,
    I have made script (with your help ) to export images for web with dimensions 300x300 px. Now I want that my script do one more resize of that files so that i get two files one 300x300 and another 66x66 px. I will post my script and ask you to hel me find the bug
    And one more question. My script exports file name + jpg but it also keeps orginal extension so I get ie. FileName.psd.jpg
    can you help me fixing this in my script... else is fine...
    thank you,
    Voah
    Edit:
    In the meen time I managed to resolve the problem so here is the new script
    But I have one more thing I would like to do. I have to manually make folder "300x300 and "66x66" or my script stops. How coud I make that script make that folders? (under inputFolder/300x300/ and inputFolder/66x66/)
    // Save current dialog preferences
    var startDisplayDialogs = app.displayDialogs;    
    // Save current unit preferences
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PIXELS;
    var inputFolder = Folder.selectDialog("Select the input folder");
    //var outputFolder = Folder.selectDialog("Select the output folder");
    ProcessImages();
    function ProcessImages() {
      var filesOpened = 0;
    //   if ( inputFolder == null || outputFolder == null)
         if ( inputFolder == null) {
                alert("No source folder selected");
    //     if ( outputFolder == null) {
    //       alert("No output folder selected");
    //else{
      var fileList = inputFolder.getFiles();
      for ( var i = 0; i < fileList.length; i++ ) {
           if ( fileList[i] instanceof File && ! fileList[i].hidden) {
                     open( fileList[i] );
                     ResizeImage();
                     filesOpened++;
      return filesOpened;
    function ExportPng(filePrefix, fileSuffix){
    try
    var docRef = app.activeDocument;
    var docName = app.activeDocument.name.slice(0,-4);
    var saveOptions = new ExportOptionsSaveForWeb();
    saveOptions.quality = 70;
    saveOptions.format = SaveDocumentType.JPEG;
    saveOptions.optimized = true;
    docRef.exportDocument(File(app.activeDocument.path+'/300x300//'+docName+'.jpg'), ExportType.SAVEFORWEB, saveOptions);
    catch (e)
    alert("Error encountered when attempting to save the image. \r\r" + e);
    return;
    // funkcija export 2
    function ExportPng2(filePrefix, fileSuffix){
    try
    var docRef = app.activeDocument;
    var docName = app.activeDocument.name.slice(0,-4);
    var saveOptions = new ExportOptionsSaveForWeb();
    saveOptions.quality = 70;
    saveOptions.format = SaveDocumentType.JPEG;
    saveOptions.optimized = true;
    docRef.exportDocument(File(app.activeDocument.path+'/66x66//'+docName+'.jpg'), ExportType.SAVEFORWEB, saveOptions);
    catch (e)
    alert("Error encountered when attempting to save the image. \r\r" + e);
    return;
    function ResizeImage()
    if (app.documents.length > 0) {
        var docRef = app.activeDocument;
        var n = docRef.pathItems.length;
            if((n>0)&&(docRef.pathItems[0].name!="Work path" ))  {
                 docRef.pathItems[0].makeSelection();
                 docRef.selection.invert();
                 docRef.selection.clear();
                 docRef.selection.deselect();
       function fitImage() {
    var docRef = app.activeDocument;
    docRef.trim()
    var docWidth = docRef.width.as("px");
    var docHeight = docRef.height.as("px");       
    if (docWidth / docHeight > 4.8)
        docRef.rotateCanvas (315)
        docRef.trim()
    else if (docHeight / docWidth > 4.8)
        docRef.rotateCanvas(45)
        docRef.trim()
    if (docWidth < docHeight)
              docRef.resizeImage(undefined, UnitValue(270,"px"), 72,  ResampleMethod.BICUBIC )
          else if (docWidth > docHeight)
                          docRef.resizeImage(UnitValue(270,"px"),undefined, 72,  ResampleMethod.BICUBIC )
          else if (docWidth == docHeight)
                    docRef.resizeImage(UnitValue(270,"px"),UnitValue(270,"px"), 72,  ResampleMethod.BICUBIC )
    docWidth = docRef.width.as("px");
    docHeight = docRef.height.as("px");       
    if (docWidth < docHeight)
                        docRef.resizeCanvas(UnitValue(300,"px"), UnitValue(300,"px"), AnchorPosition.MIDDLECENTER);
          else if (docWidth > docHeight)
                docRef.resizeCanvas(UnitValue(300,"px"), UnitValue(300,"px"), AnchorPosition.MIDDLECENTER);
          else if (docWidth == docHeight)
                docRef.resizeCanvas(UnitValue(300,"px"), UnitValue(300,"px"), AnchorPosition.MIDDLECENTER);
    var docRef = app.activeDocument;
    var savedState = docRef.activeHistoryState;
    fitImage();
    app.displayDialogs = DialogModes.NO;
    ExportPng( File( "",".jpg" ))
    docRef.resizeImage(UnitValue(66,"px"),UnitValue(66,"px"), 72,  ResampleMethod.BICUBIC );
                ExportPng2( File( "",".jpg" ))
    docRef.close(SaveOptions.DONOTSAVECHANGES);
    docRef = null;
    // Reset app preferences
    app.displayDialogs = startDisplayDialogs;
    preferences.rulerUnits = originalRulerUnits;

    Does this help?
    main();
    function main(){
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PIXELS;
    var inputFolder = Folder.selectDialog("Select the input folder");
    if(inputFolder == null) return;
    var fileList = inputFolder.getFiles(/\.(jpg|tif|psd|png)$/i);
    var outputFolder1 = Folder(inputFolder + "/300x300");
    if(!outputFolder1.exists) outputFolder1.create();
    var outputFolder2 = Folder(inputFolder + "/66x66");
    if(!outputFolder2.exists) outputFolder2.create();
    for (var a in fileList){
    open(fileList[a]);
    var Name = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, '');
    app.activeDocument.trim(TrimType.TRANSPARENT);
    FitImage(300,300);
    var saveFile = File(outputFolder1 + "/" + Name + ".jpg");
    SaveForWeb(saveFile,70);
    FitImage(66,66);
    var saveFile = File(outputFolder2 + "/" + Name + ".jpg");
    SaveForWeb(saveFile,70);
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    preferences.rulerUnits = originalRulerUnits;
    function FitImage( inWidth, inHeight ) {
    var desc = new ActionDescriptor();
    var unitPixels = charIDToTypeID( '#Pxl' );
    desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
    desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
    var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
    executeAction( runtimeEventID, desc, DialogModes.NO );
    function SaveForWeb(saveFile,jpegQuality) {
    var sfwOptions = new ExportOptionsSaveForWeb();
       sfwOptions.format = SaveDocumentType.JPEG;
       sfwOptions.includeProfile = false;
       sfwOptions.interlaced = 0;
       sfwOptions.optimized = true;
       sfwOptions.quality = jpegQuality;
    activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);

Maybe you are looking for

  • BETWEEN DATE Query help

    Dear Experts, I am new to PL/SQL and need your expert advice and help on below query, SELECT * FROM SCHEMA.TABLE WHERE DATETIME BETWEEN (TO_DATE('SYSDATE-1 07:00:01','MM/DD/YYYY, HH24:MI:SS')) AND (TO_DATE('SYSDATE-1 14:59:59','MM/DD/YYYY, HH24:MI:SS

  • Generating PDF from MSWord--IsTable of Content Updated?

    Hello, In generating PDF from MSWord document does the Adobe process call a method on the MSWord object to update the TOC field in the Word document during the generation process. Or is it assumed that the table of content in the Word document is alw

  • Learning the hard way you should back up your iphone!

    Hey everyone, I dropped my iphone 5 in the bathtub, needless to say it no longer works. I can switch it on and off but the screen stays blank. My computer does not register when i try to plug it in. If I take it into an apple store is there any way t

  • Constantly getting publishing errors in iWeb

    Has any one else experienced publishing errors when trying to publish to your ,mac account?

  • Help with running Ant

    In a quest to teach myself all about Java Servlets, I'm currently working my way through The Java Web Services Tutorial. However, I have become stuck as I try the command: ant build I recieve this message: Exception in thread 'main' java.lang.NoClass