Export particular sized JPEG with a script
Hi
I need a script that would save every page of my indd as JPEG. That´s not a problem. Challenging part is sizing. Resulting JPEGs should be as close to size 768x1024 as possible, but they are not allow to exceed those values. So if the shape is "wrong", one of those values should be exact and other one naturally leaves a little short...
Is it possible to do that with javascript?
Hey Petteri!
Well, the thing is that you can't export JPEG from InDesign to desired width/height. But, what you can do is to process exported image through BridgeTalk directly from InDesign to Photoshop. With BridgeTalk you can first check picture size, and then resize it if needed.
Hope that helps.
tomaxxi
http://indisnip.wordpress.com/
Similar Messages
-
Sizing images with jquery scripts...
There are numerous image-resizing scripts out there, most of them jquery-based.
This appears to be one of the most popular :
http://buildinternet.com/project/supersized/default.php
It's great, in that the script maintains aspect ratio at all times, always fills the screen, and simply hides excess information from the overflowing axis (be it X or Y).
What I'd like to do, however, is make an image fit the viewport vertically 100% (not 99% or 101%, but fit snuggly from top to bottom). Naturally, if the aspect ratio is maintained, then there will be instances of empty areas on the horizontal axis. This, I don't mind. With the design I have in mind, it's not a problem.
So really, I'm looking to fit images 100% snuggly from top to bottom, and left-justify them... so that the resulting blank area be on the right side of the viewport.
Anyone know of a script that will allow me to do this?One short answer is is this really what you want?
If you increase the size of the image using a script you will introduce distortion. Decreasing may be a little less harmful. These are graphics operations that are better carried out with a graphics program, not a script. And even then, upsizing is a very bad idea.
Also cropping off the tops or sides of images destroys whatever artistic integrity the image has.
If neither of these quality issues bother you, then good luck. -
Can I export from Muse cc with out java script coding?
How can I export from Muse CC with out Java Script Coding?
I'm trying to create an custom email but email won't recognize Java Script, Only HTML.
How do I export my tample from Muse CC using only HTML coding?
Thanks in advance.Hello,
It is not possible to selectively export only part of the code for the exported page(s). The pages that are exported, all the code for them is exported, and there's no way to export only the HTML and leave out the rest of it.
Cheers
Parikshit -
JPEG export of QuickTime frame (with Location info)
Shoot QuickTime with iPhone 4S camera app. Import into iPhoto and see that location data is recorded in file by nature of the fact that iPhoto shows a map pin of the location it was shot. Park QuickTime on a frame in iPhoto. Select File Export, Kind: JPEG, with Location information ticked (which when I hover over this option says "Include GPS data in exported photos" -- see attached photo). Click the Export button. Choose a folder and save. Resulting file is not a jpeg but is a 31 KB reference QuickTime of the original 1080p quicktime.
Why isn't this working?
iPhoto ’11 (ver 9.3 650.39)Prior to version 9.1.5, iPhoto would export the currently parked frame of a QuickTime file. (See:
http://macmost.com/export-video-still-frame-as-image-with-iphoto.html) This prior state of functionality, along with the fact that the current version's export menus do not dim or grey out during export from QT media, leads one to believe that frame export is a legitimate feature (or facility as you put it) of iPhoto that has somehow become broken, at least on my Mac. Maybe it works on other Macs.
Also, what is so wrong with the expectation that a still exported from video (which, by definition, is a series of stills presented at 30 frames per second, giving the illusion of movement) can inherit geolocation data from the originating video? What makes this such a radical notion? It is inheriting the width, the height, the saturation, the luminance -- why not throw in the location, which is a tiny morsel of geodata just asking to be plucked? Those piddly bits would grant the exported still a greater context; they would, indeed, place it on a map.
And what could be a finer honour for a piece of media, be it a photo, be it a QuickTime, be it a still exported from a QuickTime, than to be given its place on the iPhoto map. Such a proud distinction that says "Yes, I am an image (or a moving image, or a still taken from a moving image) and I was taken here." Do not deny the honour of placement to these media. All are worthy of placement on the map, because all are historical artifacts that beg for geo-context. And without geo-context, they become lost.
Goodnight.
(P.S. I plan to export lots of stills from lots of QuickTimes and do not want to do manual geotagging. No thanks.) -
Exporting jpegs with embedded previews?
For compatibility with a web application I wrote using an old workflow ending with a save-for-web in Photoshop, I need to export jpegs with embedded previews. (Not DNG or other format files with embedded jpeg previews.) This happens by default with Photoshop, but Lightroom doesn't do it and I can't find anything to change that in the settings. Am I missing something? And if this isn't included, is it on the to-do list for improvements?
Hi Andrew,
Please refer to the following forum post : http://forums.adobe.com/message/5770863#5770863
Regards,
Aish -
How to export jpegs with titles intact?
I am trying to share jpeg photos with my cousin for a geneology project (she is using Windows 7). I have labeled the photos in Apeture and given them a version name, and then a title (with all the people identified) but when I export them to share with her, none of the titles go with the photos - i.e. under "more information" the title is missing and only dimensions and device information is listed. What am I missing? Where did they go?
Are you trying to get the metadata included with the image when you export it or are you trying to get the metadata to display on the image?
If the first make sure you have the Include Metadata checkbox selected in the export preset.
If you want to have the metadata displayed on the image you will need to use a plugin like BorderFX
If it's something else post back and describe what you are trying to do in more detail.
regards -
How can I export photos from APERTURE with a new sequence and ignore the embedded JPEG number? Have tried renumbering to no avail.
has anyone resolved this issue?
This is now the second big Problem with using Apple's Appeture with NO apparent FIX...
Aperture has NO DIRECT way to Burn to a CD/DVD & apparently NO way to RE-SEQUENCE the numbering system????
ANYONE... I wish APPLE would address/fix these 2 problems... LIGHTROOM I guess is next?Hi David,
Coming in and whining loudly is rude. We are all volunteers here, voluntarily sharing our expertise so that users like you can make the most of their time with Aperture. Speaking just for myself: although I do care about your success with software (it's why I'm here), I don't care what software you use. If you want to use Lightroom, do so, and post your questions in an appropriate forum.
Burning files to a CD is a file operation done at the system level (it is built into OS X). Aperture lets your create sharable image-format files from your Images. You then use OS X's tools to burn those files to a CD. Iirc, you can set up a "Burn Folder" in Finder, into which you can export files created from your Images, and with a single click burn your CD.
Naming the files you create by exporting your Images can be tricky. There are _many_ possibilities. Some things can't be done. Sequencing can be done in a number of ways (see Léonie's answer above). What have you tried? What was the result? In what way did this differ from what you expected?
--Kirby. -
Exporting as jpeg with use artboards adds to file name
When I export from Illustrator CS5 with "Use Artboards" checked it adds a "-01" to the end of my file name before the extention. I'm assuming that its because its artboard #1 or something. It happens with the all or the range button checked. It doesnt show the -01 when you are saving the file name. This is pretty annoying because I have to go back and re name the files when this happens. Any advice? Thanks!
Same problem, Gex.
Been trying to get this resolved for months with no joy. I have recently produced over 250 brand logos for a large multi national, all of which have to supplied in various formats and file types including .jpg. I too use only one artboard and since I don't want the logos cropped tight to the image, I check "use artboard" with the result that I get logoname-01.jpg on every file.
It may not seem to be too much of a sweat to then delete the offending -01 from the resulting file name, but when you have to do this repeatedly it is extremely tiresome... and so unnecessary!! I too do not want, or need, to append the file name with anything at all.
I really am at a loss to know why, if i have one artboard (AND ONLY ONE) it has to have a number at all. With 2 or more artboards, sure, it may be useful to identify each, but with 1... that is it, that is all there is. The only one. One of one. No more, no less. Very little chance of confusion i would have thought!
So, Adobe can we have a radio button (or preference) along the lines of: "add pasteboard number" or "remove pasteboard number" or perhaps a more enlightened soul at Adobe can respond with a workaround (unlikely, it is Adobe after all!). -
Since loading Lion, I've experienced much more instability than Snow Leopard. In particular, Mail crashes with regularity, full-screen apps seem to run slower and show the beach ball more often for longer, etc. I love the features, but I'm disappointed with the performance. Any help coming from Apple? I've been sending them so many reports after crashes, that their file must be full!
Summoning max. courage, I did what you advised. Here is the result. What does this tell you? My Lion 7.2 (mid 2011 iMac) has several annoying glitches (which I have so far tolerated through gritted teeth) but none that have actually stopped me working.
BTW, I see several items involving CleanMyMac which I did not know I had. It is generally villified as a trouble-maker. Spotlight can't find an app. or a utility of that name. How can I get rid of what's there please? Just delete?
Last login: Thu Nov 3 20:55:11 on console
Steve-Kirkbys-iMac:~ stevekirkby$ kextstat -kl | awk ' !/apple/ { print $6 $7 } '
com.AmbrosiaSW.AudioSupport(4.0)
Steve-Kirkbys-iMac:~ stevekirkby$ sudo launchctl list | sed 1d | awk ' !/0x|apple|com\.vix|edu\.|org\./ { print $3 } '
Password:
com.openssh.sshd
com.stclairsoft.DefaultFolderXAgent
com.microsoft.office.licensing.helper
com.bombich.ccc.scheduledtask.067493DB-2728-4DF3-87D8-092EF69086E8
com.bombich.ccc
com.adobe.SwitchBoard
Steve-Kirkbys-iMac:~ stevekirkby$ launchctl list | sed 1d | awk ' !/0x|apple|edu\.|org\./ { print $3 } '
com.sony.PMBPortable.AutoRun
uk.co.markallan.clamxav.freshclam
com.veoh.webplayer.startup
com.macpaw.CleanMyMac.volumeWatcher
com.macpaw.CleanMyMac.trashSizeWatcher
com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae
com.adobe.AAM.Scheduler-1.0
Steve-Kirkbys-iMac:~ stevekirkby$ ls -1A {,/}Library/{Ad,Compon,Ex,Fram,In,La,Mail/Bu,P*P,Priv,Qu,Scripti,Sta}* 2> /dev/null
/Library/Components:
/Library/Extensions:
/Library/Frameworks:
AEProfiling.framework
AERegistration.framework
ApplicationEnhancer.framework
AudioMixEngine.framework
FxPlug.framework
NyxAudioAnalysis.framework
PluginManager.framework
ProFX.framework
ProMetadataSupport.framework
TSLicense.framework
iLifeFaceRecognition.framework
iLifeKit.framework
iLifePageLayout.framework
iLifeSQLAccess.framework
iLifeSlideshow.framework
/Library/Input Methods:
/Library/Internet Plug-Ins:
AdobePDFViewer.plugin
EPPEX Plugin.plugin
Flash Player.plugin
Flip4Mac WMV Plugin.plugin
JavaAppletPlugin.plugin
Quartz Composer.webplugin
QuickTime Plugin.plugin
SharePointBrowserPlugin.plugin
SharePointWebKitPlugin.webplugin
Silverlight.plugin
flashplayer.xpt
iPhotoPhotocast.plugin
nsIQTScriptablePlugin.xpt
/Library/LaunchAgents:
com.adobe.AAM.Updater-1.0.plist
com.sony.PMBPortable.AutoRun.plist
/Library/LaunchDaemons:
com.adobe.SwitchBoard.plist
com.apple.remotepairtool.plist
com.bombich.ccc.plist
com.bombich.ccc.scheduledtask.067493DB-2728-4DF3-87D8-092EF69086E8.plist
com.microsoft.office.licensing.helper.plist
com.stclairsoft.DefaultFolderXAgent.plist
/Library/PreferencePanes:
.DS_Store
Application Enhancer.prefPane
Default Folder X.prefPane
DejaVu.prefPane
Flash Player.prefPane
Flip4Mac WMV.prefPane
/Library/PrivilegedHelperTools:
com.bombich.ccc
com.microsoft.office.licensing.helper
com.stclairsoft.DefaultFolderXAgent
/Library/QuickLook:
iWork.qlgenerator
/Library/QuickTime:
AppleIntermediateCodec.component
AppleMPEG2Codec.component
DesktopVideoOut.component
DivX 6 Decoder.component
FCP Uncompressed 422.component
Flip4Mac WMV Advanced.component
Flip4Mac WMV Export.component
Flip4Mac WMV Import.component
LiveType.component
/Library/ScriptingAdditions:
.DS_Store
Adobe Unit Types.osax
Default Folder X Addition.osax
/Library/StartupItems:
Library/Address Book Plug-Ins:
Library/Frameworks:
EWSMac.framework
Library/Input Methods:
.localized
Library/Internet Plug-Ins:
Library/LaunchAgents:
com.adobe.AAM.Updater-1.0.plist
com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae.plist
com.macpaw.CleanMyMac.trashSizeWatcher.plist
com.macpaw.CleanMyMac.volumeWatcher.plist
com.veoh.webplayer.startup.plist
uk.co.markallan.clamxav.freshclam.plist
Library/PreferencePanes:
.DS_Store
Perian.prefPane
WindowShade X.prefPane
Library/QuickTime:
AC3MovieImport.component
Perian.component
Library/ScriptingAdditions:
Steve-Kirkbys-iMac:~ stevekirkby$ -
How do I export jpgs as tifs with the original resolution ?
Hi,
I am very new to Lightroom 5 (I only installed it today (on Windows 8.1) :-)) but I have read Victoria Bampton's Quick Start Guide and have read a number of forum posts over the last few weeks to get an idea about how the program generally works.
I am embarking on a project to scan and archive my family's photos and videos, and I will be using Lightroom to manage the collection. To start the project, I have just imported over 10,000 digital photos taken by a variety of cameras (36 of them, according to Lightroom !) over the last 12 years or so into a new Lightroom catalogue. These are all currently JPEG files, but I want to keep TIFF files in the collection because my research has led me to the conclusion that TIFF is a better long-term archival format.
I started by doing an Export of a small number of photos to save the .jpg files as .tif files, but when reviewing the results, I noticed that the image's resolution was changed during the export. For example, one original jpg is only 96ppi but the exported tif is 240ppi. Another jpg is 180ppi and the tif is 240ppi. At least, that's what the metadata seems to be telling me (via the Details tab of the Properties dialog in Windows), so I assume it's true...
I understand that the 240ppi that I am seeing in the .tif file metadata was specified in the Image Sizing section of the Export dialog, so that's not the issue.
I would prefer it if the .tif file has the exact same resolution (ppi) as the original .jpg, but I am unable to work out how to do it. It would be great if the resolution setting in the Export dialog was controlled by the Resize to Fit checkbox, like the other settings in the section, but it doesn't appear to be (it's enabled even if the Resize to Fit checkbox is unticked).
I then thought about using the Library Filters to filter by the Horizontal Resolution metadata, so that I could select all the photos with the same resolution and export just those with the Resolution setting in the Export dialog set to the right number, and then repeat that process for each different group of original photos with a different resolution. Unfortunately, I have not been able to work out how to filter by the horizontal resolution metadata field - it doesn't seem to be available in the dropdown list of fields shown when I click on the up-down arrow next to the "Date" or "Camera" (etc.) columns in the Library Filter pane.
Finally, here's my question (or three):
Is there a way to export .jpgs to .tif files while keeping the original resolution ?
Alternatively, is there a way to select groups of photos by their horizontal or vertical resolution (so just those photos could be exported in a group with the right resolution specified) ?
Or is there any other way to do what I want (convert jpg to tif with the same resolution and keeping all the metadata) ?
Thanks for reading all the way through to the end.
John.These are all currently JPEG files, but I want to keep TIFF files in the collection because my research has led me to the conclusion that TIFF is a better long-term archival format.
I'm not sure why you say this. In terms of long-term archival format, I think the two are equal, I am not aware of other reasons to do this, and thus in my opinion, the task of globally turning all your JPGs into TIFFs seems unnecessary. You don't gain anything by doing this. But you sure will spend a lot of time and take up a lot of disk space doing this.
I would prefer it if the .tif file has the exact same resolution (ppi) as the original .jpg, but I am unable to work out how to do it.
Again, I think you have embarked upon an unnecessary task. The ppi in the file is essentially meaningless. A photo that has (for example) 3000x2000 pixels saved at 240 ppi is the exact same photo as the same photo 3000x2000 saved at 180ppi, not a single pixel has changed. You are placing a meaning and importance to this ppi number that just doesn't exist.
To answer your questions at the bottom, I would advise you to not do the things you are talking about, it seems to me that you have greatly misunderstood things. -
Burn Full-sized JPEG's option missing in new installation
I have been using 2.5 on my old XP box and it has been fine. I have just built a new Windows 7 PC and installed LR2.5 64 bit and have noticed that on file > export with preset the option to Burn Full-sized JPEG's is missing! Not there at all. Any ideas?
Are the other two presets there? Perhaps deleting Prefs (assuming you brought it over from the old)- might do it.
How to locate Preferences files in LR -
Problem with existing script, can't get text of item
I'm taking an earlier script and condensing it so that it will only work from one SELECTED folder. I thought it would be simple but i seam to be running into a few issues
This is the error I get
Result:
error "Can’t get last text item of alias \"Images:2012-2013:WK21:Freedom:Freedom_WK21_PSD:\"." number -1728 from last text item of alias "Images:2012-2013:WK21:Freedom:Freedom_WK21_PSD:"
property type_list : {"8BPS"}
property extension_list : {"psd"}
script o
property theseNames : {}
end script
-- empty log file
do shell script "echo 'Files not processed in Photoshop :' > ~/Desktop/LogPhotoshopError.txt"
set noError to true
--at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
--use the result for the if file exists?
display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
set skipFiles to (button returned of the result) is "Skip (Faster)"
--Below is what I removed
--set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
--set tc to (count dtF)
--repeat with i from 1 to tc
-- set folderName to item i of dtF --<: is the folder name, no need to use text item delimiters -->":"
-- if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does --not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not
--start with "Sue" and folderName does not start with "Design" then
--Setup list of folders and process details of folders
tell application "Finder" to set folderName to (choose folder with prompt "Select Folder")
set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
set FolderEndName to last text item of folderName
set brandName to first text item of folderName
set my text item delimiters to "_PSD"
set weekNumber to first text item of FolderEndName
set my text item delimiters to oldTID
set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
--set up names to destination folders and create locally based on brand name and week number
set this_local_folder to "Images:2012-2013"
set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
set website_images to "DCKGEN:Website_Images:"
--set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
set this_ftp_folder to "Impulse:"
set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
--taking the folder identify which process it must follow. F R E E D O M W I T H P N G
if brandName is equal to "Freedom" then
try
tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
on error
set o's theseNames to {} -- no psd files or "8BPS"
end try
set numOfNames to (count o's theseNames)
repeat with j from 1 to numOfNames
set thefile to theFolder & ":" & (item j of o's theseNames)
-- F R E E D O M Folder Photoshop Process W I T H P N G
set thisName to (item j of o's theseNames)
tell application "Finder"
set t_ext to name extension of file thefile
if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
set b to exists file (localBrandFolder_PSD & thisName & ".psd")
end tell
if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
tell application "Adobe Photoshop CS5.1"
-- I remove the command activate, Photoshop stay in background
set ruler units of settings to pixel units
try
open (alias thefile) showing dialogs never
set origName to name of current document
set myOptions to {class:JPEG save options, quality:12}
set myPNGOptions to {class:PNG save options, interlaced:false}
set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
tell current document
--If the quick mask mode has been left on then delete the channel Quick Mask
if (quick mask mode) then delete channel ¬
"Quick Mask"
--If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
if (exists layer "Original Layer") then ¬
tell layer "Original Layer" to set name to "Original Image"
save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
(delete layer "Original Image") flatten
resize image resolution 300 resample method none
--sharpen image
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
--Prepare for Low RES by resetting image history
set current history state to history state 3
delete current layer
merge visible layers
resize image width 1020
resize image resolution 300 resample method none
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
--add save to lowResFolder with same options
save in (networkBrandFolder_Low_Res & name) as PNG with options myPNGOptions without copying
flatten
save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
set newFile to file path
set newFile2 to newFile as string -- for testing end of name
if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" or newFile2 ends with "_4.jpg" or newFile2 ends with "_5.jpg" or newFile2 ends with "_6.jpg" or newFile2 ends with "_7.jpg" or newFile2 ends with "_8.jpg" or newFile2 ends with "_9.jpg" or newFile2 ends with "_10.jpg" or newFile2 ends with "11.jpg" then -- exclude website_images
my duplicateFile(newFile, {ftpBrandFolder_Low_Res})
else
save in (website_images & name) as JPEG with options myOptions without copying
end if
close saving no
end tell
on error
set noError to false
my myLogs(thefile) -- write path to log file in Desktop
try
close saving no --if exists, close current document
end try
end try
end tell
end if
end repeat
--End F R E E D O M W I T H P N G
end if
if not noError then do shell script "/usr/bin/open ~/Desktop/LogPhotoshopError.txt'"
on myLogs(t)
try
do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
end try
end myLogs
on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
tell application "Finder" to repeat with folderPath in foldersPath
with timeout of 200 seconds -- adjust it, error if the copy is longer that 200 seconds
duplicate tFile to folder folderPath with replacing
end timeout
end repeat
end duplicateFile
on getFolderPath(tName, folderPath)
tell application "Finder" to tell folder folderPath
if not (exists folder tName) then
return (make new folder at it with properties {name:tName}) as string
else
return (folder tName) as string
end if
end tell
end getFolderPath
tell application "Finder"
open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
end tellI'm getting close or at least I hope this is how it looks now, but appears not pick up the files in the folder?
The result
exists folder "Freedom_WK20_HR" of folder "impulse:Week20:Freedom:"
get folder "Freedom_WK20_HR" of folder "impulse:Week20:Freedom:"
get name of every file of alias (alias "Images:2012-2013:WK20:Freedom:Freedom_WK20_PSD:") whose {"8BPS"} contains file type or {"psd"} contains name extension
open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
end tell
--------------------MAIN SCRIPT BELOW__------------------
property type_list : {"8BPS"}
property extension_list : {"psd"}
script o
property theseNames : {}
end script
-- empty log file
do shell script "echo 'Files not processed in Photoshop :' > ~/Desktop/LogPhotoshopError.txt"
set noError to true
--at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
--use the result for the if file exists?
display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
set skipFiles to (button returned of the result) is "Skip (Faster)"
--Setup list of folders and process details of folders
tell application "Finder"
set theFolder to (choose folder with prompt "Select Folder")
set folderName to name of theFolder
set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
set FolderEndName to last text item of folderName
set brandName to first text item of folderName
set my text item delimiters to "_PSD"
set weekNumber to first text item of FolderEndName
set my text item delimiters to oldTID
--set up names to destination folders and create locally based on brand name and week number
set this_local_folder to "Images:2012-2013"
set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
set website_images to "DCKGEN:Website_Images:"
--set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
set this_ftp_folder to "Impulse:"
set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
--taking the folder identify which process it must follow.
if brandName is equal to "BHS" then
try
tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
on error
set o's theseNames to {} -- no psd files or "8BPS"
end try
set numOfNames to (count o's theseNames)
repeat with j from 1 to numOfNames
set thefile to theFolder & ":" & (item j of o's theseNames)
-- B H S Folder Photoshop Process
set thisName to (item j of o's theseNames)
tell application "Finder"
set t_ext to name extension of file thefile
if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
set b to exists file (localBrandFolder_PSD & thisName & ".psd")
end tell
if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
tell application "Adobe Photoshop CS5.1"
-- I remove the command activate, Photoshop stay in background
set ruler units of settings to pixel units
try
open (alias thefile) showing dialogs never
set origName to name of current document
set myOptions to {class:JPEG save options, quality:12}
set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
tell current document
--If the quick mask mode has been left on then delete the channel Quick Mask
if (quick mask mode) then delete channel ¬
"Quick Mask"
--If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
if (exists layer "Original Layer") then ¬
tell layer "Original Layer" to set name to "Original Image"
save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
(delete layer "Original Image") flatten
resize image resolution 300 resample method none
--sharpen image
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
--Prepare for Low RES by resetting image history
set current history state to history state 3
flatten
resize image width 1348
resize image resolution 300 resample method none
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
--add save to lowResFolder with same options
save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
set newFile to file path
set newFile2 to newFile as string -- for testing end of name
if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" or newFile2 ends with "_4.jpg" or newFile2 ends with "_5.jpg" or newFile2 ends with "_6.jpg" or newFile2 ends with "_7.jpg" or newFile2 ends with "_8.jpg" or newFile2 ends with "_9.jpg" or newFile2 ends with "_10.jpg" or newFile2 ends with "11.jpg" then -- exclude website_images
my duplicateFile(newFile, {ftpBrandFolder_Low_Res})
else
my duplicateFile(newFile, {ftpBrandFolder_Low_Res, website_images})
end if
close saving no
end tell
on error
set noError to false
my myLogs(thefile) -- write path to log file in Desktop
try
close saving no --if exists, close current document
end try
end try
end tell
end if
end repeat
--End BHS
--taking the folder identify which process it must follow. B U R T O N
else if brandName is equal to "Burton" then
try
tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
on error
set o's theseNames to {} -- no psd files or "8BPS"
end try
set numOfNames to (count o's theseNames)
repeat with j from 1 to numOfNames
set thefile to theFolder & ":" & (item j of o's theseNames)
-- B U R T O N Folder Photoshop Process
set thisName to (item j of o's theseNames)
tell application "Finder"
set t_ext to name extension of file thefile
if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
set b to exists file (localBrandFolder_PSD & thisName & ".psd")
end tell
if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
tell application "Adobe Photoshop CS5.1"
-- I remove the command activate, Photoshop stay in background
set ruler units of settings to pixel units
try
open (alias thefile) showing dialogs never
set origName to name of current document
set myOptions to {class:JPEG save options, quality:12}
set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
tell current document
--If the quick mask mode has been left on then delete the channel Quick Mask
if (quick mask mode) then delete channel ¬
"Quick Mask"
--If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
if (exists layer "Original Layer") then ¬
tell layer "Original Layer" to set name to "Original Image"
save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
(delete layer "Original Image") flatten
resize image resolution 300 resample method none
--sharpen image
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
--Prepare for Low RES by resetting image history
set current history state to history state 3
flatten
resize image width 1020
resize image resolution 300 resample method none
filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
--add save to lowResFolder with same options
save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
set newFile to file path
set newFile2 to newFile as string -- for testing end of name
if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" or newFile2 ends with "_4.jpg" or newFile2 ends with "_5.jpg" or newFile2 ends with "_6.jpg" or newFile2 ends with "_7.jpg" or newFile2 ends with "_8.jpg" or newFile2 ends with "_9.jpg" or newFile2 ends with "_10.jpg" or newFile2 ends with "11.jpg" then -- exclude website_images
my duplicateFile(newFile, {ftpBrandFolder_Low_Res})
else
my duplicateFile(newFile, {ftpBrandFolder_Low_Res, website_images})
end if
close saving no
end tell
on error
set noError to -
How to set "embed icc Profile" option to export document as JPEG
Hi All,
While exporting the document as jpeg, through File->Export, there is an option "Embed ICC Profile" as figure shows.
How to set it if I am exporting the document through my program in which I rasterize the document and used
the sAIImage->AsJPEG(raster, jpegDataFilter, params);
I didn't find any option in AIRasterizeSettings or AIImageOptJPEGParams to set this flag.
plz anyone suggest me how to do so.
Thanks,
Rud.thanks for you through out help.
I use the folowing code which executing properly,but there is no effect on JPEG whether the value of jpegparam.s.jpeg.embedICCProfile is 0 or 1.
/////Start
ASOptimizationSettings jpegparam;
jpegparam.fileFormat = asffJPEG;
jpegparam.s.jpeg.embedICCProfile = isICCProfileEmbeded;
ASInt32 optID;
optID = sAIOptSet->GetUniqueOptimizationSettingsID();
error = sAIOptSet->SetOptimizationSettings(optID, &jpegparam); // after executing this line error = 0
/////End
I guess it would work when we export document as jpeg through AIActionManagerSuite
not with rasterizing the layer's art and then exporting them as JPEG using AsJPEG().
thanks -
When I print a document with Arabic script in In Design the characters appear in an inverted form, in the opposite direction, while the printer doesn't do this with other software such as Word
(The small field at the top of questions is to type just a title; the large field is to type your full question in, along with anything else that may help us help you.)
When you say "print", do you mean the text is correct in your InDesign file? If you export the document to a PDF, is it still correct? Final test: if you print the PDF to your printer (making sure you use the same driver and setting), is it wrong? Then it's your printer driver, trying to be smart when it should not. Locate a Settings dialog where you can switch off options such as this one. Were I a betting person, I'd tell you to look for something called "Auto-correct mirrored documents". -
How to export 2 different report with a link at the same time
Hi,
Do anybody know how to export 2 different report with a link at the same time. I currently create a report which link to another report. But when I want to export the 1st report I also want the 2nd report also be exported.
Thank you very much.
Best Rgds,
SL VoonExport all the three components individually.
It will generate 3 script files. Now run them from SQL>
null
Maybe you are looking for
-
-1303 error when syncing with Itunes
Hi, I am getting an -1303 unknown error whenever I try to sync my ipod mini with my PC with ITunes software. Sometimes it updates everything and then crashes or it doesn't update and just crashes.
-
PP CS5 Capture problems..
I recently got my new Macbook and Adobe Production premium hoping to finally edit some of the work that was waiting for this gear but have run into a little problem that scares me a bit. Equipment list: Sony PD170 (SD Mini DV Tape) 13.3'' Macbook Pro
-
Problem run emca -config dbcontrol db -repos create
when tried to run emca -config dbcontrol db -repos create i choose oracle database SID: ORCL but when i write DBSNMP user pass: it shows me Invalid password. When i have tried to login in sqlplus with the same user: DBSNMP and my password it login me
-
There is no Adobe Premiere Pro in Creative Cloud... How could I try it? Is there anybody out there... [Please choose a short description for the thread title and only post the actual issue in the main body.] Message was edited by: Jim Simon
-
Kodak Zi8 doesn't connect to iPad2 camera connection kit
Hi, i have a Kodak Zi8 video camera and want to copy my movies to a iPad2 using the camera connection kit using buildin USB Kable of the Zi8. Unfortunately the iPad shows a messagebox "Dieses Zubehör benötigt zu viel Strom" (accessory need to much cu