Definition of DPI when you save in JPEG format

Hello

Periodically convert us batches of Adobe Illustrator files in JPEG format in various sizes and resolutions, after making a few adjustments for them.

Our old process for this cause change the image from Illustrator, saving a new file HAVE, then using ImageMagick with a variety of options to control the output.

Since then, we have converted most of this option to use a JSX JavaScript program to perform the conversion in Illustrator, using the SDK exportFile method.  This works for most and is much faster than before.

The thing we've done with ImageMagick we can not quite figure out how to do from Illustrator is set the DPI of the JPEG image.  Here's what we do in ImageMagick:

converted - density $infile 400-resample resize 300-2500 x 2500 - space color RGB $outfile

The options are fairly self-explanatory, but there are many more details in the ImageMagick command line reference.

Tips on how to do the same since the SDK of the Illustrator?

Thank you!

-Scott.

Documentation of Illustrator for Java Script contains the answer that is available from:

http://www.Adobe.com/devnet/Illustrator/scripting/

HorizontalScale and verticalScale properties determine the resolution. 100 by default would make the artboard at 72 DPI (default), 200 would make at 144 DPI.

The example below would export to a 144 DPI JPEG. The example is taken from the Java Scripting guide, and I just changed the horizontalScale and verticalScale properties (appearing on the previous page).

Export current document to dest in JPEG format with specified
options, dest contains the full path, including the file name
function exportFileToJPEG (dest) {}
If (app.documents.length > 0) {}
var exportOptions = new ExportOptionsJPEG();
var type = ExportType.JPEG;
fileSpec var = new File (dest);

exportOptions.horizontalScale = 200;

exportOptions.verticalScale = 200;
exportOptions.antiAliasing = false;
exportOptions.qualitySetting = 70;
app.activeDocument.exportFile (fileSpec, exportOptions type);
}
}

Note that Aaron is correct, it is actually off-topic for the SDK and on the subject in the forum script.

Tags: Illustrator

