OUTPUTING AS PNG WITH ALPHA??

Hello to everyone...
I hope someone can give helping hand...
I'm working on a project where I need to output single frame files as PNG's with Alpha channel.  So far, I've used the "save frame as" function and then selected "file".  In the Render Queue under output module, I selected PNG sequence.  In the output settings under video output, I selected RGB + Alpha and Millions of colors +   I also selected "interlaced" under format options as the files are for web.  But when I open the single frame in Photoshop, the ALPHA channel is not there.
Can someone tell me what I'm doing wrong?  I know that PNG's can be saved with an Alpha I just can't seem to make it work.
Please help!
Thanks
Bgub.

Define work area if rendering in portions, then go  "add to render queue" instead of "save frame" and modify output module to PNG Sequence RGB+Alpha, Millions of Colors+
PNG+Alpha still work here for me in CS3. Maybe Adobe removed support for outputting PNG Still Image Seuquence with Tranparency. I would not wonder because they often toss functionalities, only god knows why they're doing it.
Otherwise use TIFF Sequence

Similar Messages

  • Export selected item as PNG with Alpha

    Hello.
    I'm building game graphics in Illustrator.  I have thousands of individual sprites to export, up until now I've been copying and pasting in Photoshop and exporting through there, but that is tedious and slow.  Inkscape has an option to export the selected object only as a PNG with alpha, pixel dimensions are equal to the current selection size.  Perfect.  But that means using Inkscape and quite frankly it's horrible to use.
    I'm sure this must be possible, but for the life of me I can't find a working method.  I found Windows scripts for CS3, but nothing for CS5 on Mac.
    Can anyone help?

    Should not be too hard to adapt the script for Mac, assuming it is JavaScript, not VBScript. If you can point to the source, someone might be able to fix it for you (also post in the scripting sub-forum). Other than that you can of course always make use of the slice tool and fit the slices to the objects, then export the slices.
    Mylenium

  • How to import a PNG with alpha?

    I have some images I made in photoshop (on my PC) that have a transparent background. I exported them as a 24 bit PNG with a alpha channel. Importing to my ipad through itunes as a photo seems to loose the alpha channel. How do I use alpha in Keynote? This is a very basic function - what am I doing wrong?

    First off, Thank you to Iwell, skers1 and Kyn Drake for your help. I also found an unlikely work-around since posting my question. It's an app called myPhone Desktop (universal binary). It will let you copy a phone #, text, url or image from your desktop (pc/mac) and sends that to your iPhone/iPad/iTouch! Best of all, it supports image alpha! Very quick and simple. Here is the link http://www.myphonedesktop.com

  • FCPX is doing funny things to PNGs with alpha channel.

    I am currently working on a video that requires lots of compositing using PNGs with transparency. Everything was fine, until I decided to render. Then this happened:
    Some of the PNGs turned into a bunch of pink blocks, as if the file were corrupted. It even happened with a PNG with no transparency-=
    I've tried:
    Trashing Render Files
    Changing Alpha Handling
    Export without Render
    Using "Add" as the Blend Mode.
    What can I do?

    I suggest you begin by deleting preferences, as so many weird things seem to be caused by corrupt preferences.
    You can also try creating a brand new project, composite a few pngs and check if the weirdness also occur there; if it does not, then maybe there was some corruption in the project, in which case selecting everything and pasting into a new project may cure it.

  • Why can't I export a 24 bit PNG with alpha transparency?

    I have just upgraded my Macromedia Studio 8 to Adobe CS3, and
    it seems that I still can't export a 24 bit png with transparency
    from Fireworks (Photoshop can do it, but it's just not suited for
    volume graphic production). Anyone know something I don't, or can
    someone at least explain why I can have alpha transparency on 8 bit
    and 32 bit, but not 24 bit pngs? Currently, I'm planning to export
    everything from Fireworks, then batch-process through Photoshop to
    reduce from 32 bit to 24 bit, which is just... gah! Words fail
    me.

    Kathleen13 wrote:
    > I have just upgraded my Macromedia Studio 8 to Adobe
    CS3, and it seems that I
    > still can't export a 24 bit png with transparency from
    Fireworks (Photoshop can
    > do it, but it's just not suited for volume graphic
    production). Anyone know
    > something I don't, or can someone at least explain why I
    can have alpha
    > transparency on 8 bit and 32 bit, but not 24 bit pngs?
    Currently, I'm planning
    > to export everything from Fireworks, then batch-process
    through Photoshop to
    > reduce from 32 bit to 24 bit, which is just... gah!
    Words fail me.
    >
    If I'm correct, 8-bit png supports index transparency just
    like GIF's
    do. 32-bit png's support alpha channel transparency, so you
    can get
    variable or partial transparency in a full color image(8 bits
    for each
    color and 8 bits for an alpha channel) and 24-bit png's are
    similar
    jpegs, only you get lossless compression and no user-defined
    settings.
    So essentially, when you export a 32-bit png file you are
    exporting a 24
    bit color image with an 8-bit alpha channel.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    Extending Knowledge, Daily
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    news://forums.macromedia.com/macromedia.fireworks
    news://forums.macromedia.com/macromedia.dreamweaver

  • PNG with Alpha into FCP..

    Hi.
    I have a 15 minute movie that I've edited in FCP7.
    The transitions and text are animated on After Effects, exported in 1920x1080 Quicktime PNG codec, because of the need of an alpha channel for transparency.
    I import it into a timeline that is 1920x1080 Apple ProRes 422 configured, because the timeline is mostly from 7D and 5D footage converted from MPEG Streamclip.
    The result I get is that the text and lines from the PNG-codec .mov have some "cracks", not near as smooth as in the PNG compression. The example is below:
    PNG codec mov exported from AE:
    http://oi42.tinypic.com/65ww1h.jpg
    Inside FCP and FCP-exported movie:
    http://oi43.tinypic.com/290ykqr.jpg
    How can I get Final Cut to export or interpret the footage correctly?
    Or should I export it differently from AE?
    Thanks!

    Use your editing application to change the field order to None.  It's  easy to do in the FCP Browser.  Just look for the field order column and change it.  Done.

  • How to read and write Png and jpeg with  Alpha

    Hi
    I have trouble reading and writeing PNG and JPEGs that have an alpha channel (for transparency).
    Reading works, if i use Toolkit.getImage() method, but works NOT if i use ImageIO.read() method.
    Writing does NOT work using ImageIO.write()method. Instead i got a "java.lang.UnsupportedOperationException: Unsupported write variant!"
    See Test class and commandline output below:
    /****************START*****************************/
    package de.multivisual.bodo.test;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.File;
    import java.net.URL;
    import java.util.Iterator;
    import javax.imageio.*;
    import javax.imageio.metadata.IIOMetadata;
    import javax.imageio.stream.ImageInputStream;
    import javax.imageio.stream.ImageOutputStream;
    public class AlphaChannelTest implements ImageObserver {
      Toolkit toolkit;
      Image img;
      public AlphaChannelTest() {
        super();
        toolkit = Toolkit.getDefaultToolkit();
        URL url =
          AlphaChannelTest.class.getResource(
            "/de/multivisual/bodo/test/" + "alphatest.png");
        img = toolkit.getImage(url);
        try {
          ImageInputStream imageInput =
            ImageIO.createImageInputStream(url.openStream());
          Iterator it = ImageIO.getImageReaders(imageInput);
          ImageReader reader = null;
          while (it.hasNext()) {
            reader = (ImageReader) it.next();
            System.out.println(reader.toString());
          reader.setInput(imageInput);
          ImageReadParam param = reader.getDefaultReadParam();
          BufferedImage bimg = reader.read(0, param);
          SampleModel samMod = bimg.getSampleModel();
          ColorModel colMod =       bimg.getColorModel();
          String[] propNames = bimg.getPropertyNames();
          IIOMetadata meta = reader.getImageMetadata(0);
          System.err.println("\n*****test image that was read using new Jdk 1.4 ImageIO.read() method");
          alphaTest(bimg);
        } catch (Exception e) {
          //e.printStackTrace();
        if (img != null)
          toolkit.prepareImage(img, -1, -1, this);
        try {
          synchronized (this) {
            System.out.println("wait");
            this.wait();
        } catch (Exception e) {
          e.printStackTrace();
        System.out.println("end");
      public void alphaTest(BufferedImage bi) {
        Raster raster = bi.getData();
        float[] sample = null;
        System.out.println("raster :");
        for (int y = 0; y < raster.getHeight(); y++) {
          for (int x = 0; x < raster.getWidth(); x++) {
            sample = raster.getPixel(x, y, sample);
            System.out.print("(");
            for (int i = 0; i < sample.length; i++) {
              System.out.print(":" + sample);
    System.out.print(")");
    System.out.println();
    Raster araster = bi.getAlphaRaster();
    if (araster == null){
         System.err.println("there is no Alpha channel!!!!!!!!!");
         return ;
    } else {
         System.out.println("Alpha channel found !");
    float[] asample = null;
    System.out.println("raster alpha:");
    for (int y = 0; y < araster.getHeight(); y++) {
    for (int x = 0; x < araster.getWidth(); x++) {
    asample = araster.getPixel(x, y, asample);
    for (int i = 0; i < asample.length; i++) {
    System.out.print(" " + asample[i]);
    System.out.println();
    String format ="PNG";
    System.out.println("##########Test Writing using new JDK1.4.1 ImageIO:");
    Iterator writers = ImageIO.getImageWritersByFormatName(format);
    ImageWriter writer = (ImageWriter) writers.next();
    ImageWriteParam param = writer.getDefaultWriteParam();
    ImageTypeSpecifier imTy = param.getDestinationType();
    ImageTypeSpecifier imTySp =
    ImageTypeSpecifier.createFromRenderedImage(bi);
    param.setDestinationType(imTySp);
    File f = new File("c:/tmp/myimage."+format);
    try {
    ImageOutputStream ios = ImageIO.createImageOutputStream(f);
    writer.setOutput(ios);
    writer.writeInsert(0, new IIOImage(bi, null, null), param);
    } catch (Exception e) {
         System.err.println("could not write "+format+" file with alpha channel !");
    e.printStackTrace();
    public boolean imageUpdate(
    Image img,
    int infoflags,
    int x,
    int y,
    int width,
    int height) {
    if ((toolkit.checkImage(img, -1, -1, null)
    & (ImageObserver.HEIGHT | ImageObserver.WIDTH | ImageObserver.ALLBITS))
    == 35) {
    int iw = img.getWidth(this);
    int ih = img.getHeight(this);
    BufferedImage bi = new BufferedImage(iw, ih, BufferedImage.TYPE_4BYTE_ABGR);
    Graphics2D big = bi.createGraphics();
    big.drawImage(img, 0, 0, this);
    System.err.println("+++++test image that was read using old Toolkti.getImage method");
    alphaTest(bi);
    synchronized (this) {
    this.notifyAll();
    return false;
    return true; // image is not yet completely loaded into memory
    public static void main(String[] args) {
    //     BufferedImage image = new
    // BufferedImage();
    new AlphaChannelTest();
    /*************************END********************/
    The commandline looks like this:
    [i]
    com.sun.imageio.plugins.png.PNGImageReader@d1fa5
    *****test image that was read using new Jdk 1.4 ImageIO.read() method
    raster :
    there is no Alpha channel!!!!!!!!!
    wait
    +++++test image that was read using old Toolkti.getImage method
    raster :
    Alpha channel found !
    raster alpha:
    ##########Test Writing using new JDK1.4.1 ImageIO:
    could not write PNG file with alpha channel !
    java.lang.UnsupportedOperationException: Unsupported write variant!
         at javax.imageio.ImageWriter.unsupported(ImageWriter.java:600)
         at javax.imageio.ImageWriter.writeInsert(ImageWriter.java:973)
         at de.multivisual.bodo.test.AlphaChannelTest.alphaTest(AlphaChannelTest.java:113)
         at de.multivisual.bodo.test.AlphaChannelTest.imageUpdate(AlphaChannelTest.java:135)
         at sun.awt.image.ImageWatched.newInfo(ImageWatched.java:55)
         at sun.awt.image.ImageRepresentation.imageComplete(ImageRepresentation.java:636)
         at sun.awt.image.ImageDecoder.imageComplete(ImageDecoder.java:135)
         at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:511)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:257)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:168)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    end

    in between i found out that the my png and jpeg test images did not have an alpha channel, since the tool i used to create them, did not write the alpha channel to disk.
    if i use png with alpha channel, then the read works correktly with ImageIO.read()
    however the read problem still remains for gifs and the write does not work for gifs and neither for pngs.
    whether jpegs can be read with alphachannel i don't know since i don't have a tool to create jpeg with alpha channel. (at least gimp and corel9 are not able to )
    and it is not possible to write the previous read png with alpha channel back as and jpeg with alpha channel

  • ImageIO PNG Writing Slow With Alpha Channel

    I'm writing a project that generates images with alpha channels, which I want to save in PNG format. Currently I'm using javax.ImageIO to do this, using statements such as:
    ImageIO.write(image, "png", file);
    I'm using JDK 1.5.0_06, on Windows XP.
    The problem is that writing PNG files is very slow. It can take 9 or 10 seconds to write a 640x512 pixel image, ending up at around 300kb! I have read endless documentation and forum threads today, some of which detail similar problems. This would be an example:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304]
    This surely must be resolvable, but after much searching I've yet to find a solution. If it makes any difference, I ONLY want to write png image, and ONLY with an alpha channel (not ever without), in case there are optimisations that that makes possible.
    If anyone can tell me how to address this problem, I'd be very grateful.
    Many thanks, Robert Redwood.

    This isn't a solution, but rather a refinement of the issue.
    Some of the sources I was reading were implying that the long save time might be due to a CPU heavy conversion process that had to take place before the BufferedImage could be saved. I decided to investigate:
    I loaded back in one of the (slowly) saved PNG images using ImageIO.read(file). Sure enough, the BufferedImage returned differed from the BufferedImage I had created. The biggest difference was the color model, which was DirectColorModel on the image I was generating, and was ComponentColorModel on the image I was loading back in.
    So I decided to manually convert the image to be the same as how it seemed to end up anyway. I wrote the following code:
          * Takes a BufferedImage object, and if the color model is DirectColorModel,
          * converts it to be a ComponentColorModel suitable for fast PNG writing. If
          * the color model is any other color model than DirectColorModel, a
          * reference to the original image is simply returned.
          * @param source The source image.
          * @return The converted image.
         public static BufferedImage convertColorModelPNG(BufferedImage source)
              if (!(source.getColorModel() instanceof DirectColorModel))
                   return source;
              ICC_Profile newProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
              ICC_ColorSpace newSpace = new ICC_ColorSpace(newProfile);
              ComponentColorModel newModel = new ComponentColorModel(newSpace, true, false, ComponentColorModel.TRANSLUCENT, DataBuffer.TYPE_BYTE);
              PixelInterleavedSampleModel newSampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, source.getWidth(), source.getHeight(), 4, source.getWidth() * 4, new int[] { 0, 1, 2, 3 });
              DataBufferByte newDataBuffer = new DataBufferByte(source.getWidth() * source.getHeight() * 4);
              ByteInterleavedRaster newRaster = new ByteInterleavedRaster(newSampleModel, newDataBuffer, new Point(0, 0));
              BufferedImage dest = new BufferedImage(newModel, newRaster, false, new Hashtable());
              int[] srcData = ((DataBufferInt)source.getRaster().getDataBuffer()).getData();
              byte[] destData = newDataBuffer.getData();
              int j = 0;
              byte argb = 0;
              for (int i = 0; i < srcData.length; i++)
                   j = i * 4;
                   argb = (byte)(srcData[i] >> 24);
                   destData[j] = argb;
                   destData[j + 1] = 0;
                   destData[j + 2] = 0;
                   destData[j + 3] = 0;
              //Graphics2D g2 = dest.createGraphics();
              //g2.drawImage(source, 0, 0, null);
              //g2.dispose();
              return dest;
         }My apologies if that doesn't display correctly in the post.
    Basically, I create a BufferedImage the hard way, matching all the parameters of the image I get when I load in a PNG with alpha channel.
    The last bit, (for simplicity), just makes sure I copy over the alpha channel of old image to the new image, and assumes the color was black. This doesn't make any real speed difference.
    Now that runs lightning quick, but interestingly, see the bit I've commented out? The alternative to setting the ARGB values was to just draw the old image onto the new image. For a 640x512 image, this command (drawImage) took a whopping 36 SECONDS to complete! This may hint that the problem is to do with conversion.
    Anyhow, I got rather excited. The conversion went quickly. Here's the rub though, the image took 9 seconds to save using ImageIO.write, just the same as if I had never converted it. :(
    SOOOOOOOOOOOO... Why have I told you all this?
    Well, I guess I think it narrows dow the problem, but eliminates some solutions (to save people suggesting them).
    Bottom line, I still need to know why saving PNGs using ImageIO is so slow. Is there any other way to fix this, short of writing my own PNG writer, and indeed would THAT fix the issue?
    For the record, I have a piece of C code that does this in well under a second, so it can't JUST be a case of 'too much number-crunching'.
    I really would appreciate any help you can give on this. It's very frustrating.
    Thanks again. Robert Redwood.

  • PNG 8-bit Indexed With Alpha

    Hello,
    I need to write PNG images in 8-bit indexed mode (
    Color Type 3... ?) with an alpha channel. I believe that the
    only way to do this is by putting the Alpha (or Matte) information
    into a PNG tRNS Chunk. I have heard that Fireworks can do this, but
    have not yet been successful. Please tell me how.
    BTW, I can write PNG files in 32-bit ARGB mode, but this is
    unacceptible because the compression is lossless and the files
    become huge. XnView supports this as well. Photoshop will not allow
    me to write PNG with Alpha. Can Fireworks help me? How?
    - Thank you, David Manpearl
    <dmanpearl_at_imatte_dot_com>

    DavidManpearl wrote:
    > Hello Linda,
    >
    > Thank you very much for your suggestion of making one of
    the image colors
    > represent transparent matte, as in a GIF format image.
    > Unfortunately, this cannot work for me as I need color
    information for all of
    > the pixels in the image, regardless of the setting of
    the matte, or alpha
    > channel value. Perhaps this is impossible for PNG with
    indexed color? The
    > answer to this question is what I hope to determine one
    way or the other
    > through this forum.
    Why not just export in 8-bit PNG format, with no
    transparency, and see
    if it works?
    Linda Rathgeber ACE ::: PVII
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    Adobe Community Expert - Fireworks
    Design Aid Kits:
    http://www.webdevbiz.com/pwf/index.cfm

  • Sudden problem with importing tiff files with alpha channel (CS5)

    OK this is driving me nuts. For years I have been importing image files that have an alpha channel  into FCP as.tiff files. I use Photoshop files only when I want to use the layers as they are too cumbersome otherwise). I have recent upgraded Photoshop, etc. to CS5 and now FCP won't import them anymore. I get a message saying: "File error: 1 file(s) recognized, 0 access denied, 1 unknown"
    I am not doing anything different and tiff files created in just the same way in an earlier version of Photoshop import and work just fine. Is this a CS5 bug? Does anyone know of a work around. I want to keep using tiff files as they seem to work best for me with alpha channel work (and I don't see why I need to reinvent the wheel).
    Thanks
    A

    I've had a similar issue recently. Same TIFF files downloaded from the same server, different FCP project, new error. I either see"File error: 1 file(s) recognized, 0 access denied, 1 unknown" or I get the even stranger, "Unrecognized file type."
    I can open them in PS and save them again as TIF, same results. I know these are not CMYK files but even if resave the TIF as RGB, I get the same results, they are not recognized by FCP.
    But if I open them in PS and save them as PNG with alpha, they improt fine.
    I have no idea what's going on.
    bogiesan
    Message was edited by: David Bogie Chq-1

  • VIDEO WITH ALPHA

    How do I insert a video in flash with alpha ?
    I have a Video inside Final Cut with croma key.
    How Can I take this video inside Flash ?
    I tried to export the video as a bitmap sequence
    (PNGs with alpha) after that I imported those files
    into a Movie Clip in Flash... It works fine to me,
    anyway I am wondering if this is the best way to
    do that... I am wondering if flash accept some
    video file with alpha inside.
    Somebody knows someting about that ?
    thanks,
    Bruno Alecrim
    Rio de Janeiro - Brasil

    Here's a tutorial for you:
    http://theflashblog.com/?p=59
    Dave

  • Why can't I see the Finder thumbnails for .mov files with alpha channels?

    Ever since I upgraded to Mavericks I haven't been able to see the thumbnail for or preview using spacebar any .MOV clips that contain alpha channels in Finder. PSDs and PNGs with alpha channels are fine, and I can still see their thumbnails and previews, it's just .MOV clips with alpha. Here are a couple screenshots:
    Most of these clips are using a PNG codec, but I converted on to the Animation codec and tested it in After Effects to make sure it kept the alpha channel and it did, but the same thumbnail error persists.
    Any idea why this might be or how to fix it?
    27" iMac late 2012
    1TB Fusion
    NVIDIA GeForce GTX 680MX 2048 MB
    16GB RAM
    OS X Mavericks
    Thanks.

    ok, have copied the photos again from the memory card and hey presto, it all works fine.  So in summary...for RW2 files from GF1 camera, I have no thumbnail images, couldn't view in Preview, and neither Quickview nor Coverview were working.  Ran the bit of code provided at "https://discussions.apple.com/message/18369759#18369759" (thanks to Snoop Dogg) and then recopied the photos onto my Mac (only required for photos copied since upgrading to Lion, everything from before the upgrade is fine anyway).
    Hope others find this helpful.

  • OUTPUT PNG W/ Alpha for the web?

    Hello to everyone.
    I'm hoping someone can shed some light on this...
    I need to output my file as a PNG with an ALPHA Channel for the web.  First, I created an alpha for my image, and then I tried to simply use the "save as" function and select the PNG format, but the ALPHA selection is grayed out.  I've also tried "the save for web function" and selected transparency, but when I reopen the file the alpha channel has dissappeared.  I know that it is possible to save an alpha channel to a PNG, but I can't seem to do it with Photoshop... Can anyone help?
    Thanks in advance.
    Bryce

    Hello Zeno Bokor
    Thanks for your reply.
    In fact, my client, who is using the images for a web game that they are developing, requested that the files have an Alpha channel.  They have explained that the alpha channel helps the video program understand what areas are transparent.
    I wish that it was just a case of transparency... It would be hell of a lot easier.
    Any ideas?
    Thanks again.
    bgub.

  • Automator or Applescript using png files with alpha channel

    I have hundred of png files with alpha channel.
    I want to suppress alpha channel.
    How can i do it using Automator or Applescript ?
    Thank you very much.

    You can use the free command line image processing tool ImageMagick in your Applescripts or Automator workflows, as well as from a Terminal shell.
    You can download ImageMagick from http://www.imagemagick.org, but Cactuslab has simplified installation by putting together an installer package. It’s available at  http://cactuslab.com/imagemagick/. Download the package and double-click on it. Follow the instructions to install. It will install ImageMagick into /opt/ImageMagick and add it to your $PATH by creating a file in /etc/paths.d/. Restart your computer for the changes to take effect.
    The two ImageMagick commands we’re concerned with are “convert” and “mogrify”. Convert is more efficient for multiple and piped operations on the same image file, and mogrify is more efficient for batch processing. Generally speaking, convert will output a file separate from the input file. Unless a path is specified, mogrify will overwrite the input file with the output file. An important distinction.
    You can perform various operations on the alpha channel using arguments after either the convert or mogrify command. Two of the available arguments are:
    -alpha off - Disables the image's transparency channel. Does not delete or change the existing data, just turns off the use of that data.
    -alpha remove - Composite the image over the background color.
    Also of use are the -flatten and -background options:
    -flatten - overlay all the image layers into a final image and may be used to underlay an opaque color to remove transparency from an image.
    -background - sets the background color.
    Start off using the convert command with a single image to see the effect and adjust to your liking. Once you’ve achieved the desired outcome, then use the mogrify command to batch process the chosen images.
    Before getting into how to use Automator or Applescript in your workflow, use Terminal and the command line to see the effect on a single image. Copy one image to your ~/Desktop. In Terminal change the directory to ~/Desktop by typing the following command and pressing the Enter key:
    cd ~/Desktop
    Then choose the option you are looking for, -alpha remove for instance, type the following command and press the Enter key:
    convert input-photo.png -alpha remove output-photo.png
    You can check the alpha channel (transparency) and background in the Preview app, go View > Show Image Background from the menu bar.
    Once you’re ready to batch proces, place all the photos you want to convert with the same command into one folder. Copy the folder to your ~/Desktop. Let’s assume you’ve labeled the folder “InPhotos”. It’s prudent to manipulate copies in case something goes amiss. In that event you can copy the folder with the originals again and start over. Create a new empty folder on your ~/Desktop and call it “OutPhotos”. Let’s also assume your home directory is called “Me”. The following command will process the photos from the InPhotos folder and put them in the OutPhotos folder:
    mogrify -alpha remove -path /Users/me/Desktop/OutPhotos/ /Users/me/Desktop/InPhotos/*png
    According to Apple Technical Note TN2065:
    "when you use just a command name instead of a complete path, the shell uses a list of directories (known as your PATH) to try and find the complete path to the command. For security and portability reasons, do shell script ignores the configuration files that an interactive shell would read"
    So, you need to use the full path to to ImageMagick commands, unlike in the shell where you can just use the command name.
    To batch process using Automator, use the “Run Shell Script” action (note: retain the single space at the beginning of the last line):
    /opt/ImageMagick/bin/mogrify \
    -alpha remove \
    -path /Users/Me/Desktop/OutPhotos/ \
    /Users/Me/Desktop/InPhotos/*png
    To batch process using Script Editor (Applescript), use the “do shell script” command:
    do shell script "/opt/ImageMagick/bin/mogrify -alpha remove -path /Users/pd/Desktop/OutPhotos/ /Users/pd/Desktop/InPhotos/*png"
    Further info on ImageMagick:
    http://www.imagemagick.org/script/command-line-options.php#alpha
    http://www.imagemagick.org/Usage/masking/#remove
    http://www.imagemagick.org/index.php
    http://www.imagemagick.org/script/command-line-tools.php
    http://www.imagemagick.org/script/command-line-options.php
    Examples:
    The original PNG image:
    -alpha off:
    -alpha remove:
    -background black -flatten:
    -background blue -flatten:
    -channel alpha -evaluate Divide 2:
    -channel alpha -evaluate Divide 2 -background black -flatten:

  • Graphics, ImageIO, and 32-bit PNG images with alpha-channels

    I have a series of 32-bit PNG images, all with alpha channels. I'm using ImageIO.read(File) : BufferedImage to read the PNG image into memory.
    When I call graphics.drawImage( image, 0, 0, null ); I see the image drawn, however all semi-transparent pixels have a black background, only 100% transparent pixels in the source image are transparent in the drawn image.
    The Graphics2D instance I'm drawing to is obtained from a BufferStrategy instance (I'm painting onto an AWT Canvas).
    Here's my code:
    Loading the image:
    public static BufferedImage getEntityImage(String nom, String state) {
              if( _entityImages.containsKey(nom) ) return _entityImages.get( nom );
              String path = "Entities\\" + nom + "_" + state + ".png";
              try {
                   BufferedImage image = read( path );
                   if( image != null ) _entityImages.put( nom, image );
                   return image;
              } catch(IOException iex) {
                   iex.printStackTrace();
                   return null;
         private static BufferedImage read(String fileName) throws IOException {
              fileName = Program.contentPath + fileName;
              File file = new File( fileName );
              if( !file.exists() ) return null;
              return ImageIO.read( new File( fileName ) );
         }Using the image:
    Graphics2D g = (Graphics2D)_bs.getDrawGraphics();
    g.setRenderingHint( RenderingHints.KEY_ANTIALIASING , RenderingHints.VALUE_ANTIALIAS_ON);
    public @Override void render(RenderContext r) {
              Point p = r.v.translateWorldPointToViewportPoint( getLoc() );
              int rad = getRadius();
              int x = (int) p.x - (rad / 2);
              int y = (int) p.y - (rad / 2);
              BufferedImage image = Images.getEntityImage( getCls(), "F" );
              r.g.drawImage( image, x, y, null );
         }

    You may want to check on you system and see what ImageReaders are available, it could be ImageIO is just not picking the best one, if not, then you can use getImageReaders to get an iterator of image readers, then choose the more appropriate one.

Maybe you are looking for