As  increase DPI, image size is also  increase in photoshop scripting ?

as  increase DPI, image size is also  increase in photoshop scripting can please tell me what  will the reason for that?

Hi JJMACK,
                  I am using adobe  Flex with  Photoshop scripting . I am sending  Flex file  with parameter to generate .psd.Right now i am able to generate 72 DPI with proper image size while  I am generating  .psd with  250 DPI with Improper Size.
E.g
This is my  flex parameters
MgrPSAction.instance.FinishLayoutToPhotoshop(curFl , savedType ,TemplateConstant.TM_LEFT,getPSDImageName(objItem,TemplateConstant.TM_LEFT_RIGHT), objItem.LayoutTMLWidth,objItem.LayoutTMLHeight ,pageDPI,returnPhotoshopHandler,
true,setWidth , setHeight,formatQty); ----- Page DPI - > like 72 or 250 paasing  from here.
below is Scirpt ot resize
function openFileAndResize(xp,yp,wi,hi,imagepath)
var fileRef = new File(imagepath);
var curRefDoc = app.open(fileRef);
var curw = curRefDoc.width;
var curh = curRefDoc.height;
var resW;
var resH;
var scw = imgObj.wi/curw;
var sch = imgObj.hi/curh;
var scale ;
if(scw > sch)
scale = scw;
else
scale = sch;
resW = curw * scale;
resH = curh * scale;
if(imgObj.isAdjustImage == "true")
resW = resW * parseFloat (imgObj.scaleOrg);
resH = resH * parseFloat (imgObj.scaleOrg);
// Resize Image=======================================================
var idImgS = charIDToTypeID( "ImgS" );
var desc226 = new ActionDescriptor();
var idWdth = charIDToTypeID( "Wdth" );
var idPxl = charIDToTypeID( "#Pxl" );
desc226.putUnitDouble( idWdth, idPxl, resW);
var idHght = charIDToTypeID( "Hght" );
var idPxl = charIDToTypeID( "#Pxl" );
desc226.putUnitDouble( idHght, idPxl, resH );
var idIntr = charIDToTypeID( "Intr" );
var idIntp = charIDToTypeID( "Intp" );
var idBcbc = charIDToTypeID( "Bcbc" );
desc226.putEnumerated( idIntr, idIntp, idBcbc );
executeAction( idImgS, desc226, DialogModes.NO );
// Select Image=======================================================
var idsetd = charIDToTypeID( "setd" );
var desc263 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref138 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idfsel = charIDToTypeID( "fsel" );
ref138.putProperty( idChnl, idfsel );
desc263.putReference( idnull, ref138 );
var idT = charIDToTypeID( "T " );
var idOrdn = charIDToTypeID( "Ordn" );
var idAl = charIDToTypeID( "Al " );
desc263.putEnumerated( idT, idOrdn, idAl );
executeAction( idsetd, desc263, DialogModes.NO );
//Copy Image=======================================================
var idcopy = charIDToTypeID( "copy" );
executeAction( idcopy, undefined, DialogModes.NO );
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
//Create Temp Layer for image adjustment =======================================================
//createApplication(wi,hi,dpi,"imagelayerdoc");
createApplication(wi,hi,dpi,layerAppName);
//var curDoc = getCurDoc('imagelayerdoc');
//get Active Temp Layer for image adjustment =======================================================
var curDoc = getCurDoc(layerAppName);
app.activeDocument = curDoc;
// Past Copy image in Temp Layer for image adjustment =======================================================
var idpast = charIDToTypeID( "past" );
var desc250 = new ActionDescriptor();
var idAntA = charIDToTypeID( "AntA" );
var idAnnt = charIDToTypeID( "Annt" );
var idAnno = charIDToTypeID( "Anno" );
desc250.putEnumerated( idAntA, idAnnt, idAnno );
executeAction( idpast, desc250, DialogModes.NO );
// HERE YOU NEED TO SET XY POSTION OF IMAGE
positionLayer(app.activeDocument.activeLayer,imgObj.moveX,imgObj.moveY);
cropImage();
Please reply if have answer...
Thanks