Similar Questions

  • Photoshop CC is Desaturate photos when you save in jpeg format

    Hello

    I have a small problem here with photoshop CC, it has only begun to have occurred recently.

    I work with Raw files, using the camera raw on photoshop sick CC filter. Edit the file and it will come out as I want in photoshop. If I save it as a .psd file no problem, photography

    retains its color. However, if I save it in jpeg format, the colors of the photos become desaturated.

    as far as I can see its a problem with saving the file, such as the photo seems fine in photoshop when your finished collage, but when you save and reopen, the colors were reversed just a little.

    The only solution I found to this day because it is to complete the photo in camera raw, let it reopen in PS, copy the entire photo (select all, ctrl + C), start a new spreadsheet (think that's what they say, no upward with my PS jargon, basically to press ctrl + n) and

    Set the color depth of 16 bit (its default 8 bits). This will also change the Adobe RGB color profile to "working RBG: sRGB" for the new worksheet. When I paste my picture in there (ctrl + v) and save the file as a jpeg, it

    keep the color as he went out the raw from the camera filter.

    How can I fix it so I cannot use the workaround every time?

    I got a quick shot through the settings/preferences, but did not spot something that I'm not sure what I'm looking for.

    any thoughts?

    I would point out that it worked very well for me until the end of last week, I changed a few settings, but I have no idea what.

    Mick9129 wrote:

    a problem with saving the file, such as the photo seems fine in photoshop when your finished collage, but when you save and reopen, the colors were reversed just a little

    To conclude, the desaturation has nothing to do with it.

    It happens because your jpeg is saved in Adobe RGB or ProPhoto RGB. Photoshop that will display correctly, but you look at the jpeg format in another application that has no color management and does not include these profiles.

    Always open as ACR sRGB, or convert it to sRGB in Photoshop, if the file should be displayed in applications that are not managing colors (which is most of them).

  • Options format when you save a jpeg file

    What is the difference between ' basic', 'Basic optimized' and 'Progressive' and what is best for each option?

    Hi jpiaget,

    Basic Standard is used when you want to than your JPG to be recognizable to most web browsers. It is basic and, well... standard! He made few changes in your image. Support all web browsers.

    Baseline optimized optimises the quality of the colors in the image and produces a slightly smaller file size (2 to 8% - a little more compression, or slightly faster loading). All modern web browsers are supported,

    * Standard and optimized to produce good quality images, so it's really just a matter of choice. "Baseline (optimized)" could reduce the size of the file slightly (2% or more) and might be inconsistent with viewers using the old technology. ". "Optimized'could produce better colors, but that might not be imperceptible.'" Progressive. "

    Progressive departure creates an image that appears gradually as downloaded.means is that the image is rendered as (like old used televisions) scan lines so that a browser will quickly show image quality reduced by half the scan lines, while it resolves the entire image.

    Verdict optimized base is the best choice among the three.

    You can see this Overview of the picture Formats and when to use Each One

    Don't forget that the JPG is a method "lossy" compression of image files - it throws image data before compression, so set your 'Quality' option to 'extended '. It is the key for image quality setting.

    Otherwise, you should look for other Formats like Png

    Hope that helps

    ~ Assani

  • When you save the file GIF grace to save for Web how can I save the original?

    Hello.

    When you save the file GIF grace to save for Web how can I save the original?

    I need the original and not optimized.  Help, please

    ilyag58620179 wrote:

    But I need to GiF animation file

    And by definition, a GIF image is optimized! A GIF is not the same size of the PSD file, and you are mistaken in thinking that you want it to be. If you are trying to achieve the slightest loss of quality, regardless of the size of the file, then you need to adjust your settings to save for Web.

  • I use the helper downloader (ver. 2.2) when you save a video of WWII, during the reading period, I get some equidistant points from the screen and Flash

    I use the helper downloader (ver. 2.2)
    When you save a video of WWII on my Windows 7 Desktop, during the period of the video, I get points at equal distance between the screen and flashing arrow as well. What is the problem with my download?

    [email protected]

    Which may be caused by a problem with the codec that is used by this video and who is not taken care of correctly.

    You can open this video in another video player to see if it works there?

    What kind of video is it?

  • When you save the labels, they save as bmp files

    When I try to save the groups tags that I am, they want to put in the form of bmp files. I just started having this problem Sunday morning March 6. When you save them before they were very good. I have never changed a setting or anything like that, so I don't know what the problem is. But it seems that I have to run a disk clean every time I save one in order for the next to be saved with the file extension, what it is, such as PNG or GIF. I hope you can help me with this situation. Very frustrating. I have Windows XP.

    Shivers58)

    Hello

    I suggest you to set the file on the file type associations and check if the problem persists. Click on the link below.

    How to change or choose the program that starts when you double-click a file in Windows XP

    http://support.Microsoft.com/kb/307859

    I suggest give us the steps to recreate the issue on our systems so that we can have a better understanding of the issue.

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • I get an error code 0 x 80070017 data error cyclic redundancy when you save.

    Original title: Trouble when backup Vista basic

    During the backup, I get this message... Verification of data error: 0 x 80070017 cyclic redunancy. The backup fails. Any advice? Thank you...

    Hi Arctical,

    ·         When you save the backup?

    ·         Has it worked fine previously?

    This error occurs if the hard disk has errors on this subject.

    I suggest that you run a check disk on drive c and then try the backup.

    You can help solve some computer problems and improve the performance of your computer by making sure that your hard disk has no errors.

    a. open the computer by clicking the Start button, click computer.

    b. click the hard disk you want to check, and then click Properties.

    c. click on the Tools tab and then, under error-checking, click check now. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    To automatically repair problems with files and folders that detects the scanning, select automatically fix file system errors. Otherwise, the disk check will simply report a problem, but not to fix them.

    To perform a full disk check, select search and attempt to recover bad sectors. This scan is trying to find and repair physical errors on the hard drive itself, and it may take much longer to complete.

    To check for errors file and the physical errors, select both automatically fix file system errors and Scan for and attempt recovery of bad sectors.

    d. click Start.

    Depending on the size of your hard disk, this may take several minutes. For best results, do not use your computer for any other tasks while it checks errors.

    Check your hard drive for errors

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-your-hard-disk-for-errors

     

    Back up and restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

     

    Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    I hope this helps!

  • error code 0 x 80070017 data error cyclic redundancy when you save

    I get error code 0 x 80070017 data error cyclic redundancy when you save. Publication solutions (error checking - automatically fix files) have not worked. Help!

    Hello

    1. When you save the backup?

    2A it worked fine earlier?

    This error occurs if the hard disk has errors on this subject.

    I suggest that you run a check disk on drive c and then try the backup.

    You can help solve some computer problems and improve the performance of your computer by making sure that your hard disk has no errors.

    a. open the computer by clicking the Start button, click computer.

    b. click the hard disk you want to check, and then click Properties.

    c. click on the Tools tab and then, under error-checking, click check now. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    To automatically repair problems with files and folders that detects the scanning, select automatically fix file system errors. Otherwise, the disk check will simply report a problem, but not to fix them.

    To perform a full disk check, select search and attempt to recover bad sectors. This scan is trying to find and repair physical errors on the hard drive itself, and it may take much longer to complete.

    To check for errors file and the physical errors, select both automatically fix file system errors and Scan for and attempt recovery of bad sectors.

    d. click Start.

    Depending on the size of your hard disk, this may take several minutes. For best results, do not use your computer for any other tasks while it checks errors.


    Check your hard drive for errors

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-your-hard-disk-for-errors


    Back up and restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions


    Important:
    when running chkdsk on the drive hard if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data may be lost.

  • When you save the files, it also gives the ability to save to Invu.

    Original title: modifying the file save options

    I use Invu to watch the old images.  I no longer use it for the new scans.  When you save the files, it gives me the option to save in the normal file type such as Word, Excel etc.  It also gives the ability to save to Invu.  How can I get rid of this option without uninstalling Invu?

    Hi EmRaggy,

    It is not possible. When you set the file, it will display all related programs to open the files installed on the computer.

  • BlackBerry signing key IO exception when you save the new key to the file

    I have blackberry signing key IO exception when you save the new key file when trying to get my keys. I read the other post - I do not use Windows Vista and JDE component package is installed on my machine. What now?

    It was a windows 7 resolved permission problem

  • Implementation for the Apps Error signature: "ioexception when you save the new key pair".

    I'm following the instructions of setting up registration your apps: https://developer.blackberry.com/html5/documentation/signing_setup_smartphone_apps_1920010_11.html.

    After typing the password and move the mouse around, I get a message, "ioexception when you save the new key pair". BB forums say that the problem is that my JDE is not installed, but it is. I'm also not using windows 7. Does anyone know how to fix this?

    As for all my messages, within the hour to ask, I always find the solution.

    http://ekkescorner.wordpress.com/blog-series/blackberrydev/secure-development-of-blackberry-applicat....

    However, it is normal that the instructions on the page webworks lack incredibly. I went with anger poster yesterday on the development of how awful all for blackberry is, and how absurd it is that there is no phone tech support. I decided yesterday against him because I felt bad for RIM as they seem to get into financial trouble. I've been on the fence about BB, and I tried to tell my friends that the newest smartphone looks like it could be promising. While it is true, I have not developed for BB 10 again, if it's developers resources also lack 7 are, I have no doubt that soon she will fail and I will give is more no support.

  • File type by default when you save a scanned document.

    Currently when I scan in the documents to be saved in synergy (programme of work) I have to manually change the type of file to PDF format.  Is there a way to default showing all files when you save a scanned document?

    That would be a question of support of synergy. Or through their documentation.

  • How to avoid make records duplicate when you save a series?

    How to avoid make records duplicate when you save a series?

    When you schedule a recording for a TV series, Media Center automatically records episodes based on the options you set here.

    1. click the Start button, click all programsand then click Windows Media Center.

    2. on the Media Center start screen, navigate to tasks, click settings, click TV, click recorderand then click default record.

    3 scroll to the series as the default record section.

    4. do one of the following:

    ·         Under Show type, click the plus sign (+) or minus (-) button to record only new episodes, reruns or direct episodes.

    ·         Under channels, click the plus (+) or minus (-) record button present in this series on any channel, or on a specific channel.

    ·         According airtime, click the plus sign (+) or minus (-) button record shows in this series at any time, or only at a specific time.

    ·         Under the keep up to, choose how many records in this series to keep before older episodes are automatically deleted.

    5. click on Save.

  • Color labels Mac (Yosemite) folder deleted when you save an Illustrator CC 2014 file. What is happening with this?

    I just got my new operational computer.

    Mac Pro - Yosemite 10.10.3

    Illustrator CC 2014_18.1.1

    This seems a bit odd.

    I created a file Illustrator CC.

    I wrote then that file with a color. (Mac > file > Tag)

    When I recorded this Illustrator file, the color tag is removed.

    What is happening with this?

    I never had this problem in the past with previous Illustrator and other Mac OS versions.

    I tested other applications.

    This ONLY happens when you save files Illustrator CC 2014.

    Please notify.

    Thank you in advance.

    Kathryn

    Post it here:

    https://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform

  • Crashes when you save the eps file

    Don't know how to solve this problem. Saw the comments on changing the time zone, but I can't seem to find where to change this setting (within AI? or are they referring to my computer settings?) Have also tried to install the new Adobe CC 2014, but even that one goes down. Also, I rebooted the computer, but it's always the same problem.

    Thanks for any help.

    Try to "Place" instead of "Import".psd files  When you place the images, you have the possibility to link the files and then again when you save as > EPS.  You have probably inadvertently incorporated the .psd files.  The right method of importing image files using the file > place command.

Maybe you are looking for

  • e-mail program takes all the mail out to 'off line '.

    I own a MacBook Pro.  I've updated to Capt. 10.11.5.  The e-mail program takes all the mail out to 'off line '.  Is no more, I can send emails.  What should I do? < re-titled by host >

  • My games download why? game store is what I use

    When I try to down load my games, that they will not. I downloaded many games before.it don't download it keeps running.

  • Slow display on Satellite A30-404

    Lately I noticed how, even in color (16 bit) mode, this laptop has a super slow response. For example look at tiny flash animations, they stutter like you wouldn't believe. Even compared to my old desktop PC, it's slow. It was faster, as far as I rec

  • How can I find my "network security key?

    Hello world... I am a netbook which is preloaded with windows 7 starter. My PC is 64-bit windows vista ultimate. I have an ADSL router that is connected to the computer with a network cable (yellow) - internet works fine. I'm trying to connect my net

  • Requires the management software for Windows 7

    I have a WRT610N router.  Its been a lot of work.  A few months ago my hard drive failed and so I've lost the ability to run the Linksys software that runs as a service under Windows.  However, I really got to use it for the last few months. But now