Save for web filename problems

I'm using a script to export layers to PNGs - but the filenames are getting screwed up.
Here's the export function:
function saveForWebPNG(name){
var docName = activeDocument.name;
docName = docName.slice(0,-4);
toWhere = new File(fullPath+"/"+docName+name+".png");
var opts = new ExportOptionsSaveForWeb();
opts.format = SaveDocumentType.PNG;
opts.PNG8 = false;
opts.transparency = true;
opts.interlaced = false;
opts.quality = 100;
activeDocument.exportDocument(toWhere, ExportType.SAVEFORWEB, opts);
I end up with things like this:
_generic_filter_failed_disabl#0
when it should be:
_generic_filter_failed_disabled.png
I have a feeling this might be to do with the settings trying to limit it to 32 characters (so they're unix compatible) - but if I change the settings in the Save for web dialog it makes no difference.
TIA,
James

> I have a feeling this might be to do with the settings trying to limit it to 32 characters
Yep. It's a hard limit on either the Mac or XP. You may be able to create
filenames with more than 32 characters, but only the first 32 are significant.
Back in the earlier MS-DOS days it was far worse.
>(so they're unix compatible)
Not a unix problem. You're filenames can be incredibly long on unix.
>- but if I change the settings in the Save for web dialog it makes no difference.
I really don't know what that setting controls. I thought it was more like the
character set or encoding of the filenames. Let me know if you figure it out.
-X
for photoshop scripting solutions of all sorts
contact: [email protected]

Similar Messages

  • Save For Web transparency problem: Overprint & CMYK documents

    OK, I had a weird problem crop up today (as far as I can tell) completely out of the blue.
    When I am working in overprint preview mode in a CMYK document, and I attempt to save an artboard as a PNG w/ transparency (via Save for Web), illustrator forces a white background throughout the image. It didn't do this until this morning. Yesterday, it was working perfectly normally. I put the computer to sleep at the end of the day, woke it up this morning, and for some reason this behavior has changed.
    It does not do this if the document is in RGB mode, or I have the transparency grid shown, or not in overprint preview mode. (I work in this mode because for some reason having it in standard preview shows very strange artifacts when working with raster effects, which drives me crazy)
    I'm on a Mid 2014 MBP Retina, 2.5 GHz Intel Core i7, 16GB 1600MHz DDR3 w/ NVIDIA GeForce GT 750M 2048MB, running illustrator CC 2014.1.1.
    I have tried uninstalling, reinstalling, restarting the computer, resetting all settings, as well as changing document settings, and editing artboard settings. And yes, the transparency checkbox is checked in the Save For Web dialog.
    Any ideas?

    brnscreative,
    Have you tried 4) and 6) on the list?
    4) is more thorough than 3), and 6) is the full reinstallation.
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • CS4 using Save for Web & Devices Problem

    I choose Save for Web & Devices. Select .jpg as file type but on bottom left under preview it says GIF. And I cannot reduce the resolution quality using the slide bar. It always says GIF and file size stays the same.   Can anyone tell me how to fix this?  It's only been happening the last few days. Worked fine before.  Oh and the file I am trying to save is 72dpi RGB less than 200px x 200px.  So don't think it's a file settings issue.

    Thanks for the response.
    The background is transparent and will end up on a white background eventually.
    I tried to make it clear in Dreamweaver by scaling it and it did seem to improve it somewhat. But it still doesn't look like the clear copy in Illustrator that I started with...
    I also need to be able to embed this in a Word document to print for a hardcopy manual.
    I had this same problem with Freehand a few years ago.

  • Save for Web & Devices problems

    Hi. I have sliced all my pieces in PS. I then went to Save for Web and Devices. For some reason my slice tool cannot be grabbed (I click on it and it doesn't turn to slicer). Also, the color table is all gray. No colors. I am going nuts! I have tried everything to make them appear.
    I am very new to PS. I am taking a DW class (didnt know I had to have extensive knowledge in PS first, so now learning both programs for school), and my project was due last night. I need to hand it in Thur night but I can't do the things I need to in order to get it ready for DW.
    Please help somebody! Thank you so much!
    Penne

    There is no slice tool inside Save for Web and Devices dialog, you should slice the image first and then select File > Save for Web & Device
    You can get help from this page:
    http://help.adobe.com/en_US/Photoshop/11.0/WS9E2C7F1A-87C0-4dae-9C0C-0C2B3C566F84.html

  • Photoshop CS2 Save for Web bug?

    I'm wondering if this is a known bug:
    When I go to "Save for Web" and hit Save -- if the filename is going to replace a file that already exists and it says "Some of the specified files already exist in the target location. The files marked below will be replaced" and it gives me the options REPLACE or CANCEL.
    If I click CANCEL so that it won't replace the existing, it STILL overwrites it.
    This is quite annoying and has overwritten files I needed, even though I said No.
    Is there a patch or something I need to fix this bug?

    Here were my actual steps:
    I opened up a PSD file and did File -> Save for Web & Devices. I called it "test1.jpg".
    Then I changed my PSD slightly, and went to Save for Web again. If I call it "test1.jpg", hit Save, it prompts me "Some of the specified files already exist in the target location...."
    But then if I hit CANCEL to rename it to test2.jpg, it SAVES it anyway with test1.jpg and overwrites my original.
    I know I can just try to be more careful with filenames, but sometimes it happens on accident. Especially since PS shortens the Save for Web filenames, so if I have a long enough name and i DO remember to add "2" to the end of the filename, it'll chop it shorter and overwrite my original.
    A specific example:
    My first file was called "NO-pocket-tee-tamarind-sole.jpg" which is JUST short enough to not get chopped.
    When I go to save my second file as "NO-pocket-tee-tamarind-sole2.jpg" it chops off the 2 and overwrites my original file even though I hit CANCEL - don't overwrite!
    Does that make sense?

  • Filenames getting truncated in Save for Web AppleScript

    Hey all, running CS4 on an Apple Macbook Pro (using OS X 10.5.6). I am creating an AppleScript that saves out a number of files with different filenames using save for web. The problem is that Photoshop CS4 is truncating the filename, and using a shorter filename is not an option (there is identifying info in the filename that I need to retain). Is there a way within the script I can set it to allow longer filenames? My current save for the web script line looks as follows:
    export current document in file filename as save for web with options {quality:60, web format:JPEG}
    What happens is that a filename like this:
    CANON-PRO8000MKII-ideal-ideal-24.jpg
    gets cut down to this:
    CANON-PRO8000MKII-ideal-ideal#0
    I believe that there there is a PShop bug here that has a hard-coded limit on the filename, but which does not happen if you enter  the file name manually: if I go into the save for web dialog and enter the full filename, it works fine.  Any ideas?

    I recall having this problem too, my solution was to truncate the file name in the script prior to the save, then rename the saved file.
    e.g.
    if length of theNewFileName > 31 then
    set theTempFileName to theNewFileName
    set theNewFileName to (text 1 through (31 - (length of theFileExtension) - 1) of theNewFileName & "." & theFileExtension) as string
    end if
    set theNewFile to (saveToFolder & theNewFileName) as string
    -- Save the file here
    if theTempFileName = "" then
    -- File name wasn't truncated
    else
    -- Rename truncated file
    tell application "Finder"
    try
    set name of (theNewFile as alias) to theTempFileName
    on error errMsg number ERRNUM
    display dialog "Error renaming file - " & errMsg
    end try
    end tell
    end if

  • Save for web - animated gif problem PSE (Mac)

    Trying to save an animated gif using Save for Web dialogue box...
    works fine, except checkbox "Loop" and delay rate drop down box are highlighted (active) but can't be changed
    anyone know reason /  fix?

    No fix, alas. This has been a problem in the mac version since PSE 6. If your gif is small, you can duplicate layers so that they appear to stay onscreen longer, but the best advice is to not use PSE/mac for this, unfortunately.

  • GIF/Save for Web problem (PSE 7)

    I've tried searching for an answer to this problem but nothing seems to address quite what's happening.
    I recently had to replace my laptop, and switched from Windows XP to Windows 7.  I transferred PSE 7 from the old system to the new system, and have had no trouble with it- until now.  I have a 52-layer Photoshop-format image that I would like to save as an animated .gif, with each layer as a different frame.  File >> Save As has the option to save Layers as Frames, but if I check it, then click "Save", nothing happens.  Nothing at all.  On my old system, I'd get a new dialogue with options like quality, duration per frame, loop, etc, but that's not happening anymore, and nothing saves (if I go to find the new .gif file, it's just not there). If I DON'T choose "Layers as Frames", the .gif dialogue comes up just fine, and it has no trouble saving as a static .gif.  But it seems that it's just refusing to save it in animated format.
    I'm having the same issue with "Save For Web".  Neither the file menu option or the keystroke command will bring up the dialogue to let me save it that way.  It thinks for maybe a second, but then doesn't do anything else, and doesn't save the image.
    I've already tried resetting the layout, just in case the dialogue box was shifted somewhere I just wasn't seeing, and I tried resetting the Save For Web preferences, but neither of those things worked.  Any explanation as to why an animated "Layers as Frames" .gif is the only format that isn't saving properly?
    I've also tried opening old animated .gifs that I created with XP, and they will not re-save as animated .gifs either.  I get the "Do you want to save the changes made" dialogue, but clicking "Yes" doesn't do anything and doesn't save the updates.  I'm at a complete loss for why this function no longer works.

    Glad you got it working.
    It takes some getting use to the differences between xp and windows 7
    in regards to permissions and all that stuff. Even when you install
    programs on an administrative account, problems still persist sometimes.
    What i do is always install programs by right clicking on the installer and
    choosing Run as Administrator even when installing on an account with administrative
    permissions. I seem to have less problems doing it that way. Anyway, just something to
    keep in mind for the future.
    MTSTUNER

  • Retaining original filenames in Save For Web droplet

    Automation from LR to PS is going groovy, but,
    The output files are all being renamed by the 'save for web' dialogue box to the filename saved inside the action that the droplet points to..
    So file #1 is saved ok,
    File #2 renamed as file #1 and replaces/overwrites original file #1..
    I have added a sequence 4 digit number to the file name in the droplet creation dialogue box but the final file rename happens after this in the final process of 'Save for Web' export..
    This is what I want to do.. Ideally..
    LR Raw file edited to taste,
    Export as watermarked TIF to PS
    Action a high pass filter,
    Export through Save for Web @ 1200px long - 75% quality
    Close TIF without saving.
    Es possible?

    Hi JJ,
    Nope, I didn't change any names.. or do you mean I automatically/inadvertantly change the name when recording the 'save for web' step?
    In your image above, mine looks similar but the filename is that of the file I need to have open in need to record an action..
    In my case, using your example, all my exported files would be renamed 'webnamed.jpg'
    and overwrite each export one by one...
    What is it I'm not getting??? !!
    How can you record an action without an open file, that the 'action record process' records THAT filename and makes it sticky in the action..
    Sorry to come across as really blonde here but I'm just not getting it..
    Here's what mine says..

  • I am using photoshop cc 2014.2 And when I use save for Web it gives me a dialog box that says it is using Latin characters I've never seen this before. Does anyone have an answer for this problem or do I need to go back to the older version of Photoshop.

    I'm using Photoshop cc 2014.21 I you save for Web and dialog box comes up that says that Photoshop is using Latin characters and that servers cannot recognize Latin characters in webpages and you may have trouble viewing these pages does anyone have an answer for this problem?

    What Firefox version is currently installed on the computer?
    You can find the full version of the current current Firefox release (37.0.2) in all languages and all operating systems here:
    *https://www.mozilla.org/en-US/firefox/all/
    If you have a very old Firefox version then you could consider to uninstall that version to clean up existing registry keys (especial the uninstall key).
    Make sure NOT to remove "personal data" when you uninstall Firefox, because that will remove all profile folders and you lose personal data like bookmarks and passwords including data in profiles created by other Firefox versions.
    Check the Firefox program folder and remove the Firefox program folder if there are still files left in it.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure NOT to remove personal data when you uninstall Firefox as that will remove all Firefox profile folders and you lose your personal data.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Save for Web problem

    I am using 'fit artboard to selected items' feature and everything looks as it should be until I try to export them through Save for Web.
    When I do that a one pxl feathered border appears on a file, like in example (border is on left and top of the image).
    I can't seem to find what's wrong, so, pls, help!
    I'm on MAC, using CS 5.1.

    I am saving as .png 24 with transparency and not interlaced.
    However, I tried other formats and I see the same problem in all of them.
    When I look at the borders in Illustrator Workspace I don't see that feather, but I can clearly see it in preview for Save for Web.
    And I also know that it's not the problem with my computer because all other colleagues (there's 8 of us) are having the same issue.
    So, I made another example, using just the plain red square and, while in Artboard Tool, clicked on it and Workspace showed that it bounded to square perfectly, but it's not :/
    Same transparent 1pxl column on the left and top of it.

  • In Photoshop CS6, Save for Web strips out my filename after a period "." character

    I have a file named label-1.5oz.psd.  In Photoshop CS6 when I use "Save for Web" to save it as a JPG, it only wants to save a part of the filename: label-1.jpg
    I strips out everything after the period "." character.  I know it's incorrectly thinking that's a file extension.
    Any ideas how I can fix this?  Any settings I should tweak?  I'd really love for it to save the full filename without requiring me to retype the last part every time.
    Thanks in advance for any help!

    Oh if only it were that easy...  Unfortunately, they have to be cropped and resized, converting over from a print catalog where much of that work was originally done in InDesign, and now have to convert each individual image to make the web site look like the catalog...  but thanks for the suggestion, have already tried to automate what I could..  But much of this is going to be hands on...  getting my familiar quick keys to function correctly would help greatly.

  • Photoshop CS3 color management "Save for Web" problem

    This problem is getting the best of me.......
    After spending 3 full days researching this problem, I am no closer to finding an answer than when I started. I still cannot produce a usable image through the "Save for Web" feature of Photoshop CS3. I have read web page after web page of "Tips, Tricks and Recommendations" from dozens of experts, some from this forum, and still I have no solution... I am exhausted and frustrated to say the least. Here's the simple facts that I know at this point.
    I have a web design project that was started in PS CS1. All artwork was created in photoshop and exported to JPG format by using "Save for Web". Every image displays correctly in these browsers (Safari, Camino, FireFox and even Internet Explorer on a PC).
    I have recently upgraded to PS CS3 and now cannot get any newly JPG'd image to display correctly. My original settings in CS1 were of no concern to me at the time, because it always just worked, and so I do not know what they were. I have opened a few of my previous images in CS3 and found that sRGB-2.1 displays them more or less accurately. I am using sRGB 2.1 working space. Upon openning these previous image files, I get the "Missing Profile" message and of course I select "Leave as is. Do Not color manage". CS3 assumes sRGB-2.1 working space, opens the file, and all is well.
    The problem is when I go to "Save for Web", the saturation goes up, and the colors change. The opposite of what most people are reporting. Here's another important point... new artwork created in CS3 does exactly the same thing, so it's not because of the older CS1 files.
    I have tried every combination of "uncompensated color", "Convert to sRGB", "ICC Profile", etc. while saving. I have Converted to sRGB before saving, and my monitor is calibrated correctly.
    I have tried setting the "Save for Web" page on 2-up and the "original" on the left is already color shifted before I even hit the "Save" button. Of course, the "Optimized" image on the right looks perfect because I am cheating by selecting the "Use Document Color Profile" item. Why do they even have this feature if doesn't work, or misleads you?
    Does anyone have any ideas what could be happening here? Why is this all so screwed up?
    CS1 worked fine out of the box.
    Final note: I do have an image file I could send along that demonstrates how it is possible to display an image exactly the same in all 4 of the browsers I mentioned with no color differences. It is untagged RGB and somehow it just works.
    I am very frustrated with all of this and any suggestions will be appreciated
    Thanks,
    Pete

    >> First of all... I'm using an Adobe RGB image master... I open it and get the Profile Mismatch Screen... I choose Use Enbedded profile... all looks well. Next I go to Proof Setup > Monitor RGB... again all looks well, no change that I can tell.
    This has further confused the issue on several points, not the least of which version PS you are doing this with?
    >> AdobeRGB> Convert to Profile > Working Space sRGB-2.1... all still looks well... but now, when I go to Proof Setup > Monitor RGB... I see the insane oversaturated look that is driving me nuts.
    That is your strongest clue...it sounds like you have a bad system or bad monitor profile. To rule out the monitor profile: Set sRGB as your monitor profile in System Prefs> Displays> Color.
    >> Adobe RGB image master... I open it and get the Profile Mismatch Screen... I choose Use Enbedded profile... all looks well. Next I go to Proof Setup > Monitor RGB... again all looks well
    That doesn't make sense, stripping an embedded AdobeRGB profile should desaturate the color in Softproof MonitorRGB, especially the reds -- you have something wacky going on there.
    At this point I think you need to review the links and get a grip about how color management and profiles work...
    BTW, forget about setting ColorSync in PS COlor Settings, use Adobe ACE.
    MO,
    I think SFW is fixed under CS3 :) By default it Converts to sRGB and strips the profile.

  • Adobe Photoshop Elements 2 and 'Save for Web' problem

    Hi everyone,
    I have used Photoshop Elements 2 for some time with absolutely no problems. However when I try to use the save for the web option I get an 'export could not be completed due to a program error' message.
    Nothing relevant is mentioned on Adobe's support site. After having gone through the usual 9 troubleshooting procedure I suspect that there is a problem with the 'Save for Web EL' plugin located in the PE 2 plugins folder. Has anyone else experienced this? Is there a way I can somehow find a functional plugin?
    Thank you for reading this post.
    PowerBook G4 DVI 667   Mac OS 9.2.x  

    I don't use Photoshop elements myself, but from Photoshop CS it works fine. I use JPG compression and optimization. First of all - make sure the file format extensions are all available. Applications/adobe/photoshop elements/file formats AND ALSO Applications/adobe/photoshop elements/photoshop elements only/file formats (here I am assuming the paths are the same or similar to Photoshop). Also, check the extensions disabled folder (Control click on Photoshop and go to package contents). If it's none of these, I suggest you check the settings in Elements when trying to save and make sure you are not using an option that conflicts.
    Also, check the Adobe forum. http://www.adobeforums.com
    Check for software upgrades also.
    You do have enough hard drive space and RAM I assume. If you are using PS Elements and virtual memory is on, you may not have enough phsyical space to save the file (but not likely)
    P.S. I see (after i wrote) that you are running 9.2.2 - so the paths will not be the same as if it was on OS X - but they will be similar.

  • I am using adobe photoshop cs6. I am facing a problem. When i save any image as "save for web". After saving image it show cropped. An image show many parts of the image after saving the image. Please help me. Thanks in advance.

    I am using adobe photoshop cs6. I am facing a problem. When i save any image as "save for web". After saving image it show cropped. An image show many parts of the image after saving the image. Please help me. Thanks in advance.

    Just go back in photoshop and use the Slice Select tool, then just click and select the slice and hit delete - if you're not sure which one is the active slice just right click and find the one that has the Delete Slice option.
    It's possible you either added the slices by accident or if you received it from someone they just had the slices hidden. For the future, you can go to View > Show > Slices to display (or hide) slices.

