Save in PNG with transparency

I'm trying to save a file in Photoshop, change the width and the height of 50%, the resolution to 300 and keep transparency. If I save in .png, it flattens the layers.

Save as 'Save for Web' works, but for some reason, it changes the resolution to 72 and a width of 37 inches. If I open the image in Photoshop and change the resolution to 300, I get good 8.88 in. width.

Here's what I have in the script. I'm new to javascript so patient with me.

var xMaxFullDimension is activeDocument.width.as ('in');.
var yMaxFullDimension is activeDocument.height.as ('in');.
activeDocument.resizeImage (new UnitValue(xMaxFullDimension*50/100,'in'), new UnitValue(yMaxFullDimension*50/100,'in'), 300, ResampleMethod.BICUBIC);

sfwPNG24(saveFile,100);

function sfwPNG24 (saveFile, quality) {}

var pngOpts = new ExportOptionsSaveForWeb;

pngOpts.format = SaveDocumentType.PNG;

pngOpts.PNG8 = false;

pngOpts.transparency = true;

pngOpts.interlaced = false;

pngOpts.resolution = 300;

pngOpts.quality = quality;

activeDocument.exportDocument (new File (saveFile), ExportType.SAVEFORWEB, pngOpts);

}

You can simply use a normal backup rather save for web to keep the 300 dpi. You can use scriptlistener to record all the code.

Tags: Photoshop