Similar Messages

  • DPI / Image size

    Dear All
    I am big Aperture user, but a bit of a technical novice I'm afraid - at least when it comes to DPI....
    I take RAWs on my 5d Mk 2. Image files are procesed in Aperture / Photoshop. I then export JPEGS for distribution (Apple TV, prints for friends and family, burning to DVD etc)
    I export full size JPEGS (image sizes can be about 25meg).
    My question is....what DPI should I have Aperture set on to ensure top quality prints? I normally print 9 x 6, but would want the ability to increase sizes as required.
    Is there a relationship / optimum setting between DPI and image size? Should I alter this if the JPEG is for different uses (priniting, burning to DVD etc).
    Many thanks for any help
    Paul

    Paul,
    Photos from your camera and in Aperture have a dimension in pixels -- your camera can produce image files of 5,616 x 3,744 pixels. It is only when setting a resolution that ppi (pixels per inch) comes into play -- the total number of pixels is independent of that resolution. Printers reference quality as dpi, and this does not directly reference any ppi, but of course the ppi may limit what dpi the printer can actually apply. When printing from Aperture the pixels (if cropped, those remaining) will all be used and the ppi will automatically be adjusted to fit the paper size you are intending to use. If you are printing from Aperture, there is no reason to convert to a JPEG to use for that purpose.
    If you do convert and export a JPEG, then if at original size, the full pixel dimension of the image will be maintained, and if later printing in Photoshop, say, then it will adjust to fit the paper. A JPEG to use with a DVD slideshow will have to be changed to use the pixel dimension that fits the media, but some software will do that behind the scenes, if exporting from Aperture solely for that purpose you might want to customize that to fit within something like 720 x 720, 1024 x 1024, 640 x 640, etc. When this takes place the total pixels are resampled, and the image is rescaled to be represented by fewer pixels. Aperture does seem to use PPI and DPI interchangeably, btw, but see:
    http://www.tildefrugal.net/photo/dpi.php
    and
    http://en.wikipedia.org/wiki/Pixel_density
    Ernie
    Message was edited by: Ernie Stamper

  • How can I use the custom new image size presets also when I resize an image

    Hi there,
    I have created some new image presets at various sizes, and I have saved these presets.
    They appear when I create a new image.
    How can I get these preset sizes to also appear when I re-size an image ?
    The presets for new images seems to be stored in a different way to the re-size image presets, as the re-size image presets are empty.
    Many thanks
    Mark
    Photoshop CS6

    Here is what I tried to do, I used a AutoBthreshold2 and I didn't set a value to it. The image is attached below and the template. Thank you.
    Here is the error.
    Attachments:
    pattern.vi ‏51 KB
    template.jpg ‏1 KB
    bb.jpg ‏350 KB

  • Incorrect image size and low quality file (Photoshop CC trial ver. on Macbook Pro Retina)

    At first, I set 500x500 size
    but in workplace, it show smaller than 500x500 (maybe 250x250?)
    I check on "image > image size" it still show me 500x500 pixels
    Save for web
    After that, i got a 500x500 file but It resize from smaller to 500x500 , so... i got a low quality file.
    what's wrong?
    (sorry for bad english skill but i really want your help)
    Ps. it also incorrect when i set resolution as 300dpi

    Pixel is not a measurement unit of length per se.
    If a screen has more pixels per unit of length an image (when displayed as one image pixel per one screen pixel) would appear smaller than on a screen with lower resolution.
    To make sure could you please post an image that is 500px x 500px (according to Image > Image Size) but seems to be too small to you?

  • Image Size when bringing pix into Photoshop from a Camera

    I'm using Photoshop CS2 on XP Media Center Edition. I cannot, for the life of me, find out how set the default dpi of images being brought into Photoshop.
    At the moment I'm using an Action but that's pretty time intensive when I have to bring in more than a few photos. Sometimes I have 2 or 3 hundred to do.
    Can anyone help me?
    Thanks in advance for any assistance you can give me.
    JJ

    Images are made of pixels. ppi has nothing to do with the characteristics of an image file. The ppi is only a suggested setting if placed in the metadata of an image file. You can print your image at any size you want regardless of the ppi embedded in the file. Some printers will assume you want to use the embedded ppi setting but again this can be overridden.
    So, Printed images have ppi. (image files do not, until they are printed)
    So ask yourself, why are you trying to set the default ppi (you say dpi) of the image files? What are you going to use this metadata information for. Normally I just ignore this ppi metadata since it really does not mean anything, other than possibly the physical size you meant to print your image, but again it can be overridden at the time of printing.

  • Open Image Size 50% instead of 33% Photoshop CS2

    When I open images in Photoshop CS2 they open at 33%. As I have a 19" screen and edit 100's of images a day I would like to change the "default" to open the images at 50% instead. Occasionally they open at 50% automatically but I don't know what I've done to make it happen. Can anyone help?

    Ok, this is what you need to do.
    1. Create a new action and when you are recording that action go to the
    flyout menu for the actions palette and choose insert menu item. Then go to
    the view menu and choose actual pixels. Stop recording. Basically you just
    created an action that zooms your image to 100%.
    2. Go to the file menu and choose Scripts and then Scripts Event Manager.
    Choose the option to have the action start when you open a document, then
    choose your action set and then the action you just made to zoom the
    document to 100%, click on the add button.
    Now anytime you load a new document it will zoom to 100%.
    Robert

  • Recommended image size and dimensions for images displayed on iPad retina?

    What are the recommended dpi image size and dimensions for images designed in DPS app as displayed on an iPad retina?

    Take a look at the following link:
    http://blogs.adobe.com/indesigndocs/2012/03/guidelines-for-creating-folios-for-ipad-3.html

  • Image size jumps from 10.3mp to 58.9mp?

    I shoot DNG in camera at 10.3mp. When opened in CC and I go to image size it is suddenly 58.9mp but only 11.9in by 9.6in in size.  Why?  I am looking to get a 16x20 print out of it with oul loss of image quality.

    Depends on what figures you are using.  Some doc sizes include ram resources needed to handle the image, but have nothing to do with image size.
    Also, depends on layers, history states, etc.

  • Reducing image size loses sharpness

    BEFORE YOU LEAVE WITHOUT READING THIS WHOLE THING, YOU MAY BE ABLE TO HELP BY ANSWERING ONE SIMPLE QUESTION:
    I have a background that has 8.5" x 11" external dimensions.  In the project bin, I'm also showing a layer (with transparent edges) that I've resized to 1" x 1.5".  When I double-click the background to put it on the screen, and then drag the layer  onto the screen, why doesn't it look like a small picture on top of a big one?  Instead, it's huge, and I have to drag it down to size with the move tool!
    ===========================================================================
    And now, the entire story:
    Running PSE9 under Mac OS X 10.6.8 Snow Leopard.
    My project is a montage of stamp-sized images on a letter-size background, as in the attached -- commemorating the woman in the centerpiece.  I've stumbled though this kind of effort before with great success.  This time the small photos are coming out blurry, and it's because this time I've done one thing differently.
    In prior efforts, I recall somehow reducing the outside dimensions of an open file to about 2" x 3" before editing and finally adding it as a layer to the big background (using Move Tool to size it to fit), although during editing I was working with a reasonably-sized image and not a stamp (probably using command +).  The images in the final version were all sharp.   On this effort, however, my aging brain did not help me remember how to do it the same way, and I ended up working with the original photo, and then when I added it as a layer, I reduced it using the move tool -- very clumsy in view of the fact that the edited layer's image seemed to be larger than the canvas I was building, and the final images were blurry.
    I started reading Help on the subject of resizing, but that was way too much information for me to absorb before the end of the new year, and I'd like to finish the work in the next few days. (The attached photo IS the current project, and I whipped it out in a day, albeit blurry.)   I'd appreciate it if someone could give me a brute-force step-by-step to do it the way I've done it successfully before.

    The answer to your first question and the big one are very closely related. When you combine images, the resolution of the bottom (background) layer determines the resolution of the entire image. This means that if you have a low-res background (say, 72 ppi) and then you bring in high-res images (say, 300 ppi) the added content will be huge in comparison to the size of the overall image. When you scale it with the move tool you aren't doing yourself any favors if you make large changes that way.
    The best way to approach this is to make sure that all your images are at about the same resolution before you start (image>resize>image size). Also, make sure your background is not at a low resolution or the end result will print badly no matter how much time you spend combining things.

  • "Could not complete the image size command because the file name was not valid"

    Hello,
    Some one please help me,when i try to resize psd file its showing this message ...whats the issue ???
    "Could not complete the image size command because the file name was not valid"
    Thanks !

    Can you change other images via Image > Image Size?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by pressing command-alt-shift/ctrl-alt-shift while starting Photoshop until the appropriate dialog appears after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences you’ve changed, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)

  • How to increase image size by file size?A

    I'm submitting photos to a stock site that requires a file size of 50 MB per image.
    Is there a way to increase file size to match exactly 50 MB? What I've been doing is trying to guess the size of the image in pixels until it reaches 50 MB but that's not as intuitive.
    Also, what's the best way to increase the image size without too much degradation?
    Thanks!

    Thanks for the answer.. what's the best way to increase the file size while preserving image quality? Should I just do it in one go or increase it multiple times until I reach 50 MB?
    I also noticed that although it said 50 MB in the image size window, once the file was saved and I looked up its info. it was slightly larger.. ?

  • How to increase image size, OJ6000n

    I have to print from a PDF and would like to increase the size of the image to make it easier to read. Is there a way?

    Thanks for the answer.. what's the best way to increase the file size while preserving image quality? Should I just do it in one go or increase it multiple times until I reach 50 MB?
    I also noticed that although it said 50 MB in the image size window, once the file was saved and I looked up its info. it was slightly larger.. ?

  • Increasing Image Size

    Hi, as an Aperture newbie I am looking for a way to resize images in Aperture. Ie, the equivalent to Photoshop CS2's 'Image>Image Size', which allows me to, for example, just increase the pixels per inch of an image. For example I have been doing this to some old 72 pixels per inch photos I have been using for an iPhoto photobook (before I got Aperture) as the lower resolution version was causing the photobook to have an exclamation mark over the image (warning - too low size / resolution)
    Sorry if this seems a bit garbled, but I do not know the correct terminology, all I do know is that if I increase the pixel count to, say 150 per inch, iPhoto's books are happy with the images
    Any advice appreciated - thanks

    I presume Elements, like full-blown Photoshop, has no real organisational ability at all (as far as I can see). Basically you load, work on and re-save one photo at a time, to whatever folder you want the result in.
    I do find annoyances in Aperture, but what I like is the versioning aspect of it when changes are made to a photo. There's no need to create an adjustment layer, or duplicate an image before work in order to retain the original.
    I know Steve Jobs has this paranoia about things looking clean and minimising buttons (just look at a Mac remote control or the iPhone) but sometimes function really is more important than form. Compared to Photoshop there's MASSES of stuff that's missing from Aperture.
    I don't expect to ever be able to add a 'plastic wrap' effect (for example) to an image in Aperture but the resize thing seems a no-brainer to me.
    PAL

  • How to Increase disk image size of SAM

    Hello,
    I am trying to increase the disk image size. I am trying to increase to about 6G, but SAM just refused to load the image.
    So, is there a limit in SAM about the virtual disk size? Or is it limited to the physical memory of the system?
    I have read the thread http://forums.sun.com/thread.jspa?threadID=5239257&tstart=30 and http://forums.sun.com/thread.jspa?forumID=837&threadID=5286038 about enlarging the disk image.
    I am using OpenSparc T2 Arch 1.2 and the int12 boot bundle. I am wondering if I should change to the sasdisk for a try.
    It is strange, that I previously ran the simulator on a Solaris Express (actually 5.11), and it worked fine.
    But now I changed to the Solaris 10, then it failed.
    Thank you.
    Jim

    As it turns out, the way to make the image appear larger on the page is to edit and increase the size of the signature "box" on the pdf (under Forms > Add or Edit Fields), to considerably larger than the form might indicate.  Otherwise, the signature is constrained to the just the size of the small field on the pdf.  Interestingly, as soon as you do so, the signature appears "bolder", likely just because there is more of it.  Thanks for your suggestions!

  • UIImageJPEGRepresentation increases image size

    HI , Am picking images from device photolibrary , and compress them using UIImageJpegCompression , but some images are doubled in size then the original image , say the original image is 5mb , then the compressed image size increases to 15mb , why so??
    NSData *imageData = UIImageJPEGRepresentation(imgFromPhotoLibOrCamera, .95);
    increases image size?
    Thanks in Advance.

    Yes. I don't optimize before importing and have iWeb's option turned off. I have a tutorial on using Web Site Maestro: Old Toad's Tutorial #12 - Using Web Site Maestro to Publish to MobileMe.. It's a little dated but can help you a little. The WSM help file is very good.
    You need to create a folder on your HD to publish to, I have one called WSM Input. In that folder put another folder for your site but don't have it the same name. Call it "Folder for Site_Name". Publish to that and never delete any of the files that get created in the "Folder for Site_Name". If you do than all edits and publish site changes will result in all pages getting published and WSM will not be able to optimize and upload just the changed pages. It will have to upload the entire site and you definitely want to avoid that.
    WSM does a very good job, IMO, of uploading to the server. I use MobileMe and it uploads much faster than I could upload using the Finder but that shouldn't be any surprise. The Finder is the best uploading client for an iDisk.

Maybe you are looking for