Export to iPad .png or .jpg with a specific resolution?
Hello
I really like this app, but after completing the work line of the sketch, I tried to save a version of it on my device to work in another application, but has given no choice on the exported image file type or resolution.
The version of the file that was saved in the device was very low resolution and not much use.
I thought it was a vector based there and that I would be able to export to some resolution, I need. Am I missing something?
Thank you.
The resolution is based on the resolution of the iPad to save raster images. It is not a way to export currently at different resolutions.
It is vector, but currently, you will need a subscription to CreativeCloud for export to Adobe Illustrator.
If you have any suggestions or just want to add a comment to my feature request thread, you can find it here: Feature Request: Save in CreativeCloud in vector format (svg / AI / draw)
Tags: Adobe Draw
Similar Questions
-
Export pages specified in format jpg to set resolution
Hello inDesign community-
I have a script that allows me to export the specified pages in a quick dialog as jpg with a specific resolution (500px wide).
It's great to take pictures, but she uses the dimensions of the page in the active document to define the formula for resolution.
This works unless there are pages of different sizes, how you get different size jpg.
How you can use the dimensions of each page that is exported individually.
I suppose there's a way to get a jpegExportPreferences.pageString table that can then be completed.
Thanks in advance
the pages to export
var pagesToExport
jpg final demensions
var myLargeWidth = 500;
var myLargeHeight = 500;
Create a variable for the current active document
var app.activeDocument = docRef;
Delete ententions of the way to the end of the file
myFilename = docRef.name.replace (/ \.) [ ^\.] +$/, '');
Set the variable to save the file in the same directory as the current document
myFolder = docRef.filePath;
a document measurments points and redefined sovereign source
docRef.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
docRef.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
docRef.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
docRef.zeroPoint = [0,0];
defines the unit of measure (number or string) readonly array limits Page, in the format [x 1, x 2, y2, y1].
find the width of the page
var myCurrentWidth = app.activeWindow.activePage.bounds [3] - app.activeWindow.activePage.bounds [1];
find the height of the page
var myCurrentHeight = app.activeWindow.activePage.bounds [2] - app.activeWindow.activePage.bounds [0];
function exportJPG() {}
export jpg
If (myLargeWidth > 0) {}
Calculate the percentage of scale
var myResizePercentage = myLargeWidth/myCurrentWidth;
var myExportRes = myResizePercentage * 72;
exportResolution is accurate to 1 decimal, so round
}
else {}
Calculate the percentage of scale
var myResizePercentage = myLargeHeight/myCurrentHeight;
var myExportRes = myResizePercentage * 72;
}
percentage of caluclated serve resolution
app.jpegExportPreferences.exportResolution = myExportRes;
Export jpg in MyAccount Add .jpg at the end.
docRef.exportFile (ExportFormat.JPG, File(myFolder+"/"+myFilename+"-500px.jpg"));
back to inches
docRef.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;
docRef.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;
}
var myName = myInput ();
rest of the script
myInput () function
{
var myWindow is new window ('dialogue', 'Pages to export to JPG');.
var myCommentGroup = myWindow.add ('group');
myCommentGroup.add ('statictext', undefined, 'export to jpg files', {multiline: true});
myCommentGroup.maximumSize.width = 200;
var myInputGroup = myWindow.add ('group');
myInputGroup.add ('statictext', undefined, ' Pages: (1-3, 8, 10) ');
var myText = myInputGroup.add ('edittext', not defined, '1');
myText.characters = 20;
myText.active = true;
var myButtonGroup = myWindow.add ('group');
myButtonGroup.alignment = 'right ';
myButtonGroup.add ('button', undefined, 'OK');
myButtonGroup.add ('button', undefined, 'Cancel');
If (myWindow.show () == 1)
return myText.text myText.text = pagesToExport;
on the other
exit ();
}
preferences to export jpg
app.jpegExportPreferences.exportingSpread = false;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.HIGH;
app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_RANGE;
app.jpegExportPreferences.pageString = pagesToExport;
app.jpegExportPreferences.embedColorProfile = false;
app.jpegExportPreferences.jpegColorSpace = JpegColorSpaceEnum.RGB;
app.jpegExportPreferences.antiAlias = true;
exportJPG();
perform a function
Hello
1. you must insert function exportJPG() myCurrentWidth & calculation of height and run it for each page.
2. This function suppose to be tested in each selected page and the different exportPreferences;
3. If you need to split a string pageToExport in table variable collection separate pages.
Like this:
// which pages to export var pagesToExport; // final jpg demensions var myLargeWidth = 500; var myLargeHeight = 500; // create a variable for current active document var docRef = app.activeDocument; // remove ententions from end of file path myFilename = docRef.name.replace(/\.[^\.]+$/, ''); // set variable to save file in same directory as active document myFolder = docRef.filePath; // set document measurments to points and reset ruler orgin docRef.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points; docRef.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points; docRef.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN; docRef.zeroPoint = [0,0]; function exportJPG(cPage) { // export large jpg //bounds Array of Measurement Unit (Number or String) readonly The bounds of the Page, in the format [y1, x1, y2, x2]. // find width of page var myCurrentWidth = cPage.bounds[3]-cPage.bounds[1]; // find height of page var myCurrentHeight = cPage.bounds[2]-cPage.bounds[0]; if (myLargeWidth > 0) { // Calculate the scale percentage var myResizePercentage = myLargeWidth/myCurrentWidth; var myExportRes = myResizePercentage * 72; // exportResolution is only accurate to 1 decimal place, so round } else { // Calculate the scale percentage var myResizePercentage = myLargeHeight/myCurrentHeight; var myExportRes = myResizePercentage * 72; } // use caluclated percentage as resolution app.jpegExportPreferences.exportResolution = myExportRes; app.jpegExportPreferences.pageString = cPage.name; // export jpg in myfolder add .jpg to end. docRef.exportFile(ExportFormat.JPG, File(myFolder+"/"+myFilename + "_" + cPage.name + "-500px.jpg")); } // SUI Dialog myInput (); // jpg export preferences app.jpegExportPreferences.exportingSpread= false; app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.HIGH; app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_RANGE; app.jpegExportPreferences.embedColorProfile = false; app.jpegExportPreferences.jpegColorSpace= JpegColorSpaceEnum.RGB; app.jpegExportPreferences.antiAlias = true; // run function (loop through chosen pages) var b, c, d, stop; b = pagesToExport.split(","); while (c = b.shift() ) { d = c.split("-"); stop = parseInt(d[0]); while (stop <= parseInt(d[d.length-1]) ) { exportJPG(docRef.pages.item(stop-1)); stop++; } } // reset back to inches docRef.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches; docRef.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches; // rest of the script function myInput () { var myWindow = new Window ("dialog", "Pages to export as JPG"); var myCommentGroup = myWindow.add ("group"); myCommentGroup.add ("statictext", undefined, "export some jpgs", {multiline:true}); //myCommentGroup.maximumSize.width = 200; var myInputGroup = myWindow.add ("group"); myInputGroup.add ("statictext", undefined, "Pages: (1-3,8,10)"); var myText = myInputGroup.add ("edittext", undefined, "1"); myText.characters = 20; myText.active = true; var myButtonGroup = myWindow.add ("group"); myButtonGroup.alignment = "right"; myButtonGroup.add ("button", undefined, "OK"); myButtonGroup.add ("button", undefined, "Cancel"); if (myWindow.show () == 1) return pagesToExport = myText.text; else exit (); }
Note that different page sizes can lead to proportions different width/height.
In this case jpg is always different. (in height)
Jarek
-
Hello
I'm working on my homepage with the last muse 2015.1.0.2309
Fast 2 questions please:
1. when I started my drawing with the global "Hi-DPI" setting and would now go back to "standard" why muse record 2 different size jpg image, even if I've cancelled "Hi-DPI" setting?
2. when I export my finished site in a folder on my imac, why muse implements a PNG to a jpg image, I fall into the layout of muse?
Thank you, peter
At your breakpoints of the site? If so, the images are optimized and exported breakpointwise.
If you use effects, which introduce transparency, Muse needs to convert a jpg in PNG because JPG doesn't support transparency.
-
ColorSync does not export png or jpg tiff after update to iOS 10.11.3
Using ColorSync:
Completed the update to iOS 10.11.3 yesterday, but acknowledged that, after the update, I have one more no *.tiff export *.jpg or *.png files.
Many options for export has disappeared, that shouldn't be a problem, because the format png and jpg still appear in the list of options. But once I chose one of them I get an error if the name of the original file and the name of the export file are the same.
Example:
Open hearst.tiff in ColorSync and choose Save as.
In the menu next, I clicked on "hearst" to use the name, but now I said "could not export the document.
Looks like it was already possible to choose a file name by clicking on a file without actually replacing the existing, if the file type has been changed.
What do you mean "using ColorSync"? Do you mean "color synchronization utility?
Why would you use to convert an image file to another format? Preview is the default application for this.
Utility color synchronization is not an image editor; It is intended to manage color profiles to ensure accurate reproduction of colors on different screens.
Overview of the use.
-
Doubt on the export of pages in JPG format at high resolution with Indesign
Hello
I use to work two software, your skill of QuarkXpress and Indesign. If I had to choose one, I prefer Indesign, it is very nice and I love it, but I have to work with the software.
Well, I have a doubt about the use of Indesign method to export a page in JPG, high-resolution, because QuarkXpress do the same job, but in a different way, so my doubt is about the quality of the files produced.
It is a very technical issue, if someone with experience in the professional press and print or an Adobe expert could answer, I would be grateful.
InDesign, producing a poor quality file or QuarkXpress that producing a poor quality file?
My question is as follows:
I opened a document in Indesign, and I decide to export it. To simplify things, we have a unique page DIN A4 document.
So I tell Indesign to export the pageand I want a JPG, high-resolution 300 DPI file.
Indesign do his job very well, and produce the file exported. This is a JPG file, there are 300 dpi.
If I open the document in Photoshopand I'm going to... Image of ... Image size...
I see the Indesign document indicates the exact measurements of a DIN A4 210 x 297 mm and the resolution of the file, I have 300 DPI.
Therefore seems to be that indesign has done a great job.
Very well.
Now, I explain what is happening with QuarkXpress.
I do the same thing, I have a document to a single page, DIN A4 and I export it as JPG format at high resolution of 300 dpi.
Well, now QuarkXpress, create the file and I open the file in Photoshop.
Surprise.
The file has larger than DIN A4 and a lower resolution dimensions!
Exactly, QuarkXpress produce a jpg of the following dimensions: 874,89 x 1237,9 mm and a resolution of 72 dpi
When I see 72 dpi, I think that the document is in low resolution. However, I have a larger document?
I open the QuarkXpress file in Photoshop, then I uncheck resampling, in this way Photoshop will never change the image. Now, I change the value of resolution of 72 dpi, 300 dpi, which is the value I want.
And what happens? What happens is that I get a document with measurements of a DIN A4 and also at 300 DPI.
???
So basically QuarkXpress does the same work in Indesign, but in a different way.
The file QuarkXpress are 2.29 MB more or less. The Indesign file are 3.84 MB more or less.
So why these differences?
Which method is the best and why Indesign produce a different file to QuarkXpresss?
See you soon
As far as I know, the ppi is not the required metadata for the images.
So Im guessing that Quark exports jpg ppi worthless.
But Photoshop is to assign a value of ppi when it opens an image without specified ppi value.
This value is be 72, but it could be anything, because the pixel dimensions do not change.
-
Problems with the Save as PNG or JPG in Illustrator
I have all my works of art (vector objects/forms/etc.) on my work, but I also have other assets (ie. photos, notes, etc.) outside of the artboard.
When I save it as a PDF, it will save what is indicated in the plan of work which is exactly what I want. However, when I try to save it as a PNG or JPG, it includes the other goods, making the canvas of the bigger picture and what it should be. If he tries to hide the layers include other assets, it still saves with a size of canvas with a white background.Any thoughts on why this is happening? Thank you
are you checking this little box?
-
Export pages to jpg with custom file names
Hello world
I found - and slightly modified - this script that exports each InDesign page in jpg format, naming it with the relative page number.
I need to assign the value of a text that I have placed on each page, which is decorated with a paragraph called "filename" style file name
It would also be good to have user-friendly web file names, replacing spaces with dashes and turn them into tiny.
Thanks in advance for your help.
if (app.documents.length != 0) { var myDoc = app.activeDocument; MakeJPEGfile(); } else{ alert("Please open a document and try again."); } function MakeJPEGfile() { for(var myCounter = 0; myCounter < myDoc.pages.length; myCounter++) { if (myDoc.pages.item(myCounter).appliedSection.name != "") { myDoc.pages.item(myCounter).appliedSection.name = ""; } var myPageName = myDoc.pages.item(myCounter).name; app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high; // low medium high maximum app.jpegExportPreferences.exportResolution = 72; app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange; app.jpegExportPreferences.pageString = myPageName; var myFilePath = "~/Desktop/" + myPageName + ".jpg"; var myFile = new File(myFilePath); myDoc.exportFile(ExportFormat.jpg, myFile, false); } }
This code is the same as above, but with a few modifications and a new fuction
if (app.documents.length != 0) { var myDoc = app.activeDocument; MakeJPEGfile(); } else{ alert("Please open a document and try again."); } function MakeJPEGfile() { for(var myCounter = 0; myCounter < myDoc.pages.length; myCounter++) { if (myDoc.pages.item(myCounter).appliedSection.name != "") { myDoc.pages.item(myCounter).appliedSection.name = ""; } var myPageName = myDoc.pages.item(myCounter).name; var myJpegPrefix = ""; var isStyleExist = true; //Checking the existing of the paragraph style (filename) try { myDoc.paragraphStyles.item("filename"); } catch (myError) { isStyleExist = false; } if (isStyleExist) myJpegPrefix = getParagraphContent(myDoc.paragraphStyles.item("filename"), myDoc.pages.item(myCounter)) + myPageName; app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high; // low medium high maximum app.jpegExportPreferences.exportResolution = 72; app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange; app.jpegExportPreferences.pageString = myPageName; var myFilePath = "~/Desktop/" + myJpegPrefix + ".jpg"; var myFile = new File(myFilePath); myDoc.exportFile(ExportFormat.jpg, myFile, false); } } // The new function, but needs to add checking the file name rules. function getParagraphContent (paragraphStyle, currentPage) { var paragraphContent = ""; for (var c = 0; c < currentPage.textFrames.length; c++) { for (var i = 0; i < currentPage.textFrames.item(c).paragraphs.length; i++){ if (currentPage.textFrames.item(c).paragraphs.item(i).appliedParagraphStyle == paragraphStyle) { paragraphContent = currentPage.textFrames.item(c).paragraphs.item(i).contents; return paragraphContent; } } } return paragraphContent; }
Lack of check file naming rules.
-
Hello
I wanted to know if it is possible to simply save/export as PNG or JPG sites, so I can show it to customers. Now I have to screencapture all parts and photoshop together. Isn´t is there an easier way?
Kind regards
Tristan
Here's how I show my drawings of Muse and prototypes to customers:
1. the first step is to make sure that your browser has a plug-in or extension that can take screenshots of web pages like Awesome Screenshot. This extension works in Safari and Firefox, and there may be others, you can find that do the same thing. I use Safari on a Mac, but I believe that this extension is also available for Firefox for Windows. Using it is very quick and easy and gives you the .png of the entire web page files.
2. create the Muse pages.
2. go to the file menu of Muse and select 'Page Preview in browser' or 'Site Preview in the browser.
3. navigate to the page you want.
4. click on the capture impressive screen {or another similar extension} and follow signs, which are very easy.
5. the extension will capture your entire page and view it in the browser window. You simply right click on the page to copy the image and then paste into an email to your customer. Works very well.
-
Export JPG with NO exif, 'Except' comments
Export JPG with NO exif, 'Except' comments
* I find that for a number of things I export LR with no. Exif JPG files, but must KEEP comments in the Exif data.
Why? you ask...
(1) forums, when I want to post a JPG with Exif of NO... BUT when I post comments automatically post comments or Description of the photo.
(2) I Upload files jpg with no exif of a Magazine I take party photos for... and on the comments section is where I list the names of the people in the photos.
* Even on sites like SmugMug and glitter... Comments get downloaded... but sometimes you don't want the EXIF on everything.
areohbee wrote:
Consider that minimize metadata integrated export is not enough, minimal huh?
Minimize embedded metadata is TOO small, right? (wipe the comments too).
Looks like a good FR.
-
How to save png or jpg in the library of Cloud?
I have the idea that you simply move the objects of applications and it is in the library. However, if you wanted to Sage png, JPG, which are the exported on, PSD? It seems that if you import the png and jpg in, PSD or INDD and make them slide library, he adds that if the asset has been created in this program. Web browsers don't support not add them to the library - only when you purchase or download stuff on the market. You can add them through Bridge.
At a time I remember being able to do this and use the asset in any application, but it seems that the feature is gone. Any help would be appreciated.
And run an error that says "image type is prohibited" appears when you try to attach a screenshot here. So I hope that someone understands what I'm looking for help with.
I do not work for Adobe. Generally, you will find personal Adobe in the forums.
(1) "it seems that if you import the png and jpg in, PSD or INDD and make them slide library, he adds that if the asset has been created in this program.» This is how work CC libraries. For example, if you place a JPEG file in InDesign, and then drag the JPEG as well as InDesign libraries CC illustrations he does not keep a link to the JPEG file. You should incorporate the JPEG format in the InDesign file. When InDesign copies to a library, it includes a file of extract (useful for back into InDesign, where it can be restored) and a PDF file (useful if you place it in Illustrator or Photoshop).
Then to circle back to your original question, "How do I save png or jpg in the...» Library? "You open them in Photoshop and let them slide to the library.
(2) ' the web browsers don't support not add them to the library - only when you purchase or download stuff on the market. " You cannot add them by bridge. "Web browsers or bridge are currently part of a CC library workflow. As the diagram at the beginning of the first reference I gave you has pointed out, library workflow is based on the implementation of CC CC desktop applications and mobile applications and use the work in mobile applications and desktop applications.
(3) "and run an error that says"image type is prohibited"appears when you try to attach a screenshot here.» You are running within the limits of the Jive, which is Adobe software licenses to run the forums. Only files such as PNG or JPEG can tie in the window using the "camera" icon image.
-
PNG and JPG of PS 2015 does not appear on a Web site
- Photoshop CC 2015, newly installed this week, without Add-ons, plug-ins or customization of any kind. I have CS5.
- Windows 7 Pro 64 bit, fully patched
- Tried browsers: Chrome (v44.0.2403.89 m), Firefox (v39.0), Internet Explorer (v11.0.9600.17914IS)
If I save a PNG or JPG image, it will appear not on a local website (http://localhost/...). The image shows a broken link. I tried save as, export - export as Quick Export in PNG and even export - save for Web (Legacy), same results with all. Export GIF works very well.
I took a PNG created with CS5 another folder and it shows on this same web page successfully. I then opened that PNG in 2015 of Photoshop and exported in PNG (overwriting the original) and it shows a broken link.
If I find this same image in Windows Explorer as an overview, it seems. I can open it in any browser using the physical address (C:\...myimage. (PNG), but not if it's in a Web page.
What is going on?? This basically makes Photoshop 2015 completely useless for me.
The fixed. PERMISSIONS! When you save the first image for this project, I created a subfolder using the PS 2015 save as dialog box. For some reason, the new folder is not to keep the permissions of the parent folder, so nothing in this new folder appears.
Hope this helps someone as stupid as me. :-)
-
Select the resolution for the export jpeg or png
Hello
How to set the resolution of an image when you export in jpeg or png?
I imported a 300 x 150 cm in 150 dpi PNG image, I did a small crop, then when I want to always export to 150 dpi, but photoshop automatically changed my resolution to 72 dpi. When I go to export preferences, I can't see or edit the default 72 dpi value, I can see how to set the resolution of the new document, but only for export.On illustrator, I can choose the resolution when I save my image but for photoshop, I don't know...
I hope I was clear enough, thank you very much for your helpIf you want to keep the ppi, you do a save as.
Export (and save for Web) are designed for web images, where PPP is not relevant. For the display, only pixel issue dimensions.
You can also open the image exported in Photoshop, go to Image > Image size, and then change the ppi in 150, with Resample unchecked.
-
How to batch export layers in png in cc files
I have a problem with an export of layers to the script files I want to layer export batch in png and this script I have seems to be the only I can whenever I run the script I get this error message "Could not complete the action because the destination folder does not exist" the script required me to hardcode the my destination path the path that I need is "C:/users/Tim/Desktop/decors/png / '. I'm not completely sure why its registrant, that there is not any help would be greatly appreciated. I tried to contact the creator, but the post that it was was very old.
activate the double click from the Macintosh Finder or Windows Explorer
#target photoshop
//=================================================================
Globals
//=================================================================
exportPath var = ' / users/pedr/Documents/work/Clients/routes/Learning_Hub/Source/Comics/export ";
exportPath = exportPath + "/ layers ';
Localized UI strings
var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");
var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");
var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");
var strHelpText = locate ("$$$ / JavaScripts/X2L/Help = Please specify the format and location for the registration of each layer as a file.");
var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");
var strButtonBrowse = locate ("$$$ / JavaScripts/X2L/Browse = & Browse...");
var strLabelFileNamePrefix = locate ("$$$ / JavaScripts/X2L/FileNamePrefix = filename prefix :"); ")
var strCheckboxVisibleOnly = locate ("$$$ / JavaScripts/X2L/VisibleOnly only = & layers visible only");
var strLabelFileType = locate ("$$$ / JavaScripts/X2L/FileType = Type of file :"); ")
var strCheckboxIncludeICCProfile = locate ("$$$ / JavaScripts/X2L/IncludeICC = & include ICC profile");
var strJPEGOptions = locate ("$$$ / JavaScripts/X2L/JPEGOptions = Options JPEG :"); ")
var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");
var strCheckboxMaximizeCompatibility = locate ("$$$ / JavaScripts/X2L/enlarge = & maximize compatibility");
var strTIFFOptions = locate ("$$$ / JavaScripts/X2L/TIFFOptions = TIFF Options :"); ")
var strLabelImageCompression = locate ("$$$ / JavaScripts/X2L/ImageCompression = Compression of Image :"); ")
var strNone = localize("$$$/JavaScripts/X2L/None=None");
var strPDFOptions = locate ("$$$ / JavaScripts/X2L/PDFOptions = PDF Options :"); ")
var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");
var strTargaOptions = locate ("$$$ / JavaScripts/X2L/TargaOptions = Options of Targa :"); ")
var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");
var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");
var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");
var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");
var strBMPOptions = locate ("$$$ / JavaScripts/X2L/BMPOptions = Options of BMP :"); ")
var strAlertSpecifyDestination = locate ("$$$ / JavaScripts/X2L/SpecifyDestination = please specify destination.");
var strAlertDestinationNotExist = locate ("$$$ / JavaScripts/X2L/DestionationDoesNotExist = Destination does not exist.");
var strTitleSelectDestination = locate ("$$$ / JavaScripts/X2L/SelectDestination = Select Destination");
var strAlertDocumentMustBeOpened = locate ("$$$ / JavaScripts/X2L/OneDocument = you must have a document open for export!");
var strAlertNeedMultipleLayers = locate ("$$$ / JavaScripts/X2L/NoLayers = you need a document with several layers to export!");
var strAlertWasSuccessful = locate ("$$$ / JavaScripts/X2L/success = succeeded.");
var strUnexpectedError = locate ("$$$ / JavaScripts/X2L/Unexpected = unexpected error");
var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");
var stretQuality = locate (' $$$ / locale_specific/JavaScripts/X2L/ETQualityLength = 30 ");
var stretDestination = locate (' $$$ / locale_specific/JavaScripts/X2L/ETDestinationLength = 160 ');
var strddFileType = locate (' $$$ / locale_specific/JavaScripts/X2L/DDFileType = 100 ');
var strpnlOptions = locate (' $$$ / locale_specific/JavaScripts/X2L/PNLOptions = 100 ');
var strPNG8Options = locate ("$$$ / JavaScripts/X2L/PNG8Options = PNG-8 Options :"); ")
var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");
var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");
var strCheckboxPNGTrm = locate ("$$$ / JavaScripts/X2L/Trim = Trim layers");
var strPNG24Options = locate ("$$$ / JavaScripts/X2L/PNG24Options = Options format PNG-24 :"); ")
the drop in the index from the file type list
var png24Index = 7;
main();
///////////////////////////////////////////////////////////////////////////////
Functions
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
Function: main
Use: the core routine for this script
Entry: < no >
Return: < no >
///////////////////////////////////////////////////////////////////////////////
main() {} function
If (app.documents.length < = 0) {}
If (DialogModes.NO! = app.playbackDisplayDialogs) {}
Alert (strAlertDocumentMustBeOpened);
}
return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script
}
var exportInfo = new Object();
initExportInfo (exportInfo);
Search the last used via Photoshop register params, getCustomOptions rise if none does not exist
try {}
}
{catch (e)}
It's ok if we have any options, continue with the default settings
}
try {}
var Nomdoc = app.activeDocument.name; record the name of app.activeDocument before double.
var layerCount = app.documents [docName].layers.length;
var layerSetsCount = app.documents [docName].layerSets.length;
If ((layerCount < = 1) & & (layerSetsCount < = 0)) {}
If (DialogModes.NO! = app.playbackDisplayDialogs) {}
Alert (strAlertNeedMultipleLayers);
return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script
}
} else {}
var rememberMaximize;
var needMaximize = exportInfo.psdMaxComp? QueryStateType.ALWAYS: QueryStateType.NEVER;
app.activeDocument = app.documents [docName];
var duppedDocument = app.activeDocument.duplicate ();
duppedDocument.activeLayer = duppedDocument.layers [duppedDocument.layers.length - 1]; to remove the
setInvisibleAllArtLayers (duppedDocument);
exportChildren (duppedDocument, app.documents [docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
duppedDocument.close (SaveOptions.DONOTSAVECHANGES);
If (rememberMaximize! = undefined) {}
app.preferences.maximizeCompatibility = rememberMaximize;
}
If (DialogModes.ALL == app.playbackDisplayDialogs) {}
Alert (strTitle + strAlertWasSuccessful);
}
app.playbackDisplayDialogs = DialogModes.ALL;
}
} catch (e) {}
If (DialogModes.NO! = app.playbackDisplayDialogs) {}
Alert (e);
}
return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script
}
}
///////////////////////////////////////////////////////////////////////////////
Function: settingDialog
Use: pop of the UI and get the user settings
Entry: object of exportInfo containing our settings
Back: OK, the info in the dialog box is set to the exportInfo object
///////////////////////////////////////////////////////////////////////////////
function settingDialog (exportInfo) {}
return;
}
///////////////////////////////////////////////////////////////////////////////
Function: hideAllFileTypePanel
Use: hide all panels in common stocks
Entered: < none >, dlgMain is a global for this script
Return: < any >, all the panels are now hidden
///////////////////////////////////////////////////////////////////////////////
function hideAllFileTypePanel() {}
}
///////////////////////////////////////////////////////////////////////////////
Function: initExportInfo
Use: create our default settings
Entry: a new object
Return: a new object with the default params
///////////////////////////////////////////////////////////////////////////////
function initExportInfo (exportInfo) {}
exportInfo.destination = new String (exportPath);
exportInfo.fileNamePrefix = new String ("untitled_");
exportInfo.visibleOnly = false;
exportInfo.fileType = png24Index;
exportInfo.icc = true;
exportInfo.png24Transparency = true;
exportInfo.png24Interlaced = false;
exportInfo.png24Trim = true;
try {}
exportInfo.destination is Folder (new String (exportPath)) .fsName;. destination folder
var tmp = app.activeDocument.fullName.name;
exportInfo.fileNamePrefix = decodeURI (tmp.substring (0, tmp.indexOf("."))); part of the body filename
} catch (someError) {}
exportInfo.destination = new String (exportPath);
exportInfo.fileNamePrefix = app.activeDocument.name; part of the body filename
}
}
///////////////////////////////////////////////////////////////////////////////
Function: saveFile
Use: the routine of work, take our params and save the file accordingly
Entry: refers to the document, the name of the output file,
export of information object containing more information
Return: < any >, a file on disk
///////////////////////////////////////////////////////////////////////////////
function saveFile (docRef, fileNameBody, exportInfo) {}
saveFile (docRef, fileNameBody, exportInfo, false, true);
function saveFile (docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {}
var id6 = charIDToTypeID ('Expr');
var desc3 = new ActionDescriptor();
7 var = charIDToTypeID ("Usng");
var desc4 = new ActionDescriptor();
id8 var = charIDToTypeID ("Op");
id9 var = charIDToTypeID ('SWOp');
var id10 = charIDToTypeID ("OpSa");
Desc4.putEnumerated (id8, id9, id10);
id11 var = charIDToTypeID ("Fmt");
id12 var = charIDToTypeID ("IRFm");
id13 var = charIDToTypeID ("PN24");
Desc4.putEnumerated (id11, id12, id13);
var id14 = charIDToTypeID ("Introduction");
Desc4.putBoolean (id14, interlacedValue);
id15 var = charIDToTypeID ("Trns");
Desc4.putBoolean (id15, transparencyValue);
id16 var = charIDToTypeID ("Mtt");
Desc4.putBoolean (id16, true);
var id17 = charIDToTypeID ("MttR");
Desc4.putInteger (id17, 255);
var id18 = charIDToTypeID ("MttG");
Desc4.putInteger (id18, 255);
id19 var = charIDToTypeID ("MttB");
Desc4.putInteger (id19, 255);
id20 var = charIDToTypeID ("SHTM");
Desc4.putBoolean (id20, false);
id21 var = charIDToTypeID ("SImg");
Desc4.putBoolean (id21, true);
id22 var = charIDToTypeID ("OHSA");
Desc4.putBoolean (id22, false);
var id23 = charIDToTypeID ("SSLt");
var list1 = new ActionList();
Desc4.putList (id23, list1);
var id24 = charIDToTypeID ("DIDr");
Desc4.putBoolean (id24, false);
id25 var is charIDToTypeID ('In');.
Desc4.putPath (id25, new file (exportPath + "C:/users/Tim/Desktop/decors/png /" + fileNameBody + ".png"));
var delayed26 = stringIDToTypeID ('SaveForWeb');
Desc3.putObject (7, delayed26, desc4);
executeAction (id6, desc3, DialogModes.NO);
}
}
///////////////////////////////////////////////////////////////////////////////
Function: zeroSuppress
Use: return a string completed up to the figure (s)
Entry: num to convert, the number of necessary digits
Return: string padded all numbers
///////////////////////////////////////////////////////////////////////////////
function zeroSuppress (num, number) {}
var tmp = num.toString ();
While (tmp.length < number) {}
tmp = '0' + tmp;
}
return tmp;
}
///////////////////////////////////////////////////////////////////////////////
Function: setInvisibleAllArtLayers
Use: Unlock and make invisible all the layers of art, recursively
Entry: document or layerset
Back: all layers of art are unlocked and invisible
///////////////////////////////////////////////////////////////////////////////
function setInvisibleAllArtLayers (obj) {}
for (var i = 0; i < obj.artLayers.length; i ++) {}
obj.artLayers [i] .allLocked = false;
obj.artLayers [i] .visible = false;
}
for (var i = 0; i < obj.layerSets.length; i ++) {}
setInvisibleAllArtLayers (obj.layerSets [i]);
}
}
///////////////////////////////////////////////////////////////////////////////
Function: removeAllInvisibleArtLayers
Use: remove all layers invisible art, recursively
Entry: document or layer set
Return: < any >, all invisible layers are now gone
///////////////////////////////////////////////////////////////////////////////
function removeAllInvisibleArtLayers (obj) {}
for (var i = obj.artLayers.length - 1; 0 < = i; i--) {}
try {}
{if(!obj.artLayers[i].visible)}
obj.artLayers [i] .remove ();
}
}
{} catch (e)
}
}
for (var i = obj.layerSets.length - 1; 0 < = i; i--) {}
removeAllInvisibleArtLayers (obj.layerSets [i]);
}
}
///////////////////////////////////////////////////////////////////////////////
Function: removeAllEmptyLayerSets
Use: find everything empty layer sets and remove them, recursively
Entry: document or layer set
Return: empty layer sets are now gone
///////////////////////////////////////////////////////////////////////////////
function removeAllEmptyLayerSets (obj) {}
var foundEmpty = true;
for (var i = obj.layerSets.length - 1; 0 < = i; i--) {}
If (removeAllEmptyLayerSets (obj.layerSets [i])) {}
obj.layerSets [i] .remove ();
} else {}
foundEmpty = false;
}
}
If (obj.artLayers.length > 0) {}
foundEmpty = false;
}
Return foundEmpty;
}
///////////////////////////////////////////////////////////////////////////////
Function: zeroSuppress
Use: return a string completed up to the figure (s)
Entry: num to convert, the number of necessary digits
Return: string padded all numbers
///////////////////////////////////////////////////////////////////////////////
function removeAllInvisible (docRef) {}
removeAllInvisibleArtLayers (docRef);
removeAllEmptyLayerSets (docRef);
}
///////////////////////////////////////////////////////////////////////////////
Function: exportChildren
Use: find all the children in this document to record
Entry: duplicate the original of the document, export info.
Document reference, from file name
Return: < any >, the documents are saved accordingly
///////////////////////////////////////////////////////////////////////////////
function exportChildren (dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {}
for (var i = 0; i < dupObj.artLayers.length; i ++) {}
If (exportInfo.visibleOnly) {/ / only visible layer}
If (! orgObj.artLayers [i] .visible) {}
continue;
}
}
dupObj.artLayers [i] .visible = true;
var NomCouche = dupObj.artLayers [i] .name; store the name of the layer before change doc
var duppedDocumentTmp = dupDocRef.duplicate ();
If ((png24Index == exportInfo.fileType) |) (png8Index is exportInfo.filetype)) {/ / PSD: maintain transparency}
removeAllInvisible (duppedDocumentTmp);
PNGFileOptions
If (activeDocument.activeLayer.isBackgroundLayer == false) {//is it something other than a background layer?}
app.activeDocument.trim (TrimType.TRANSPARENT);
}
} else {/ / all flatten}
duppedDocumentTmp.flatten ();
}
Edit
var Nomdoc = app.activeDocument.name;
For some reason any indexOf fails if we include the '-', so we use 'copy' and decrement the index of 1.
docName = docName.slice (0, docName.indexOf('copy')-1);
var fileNameBody = (docName + '_' + layerName) .toLowerCase ();
fileNameBody = fileNameBody.replace (/ [:------/------* \? \ "\ <>\ \ |"]) /g, "_"); // '/\:*?" <> |' -> « _ »
If {(fileNameBody.length > 120)
fileNameBody = fileNameBody.substring (0.120);
}
saveFile (duppedDocumentTmp, fileNameBody, exportInfo);
duppedDocumentTmp.close (SaveOptions.DONOTSAVECHANGES);
dupObj.artLayers [i] .visible = false;
}
for (var i = 0; i < dupObj.layerSets.length; i ++) {}
If (exportInfo.visibleOnly) {/ / only visible layer}
If (! orgObj.layerSets [i] .visible) {}
continue;
}
}
var fileNameBody = fileNamePrefix;
fileNameBody += '_' + zeroSuppress (i, 4) + "s";
exportChildren (dupObj.layerSets [i], orgObj.layerSets [i], exportInfo, dupDocRef, fileNameBody); recursive call
}
}
///////////////////////////////////////////////////////////////////////////////
Function: objectToDescriptor
Use: create an ActionDescriptor of a JavaScript object
Entry: JavaScript Object (o)
unique chain of the object (s)
Pre process converter (f)
Return: ActionDescriptor
NOTE: Only, boolean, string, number and UnitValue are supported, use a pre processor
to convert other types (f) to one of these forms.
REUSE: This routine is used in other scripts. Please update those if you
change. I'm not include using or eval statements that I want these
stand-alone scripts.
///////////////////////////////////////////////////////////////////////////////
function objectToDescriptor (o, s, f) {}
o = {};
var d = new ActionDescriptor;
var l = o.reflect.properties.length;
d.putString (app.charIDToTypeID ('Msge"), s);
for (var i = 0; i < l; i ++) {}
var k = o.reflect.properties [i] m:System.NET.SocketAddress.ToString ();
If (k == '__proto__' | k == '__count__' | k == '__class__' | k == 'reflect')
continue;
var v = o [k];
k = app.stringIDToTypeID (k);
Switch (typeof (v)) {}
case 'boolean ':
d.putBoolean (k, v);
break;
case "string":
d.putString (k, v);
break;
case 'number ':
d.putDouble (k, v);
break;
by default:
{
If (v instanceof UnitValue) {}
UC var = new Object;
UC ["px"] = charIDToTypeID ("#Rlt"); unitDistance
UC ["%"] = charIDToTypeID ("#Prc"); unitPercent
d.putUnitDouble (k, uc [v.type], v.value);
} else {}
throw (new Error ("Unsupported type in objectToDescriptor" + typeof (v)));
}
}
}
}
return d;
}
///////////////////////////////////////////////////////////////////////////////
Function: descriptorToObject
Use: updating a JavaScript from an ActionDescriptor object
Entry: JavaScript Object (o), current to update object (output)
Photoshop ActionDescriptor (d), descriptor shoot again for object params of
unique chain of the object (s)
JavaScript function (f), position the utility of conversion process
Back: Nothing, update is applied to spent in JavaScript Object (o)
NOTE: Only, boolean, string, number and UnitValue are supported, use a post-processor
to convert other types (f) to one of these forms.
REUSE: This routine is used in other scripts. Please update those if you
change. I'm not include using or eval statements that I want these
stand-alone scripts.
///////////////////////////////////////////////////////////////////////////////
function descriptorToObject (o, d, f, s) {}
var l = d.count;
If {(l)
var keyMessage = app.charIDToTypeID ("Msge");
If (d.hasKey (keyMessage) & & (s! = d.getString (keyMessage))) return;
}
for (var i = 0; i < l; i ++) {}
var k = d.getKey (i); // i + 1 ?
var t = d.getType (k);
STRK = app.typeIDToStringID (k);
switch (t) {}
case DescValueType.BOOLEANTYPE:
o [strk] = d.getBoolean (k);
break;
case DescValueType.STRINGTYPE:
o [strk] = d.getString (k);
break;
case DescValueType.DOUBLETYPE:
o [strk] = d.getDouble (k);
break;
case DescValueType.UNITDOUBLE:
{
UC var = new Object;
UC [charIDToTypeID ("#RLT")] = "px"; unitDistance
UC [charIDToTypeID ("#PRC")] = '% '; unitPercent
UC [charIDToTypeID ("#pxl")] = "px"; unitPixels
UT var = d.getUnitDoubleType (k);
var uv = d.getUnitDoubleValue (k);
o [strk] = new UnitValue (uv, uc [ut]);
}
break;
case DescValueType.INTEGERTYPE:
case DescValueType.ALIASTYPE:
case DescValueType.CLASSTYPE:
case DescValueType.ENUMERATEDTYPE:
case DescValueType.LISTTYPE:
case DescValueType.OBJECTTYPE:
case DescValueType.RAWTYPE:
case DescValueType.REFERENCETYPE:
by default:
throw (new Error ("Unsupported type in descriptorToObject" + t));
}
}
If (undefined! = f) {}
o = f (o);
}
}
///////////////////////////////////////////////////////////////////////////////
Function: preProcessExportInfo
Usage: Convert Photoshop enums to strings for storage
Entry: Object of JavaScript of my parameters for this script
Return: Object of JavaScript with objects converted for storage
///////////////////////////////////////////////////////////////////////////////
function preProcessExportInfo (o) {}
o.tiffCompression = o.tiffCompression.toString ();
o.pdfEncoding = o.pdfEncoding.toString ();
o.targaDepth = o.targaDepth.toString ();
o.bmpDepth = o.bmpDepth.toString ();
Return to o;
}
///////////////////////////////////////////////////////////////////////////////
Function: postProcessExportInfo
Usage: convert strings in destocking Photoshop enums
Entry: Object of my parameters a string JavaScript
Return: Object of JavaScript with objects in the form of enum
///////////////////////////////////////////////////////////////////////////////
function postProcessExportInfo (o) {}
o.tiffCompression = eval (o.tiffCompression);
o.pdfEncoding = eval (o.pdfEncoding);
o.targaDepth = eval (o.targaDepth);
o.bmpDepth = eval (o.bmpDepth);
Return to o;
}
///////////////////////////////////////////////////////////////////////////
Function: StrToIntWithDefault
Usage: convert a string to a number, first depriving all the characters
Input: a string and a number of default
Return: a number
///////////////////////////////////////////////////////////////////////////
function StrToIntWithDefault (s, n) {}
var onlyNumbers = / [^ 0-9] / g;
var t is SS. Replace (onlyNumbers, "");
t = parseInt (t);
If (! isNaN (t)) {}
n = t;
}
return n;
}
End X2L.jsx
The exportPath variable is what you want to change to the beginning. It should read:
var exportPath = "~/Desktop/Backdrops/png/"; exportPath = exportPath + '/layers';//Get rid of this
The line you mentioned above should be:
desc4.putPath( id25, new File( exportPath + fileNameBody + ".png") );
Again, you must be logged in as 'Tim' to access folder of the user. If you're not, you must run the script as an administrator, and then specify the entire path.
-
PS CS6 unable to save png or jpg two errors
Since the update I downloaded for PS CS6 yesterday, I was unable to save my file psd to png or jpg even with a single layer. Two error messages I get are "unable to save the file out of memory" and unable to save file "insert a drive and location here" because the file is not found. I have 4 drives every step still half full. Two 4 gig flash drives not even half full, the scratch disk is assigned to the least used drive.
How do I roll back PS to its previous state?
Joni
It has no rollback option. You will need to run the creative cloud cleaning tool and reinstall. And savings directly to Flash drives isn't the best ideas first. The file IO might kill you. Your USB bus has only limited transfer rates...
Mylenium
-
IPad will not sync with iTunes on my laptop. Synchronization in iPpod settings will not work
MY iPad will not sync with iTunes on my laptop, the sync on my iPad button will not work. I have the latest updates on both.
I guess you mean that the sync button in iTunes, not on the iPad, will not work. If you are sure you have the latest version of iTunes and iOS (your profile shows 8.1) try quitting iTunes on the computer, restart the computer and force restart your iPad
No data is lost during this procedure. Hold on the sleep and home buttons at the same time for about 10 seconds until the Apple logo appears on the screen.
Maybe you are looking for
-
Re: Satellite Z30 - has 8.1 - update driver confusion with Win
Hello I have a question about the driver updates. Currently, Windows Update recommend me to update the audio driver (important) and the network (optionally) driver. Toshiba Service Station, however, doesn´t offers new drivers for these devices. My qu
-
Effectiveness of the Cartesian to spherical coordinate of the conversion
I use a VI in the LV 2014 distribution called ".vi NI_AALPro.lvlib:3D Conversion of coordinates (scalar)". It uses DBL inputs and outputs and has several functions of table build in it as a library function call. I need to make a massive number of Ca
-
Aspire M5 'Default boot device lack or failed to start.
Hello and thanks in advance for ANY help you can offer. I have an Aspire M5 that suddenly no longer starts and gives the message "Default boot device boot failure or lack" and claims recovery media to be inserted. I usb recovery media and have also s
-
How can I recover the files that windows has compressed to free up space on the disk?
-
Can anyone help, my vista home 32-bit edition computer is seriously messsed! ?? I'm unable to download windows updates and I have like 20 of them to download, it just never performs an act he says its download, but it's not I can leave it for hours a