Similar Questions

  • Unable to save in PNG with transparent background?

    I try to save a file in PNG format with transparent background, but PNG is not an option on my save as a list. In the following video the instructor made guess I can't?

    http://www.YouTube.com/watch?v=XKZ-IARmhsg

    Choose Image - Mode.

    To save an image PNG, if it's not RGB, 8-bit/channel, make sure.

    Note what is shown in the title bar or the tab of the document on the instructor machine - RGB / 8.

    -Christmas

  • How to save a PNG with an alpha right or fat?

    Long story short, work in broadcasting and a new piece of equipment like the png files.  I know how to save png with transparency, is not the problem.  I don't know how or if this is possible is to save with an alpha right or fat.  At the moment we feather or extend the edges to past the alpha to say a logo and save it as tif, psd, or .tga.  This way once it is indexed on video or something else, the edges look good, no bad black border... it is logical, explaining probably not very well.   But move to png files, I have no idea how to do an alpha right or fat because he sees the transparency.  I mean that if I have feathers on the edges, a png will see this right, since there is no alpha?

    I hope this makes sense?

    > If we don't fill the transparent areas and semi-transparent image with the colored part of the image, we have usually get a dirty key/matte or a lot of fringes.

    This means that your other software and hardware is not reading/interpretation of the PNG file correctly.

    PNG saves with everything that is in the pixels in the transparent area - because they are supposed to be transparent and not seen.

    If you see artifacts in the transparent areas, then something is wrong with the software displaying the PNG, because 100% transparent should not be visible at all.

    Almost, it looks like someone could not read the documentation and specifications and try to treat the PNG as premultiplied format.

  • Loading external png with transparency

    Hello

    Im trying to create a system of navigation with a few buttons as3.0.

    Each button is a png image.

    When the import of images to the stage im I don't have problems of transparency, but the problem is that they are enough, not smooth not especially

    because im animating the using TweenLite.

    I thought that the only way to do this correctly is to load all images using as3 in bitmap objects and then use the smoothing property.

    The problem is that whenever I attribute the png to a bitmap object, I lose the transparency of information and get a white background...

    Anyone know how I can keep transparency information of png on the bitmap object?

    Thank you

    Here is a little code that loads a PNG with transparency, it softens and placed on stage.

    var a: Loader = new Loader();
    a.Load (new URLRequest ("spider.png"));
    a.contentLoaderInfo.addEventListener (Event.COMPLETE, done);

    function done (e: Event) {}
    var bit: image Bitmap = e.target.content;
    If (bit! = null) {}
    bit. Smoothing = true;
    }
    addChild (bit);
    }

  • Save in TIFF or PNG with transparent background

    PS cc (2015.5.0) create an image with multiple layers, all with transparent when I try to save as TIFF or PNG so I can move to the WEB Site, the file does not keep the background transparent. How can I solve this.

    For the WEB using the PNG.

    If all your layers are transparent,

    Save the png file, and then reopen the file in photoshop to check if it is registered with transparent background.

  • How can I save a project with transparent work plan?

    Hello

    Can you please explain to me how to save a project EPS with transparent work plan? I mean, everytime I open the project from the work to be transparent plan.

    I need to know How to save the whole project with transparent work plan, not only the image with a transparent background (the project to be with one transparent artboard).

    Thank you!

    Well, the first thing you want to do is forget about format EPS. He served in a modern workflow and can't stand any kind of transparency.

    Also, think that the Illustrator artboard is nothing more than a set of limits. It has no opacity or transparency.

    If you want to see the transparency (an oxymoron) in your editing environment, choose View > show transparency grid. It's a view simple setting... not a file attribute.

  • Save pictures png with different names...

    Hello guys,.

    I'm not so familiar with Labview and I want help. I have a Vi which is actually control 32 RBG lights. We use the DMX Protocol... to each time a directed is on and then we take a picture, then the led goes out. The second goes on then end and on... We have 8leds in 4corners... So, we corner1_led1, corner1_led2 up to corner4_led8. Ultimately, we are 32 saves png pictures. What I want is to record photos with different names and numbers starting from 1 instead of 0... For example, if we choose the white light and save the images in 'News' images will be named 'new_white_0_0' instead of 'new_white_1_1 '. You have an idea how I can change it?

    Attached the names of current photos and Vi.

    Any comments would be useful.

    Thank you.

    The terminal of indexing ([i] in the loop for) starts at 0. When you create your file name, use the primitive "to increment" digital palette. Then your file names will start at 1 instead of 0.

    I noticed your VI that you do a lot of string concatenation to build the path/name of the file, you can use the format string and build the screw to make the somewhat simpler schema. You can also update the deprecated functions (for example, the file open) with modern equivalents.

  • Strange behavior of the PNG with transparent background

    Hi all

    I am facing a strange problem on a request of my friends that I'm upgrading. The application is written in CVI2009SP1 and is already running on the customer's site. I am now adding several new features and made some changes in the application file UIR and all of a sudden all the images I have show a black background instead of transparency.

    The strange thing is that I see the images correctly in the editor of the UIR, the black background being shown only at runtime, no matter if debug or release.

    It is an example of wat I see:

    I tried to reload the image in control after checking transparency but the situation has not changed. The problem is that the images in. The other images, PNG format in. Format ICO show properly.

    I see this behavior in my office on both two machines wirth 2009SP1 for 2012SP1 development and execution. The same phenomenon occurs on the client PC runtime 2010SP1 and no IDE installed. If I run the original application with the UIR unmodified, transparency is properly managed. I'm not operated by program images, which are only decorative elements on the user interface.

    What can happen?


  • Try a background image with a PNG with transparency matte / partial transparency

    Hello everyone.

    Here's the scenario;

    1. I have a PNG sequence rendered in a 3d program. The sequence has a landscape that is partially transparent and has no background image or color. In the animation, which is not the landscape is 100% transparent, while the landscape is partially transparent.
    2. I have a background that I want to put behind the PNG sequence but I don't want the background visible through the part of the landscape of the sequence, only the portion that is 100% transparent.

    I tried several different methods, but because the landscape is partially transparent, with a matte (alpha or alpha reverse) or blend (such as stencil alpha) mode does not give me the results I'm looking for.

    I'm looking for is a way of mast (or mask) the background image with only the part of the PNG that is 100% transparent. In this way, the background image are not displayed in the semi transparent landscape, but will be visible in the part that is 100% transparent.

    I would like to find a reasonable solution in After Effects, as opposed to the sequence of 3d objects rendered being invisible to the camera and the current background. The landscape scene itself took a considerable amount of time to make (120 hours) and I would like to avoid this kind of delay in my project.

    Thank you all in advance for your consideration.

    Maybe I said incorrectly: you cannot use the 3D app to generate a matte black and white simple - or mattes - to separate properly, then just composite in AE?

  • CC Moving Photoshop layers when exporting PNG with transparent background

    Hey, if someone could help that would be great.

    I make videos and use photoshop to create subtitles/text using the type tool, transparent background and then superimpose the image file into iMovie.

    However, sometimes photoshop decides to move the text, even if I do not have when exporting, only seems to happen if the background is transparent.

    For example. These two images and if you switch between them quickly enough to create a moving image.

    test2.pngtest1.png

    I think you'll find that the border of the images are not the same, because of the background is transparent. You can check by looking at the dimensions in pixels for both images. They should be the same.

  • I saved a PNG with transparent background...

    .. as a GIF and it shows that I can't delete or same color on a white background in Photoshop. All the ideas that I was wrong?

    Thank you.

    Just to be sure... did you have your backdrop the value transparent (showing the checkerboard)?

    You did record under or do you export? You export your .gif in the menu:
    "File > preview image ' (CS3) or" file > Export Preview "(earlier versions)
    and select the Alpha transparency.

  • Save the bitmap in PNG loses transparent

    I have a png image in a resource file with transparency.

    I had a few changes to the bitmap image and recorded on the sd card in the png format but

    the transparent color is black.

    How to save the image in png with transparent color? Thank you

    Although you'd have to do some research, there is a PNG encoder that someone (J. David Eisenberg) wrote and it supports alpha. I could not find it in a quick search.

  • SVG, convert, bmp, with transparent, BMG.

    I have the .svg file to HAVE. I want to export / save as .bmp with transparent BG. How can I do?

    You can not. BMP is not compatible with the transparencies.

  • Cannot save a PNG file with alpha channel transparency format

    I try to send a PNG file with transparency channel alpha on my Zenfolio web page. It is a custom application of copyright law that I do.  When I save the file, cs5, and I select Save in PNG, in the window, I get a message error/alert that says "the file should be saved as a copy with this application.  I'm not allowed to select the Alpha channel option.

    I think that I have a setting in CS5 that is making this happen, but I'm not smart enough to understand.

    What happens when I have when even save it and upload this file to my Zenfolio website is copyright logo has a cloud of sorts with it. It's the rest of the House generated page which should be, but is not transparent.

    PNG does not support alpha channels, only one channel of transparency.

    Just make the image with transparency and save in PNG.

  • Save the Logo with a Transparent background

    Hi, I am building a company with Photoshop CC logo. The main objective for my logo is so he married well in my site header. As you can see in http://comparedeals.net my mobile phone site, I had to change the background color of the Web page to white as the logo is not transparent. How to make the white background of the logo transparent?

    I know how to remove the bottom by this invisible layer but when I save the file as a JPEG or PNG image, the background is always white - which requires me to have a white background color for my Web site.

    I know that you can save money with transparency, but I don't remember how I did the last time I did a logo. Anyone know how?

    Thank you.

    You can do this by removing the bottom completely and use the shortcut
    (Shift + ctrl + alt + s) which will take to save you for web window. Select png-24 format for an image of high quality from the drop-down list and it should serve your purpose.

Maybe you are looking for