Maybe you are looking for

  • Hard drive not recognized after lion upgrade

    My hard drive WD "My Book Studio Edition 1TB" mounts and unmounts non stop. Firewire or UBS is the same. Also with a new firmware of the disk and after a formatting. The file system is HFS+ journaled. My hardware is an iMac early 2009 24". No problem

  • Creation of dynamic internal table is not synchronous

    In my code following lines are used to create a dynamic table. REFRESH : INCTABL .   CLEAR INCTABL .   INCTABL-LINE = 'data: begin of dyntab occurs 10,'. APPEND INCTABL.   INCTABL-LINE =   'zpltnamec like zvendplt-zpltnamec,'. APPEND INCTABL.   INCTA

  • Frequent Mouse-Down Errors

    I'm experiencing frequent (every 11 minutes or so) mouse-down errors. As this occurs in any variety of apps, including the Finder, the application in-use seems to not be a factor. I will be using an application and suddenly the track-pad no longer wo

  • How to authenticate outgoing FW users by Windows group membership

    Hi, I need to authenticate all (windows) users who access the internet through an IOS firewall. Applies not only to web traffic (which is easy to do), but also to other applications (e.g. some telebanking programs, RDP sessions etc.) Basically, I nee

  • Infuriating Aspects of Numbers Hyperlinks

    In Numbers you can make a URL into a hyperlink by selecting the hyperlink text and choosing Inspector > Hyperlinks > Enable as a Hyperlink. You can get around the fidgety selection by double clicking in and empty part cell if the cell is big enough.