Transparency in png file

How can I make the shadow of this piece of paper transparent in a png so i can make the shadow transparent on the web?
I know how to make a fake, photoshopped drop shadow like this on a png:
but I'm trying to figure out how to make just the shadow of a paper scan transparent/multiplied so it looks more real, and so I can put a background image behind it. i feel like it has something to do w/ making a clipping path, and putting the shadow on an alpha layer, but i can't quite figure it out.
thanks!

You are on one right track.
My recommendations:
• Load the luminance of the composite channel by command-clicking it in the Channels Panel
• invert the Selection (command-I)
• create a black Solid Color Layer (Layer > New Fill Layer > Solid Color)
• drag that behind the layer with the image
• create a Path that hugs the paper
• apply that as a Vector Mask to the paper Layer by command-clicking the »Add a mask« button at the bottom of the Layers Panel (third from the left)
Now there may be a slight problem with the edges, especially of the shadow Layer – you may have to brush or clone stamp there to get a perfect fit to the paper.
And if some regions of the Layer Mask that are supposed to be transparent are less than 100% use Curves or Levels or even the Burn Tool to rectify that. (To view the Layer Mask alt-click the Layer Mask icon in the Layers Panel.)

Similar Messages

  • Transparency with png file

    Hello,
    I created png file in Corel Draw (its simple logo in two colors) and save it with some transparency. What I want to do is: load it in java and put it into my program. Easy. But the problem is, that the transparency doesn't work.
    I'm using this code:
         private void init() {
              try {
                   img = ImageIO.read(getClass().getResource(source));
              } catch (IOException exc) {
                   JOptionPane.showMessageDialog(null,exc.getMessage());
          * Default paint method for this component.
         public void paint(Graphics g) {
              g.drawImage(img,0,0,null,this);
         }Where source is "/logo.png"
    It is simple "component" which I'm simply adding it to ContentPane in my applet.
    Any ideas? Thanks.
    A. J.

    Well,
    in that case I don't understand where is problem. As I mentioned above I've created image in Corel Draw. After that I exported it to .png file. During exporting I set the white color to be transparent. After I saved it I checked the image in Gimp, where that color was transparent. So I'm presuming that the image is all right.
    I've read something about alpha value in pictures. I'm not sure if I don't confusing this two things together...? So I'd like to explain what I'm trying to do.
    I have picture (logo) with two colors, blue and white. I wan to to draw it in my applet as only blue logo onto background.
    Here's my code:
    public class Logo extends JComponent {
         private BufferedImage img;
         private String source = "/logo.png";
          * This method initializes this component.
         private void init() {
              try {
                   img = ImageIO.read(getClass().getResource(source));
              } catch (IOException exc) {
                   JOptionPane.showMessageDialog(null,exc.getMessage());
         public void paintComponent(Graphics g) {
              g.drawImage(img,0,0,null,this);
          * Default constructor.
         public Logo() {
              init();
         public Logo(String source)
              this.source = source;
              init();
         }After that I want to put this logo into my applet. I'm using this code:
          * This is the default constructor
         public Java_applet() {
              super();
          * This method initializes this
          * @return void
         public void init() {
              this.setSize(670, 500);
              this.setContentPane(getJContentPane());
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.add(getLogo(),null);
              return jContentPane;
         private Logo getLogo() {
              if (logo == null)
                   logo = new Logo();
              logo.setLocation(new java.awt.Point(0,0));
              logo.setSize(new java.awt.Dimension(670,50));
              return logo;
         }I hope now it's more clear what I'm trying. Thanks for any ideas.
    A. J.

  • Permanently removing part of an image from a transparent background png file

    Hello, I think I know the answer to this question, but I wanted to double check.  I am new to Photoshop and do not know all the functions.  I have a png transparent background file of a tree with a lot of branches.  I want to erase some of the branches so they are just permanently gone.  I would like to use this image on different backgrounds so I am looking to just erase the branches all together.  Is this possible?  If not in Photoshop, perhaps another adobe program?  Thank you!

    If you want to permanently delete the branches then you can just erase them using the eraser tool. I would always suggest keeping the original file just in case something goes wrong and you want to start again. So just open the .png, save a new version and start erasing the branches you want.
    Simple video:

  • Creating semi-transparency without PNG files

    Hi I have designed a logo for a friend and he needs to upload it onto a companies web site. They have said that it must be either Jpeg or Gif. However, since there is some semi-transparency in my logo a Gif file wont allow this and a Jpeg wont create any transparency. They wont allow PNGs. I have tried to find out what colour the website background will be so I can simply put the logo in a box of the same colour but apparently he is not able to find out this info.
    Is there any other way of getting around this?

    Can you change the logo so the gradient goes to a solid color instead of transparency?
    The very use of gradients at all is relatively new to the world of logo design. When UPS redesigned their logo several years ago there was a huge uproar in the community of the use of gradients ( see: http://www.dinesh.com/images/stories/logo/worldfamouslogos/ups_logo.jpg ).
    I don't think I've ever seen a logo that uses alpha transparency though, due to the exact problem you're having.
    Look at some of the samples on this site, perhaps it'll spark a creative idea that'll help you fix the problem:
    http://logopond.com/gallery/

  • Framing image with transparent background png frame

    hi,
    i'm trying to find a way to frame images with transparent background png frames...
    what i'm doing now is
    1-drawing my image on a panel
    2-creating a 2nd image using the frame's filename, stretching this 'frame-image' to a size slighlty larger than that of my main image and drawing the 'frame-image'
    the problems with this method are:
    1-depending on the width of the frame, the frame sometimes hides parts of the image (thick frame), and sometimes there is a gap between the frame and the image (thin frame).
    2-if the image file containing the frame is larger than the frame (Ex: The image is 300x300, the frame is centered in this image and is 200x200; as opposed to the image is 200x200 and the frame takes up all the space), when i position the 'frame-image' near the top left corner of the image i want to frame, the frame appears at the wrong place (shifted down and to the right). This is due to the fact that i'm placing the top corner of the created 'frame-image' and not the frame, who is not in the top corner of my 'frame-image'.
    Is there a way to do what i'm trying to do???
    My ideas (which i don't know how to achieve are)
    1-To 'analyse' my transparent background png file and
         1-only keep the frame,
         2-calculate the frame's thickness
    OR
    2-Let java do the analyzing for me and tell it to frame my image with the frame in the png file
    please feel free to ask for more explanations if my description/question is confusing,
    thanks.

    Have you looked into the Border interface? If what you really want to do
    is put a custom border on a component, you may be able to do it this way.
    Anyway, here is some code that stacks and centres 2 images. It's not hard to do.
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class Example extends JComponent {
        private BufferedImage backgroundImage;
        private BufferedImage foregroundImage;
        public Example(BufferedImage backgroundImage, BufferedImage foregroundImage) {
            this.backgroundImage = backgroundImage;
            this.foregroundImage = foregroundImage;
        public Dimension getPreferredSize() {
            int w = backgroundImage.getWidth();
            int h = backgroundImage.getHeight();
            return new Dimension(w, h); //assuming this is bigger
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int w = getWidth();
            int h = getHeight();
            //paint both, centred
            int x0 = (w-backgroundImage.getWidth())/2, y0 = (h-backgroundImage.getHeight())/2;
            g.drawImage(backgroundImage, x0, y0, null);
            int x1 = (w-foregroundImage.getWidth())/2, y1 = (h-foregroundImage.getHeight())/2;
            g.drawImage(foregroundImage, x1, y1, null);
        public static void main(String[] args) throws IOException {
            URL url1 = new URL("http://weblogs.java.net/jag/Image54-large.jpeg");
            URL url2 = new URL("http://weblogs.java.net/jag/DukeSaltimbanqueSmall.jpeg");
            JComponent comp = new Example(ImageIO.read(url1), ImageIO.read(url2));
            final JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(comp);
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }

  • Placing a PNG file with transparency

    If I have a psd / Png file on Photoshop that has text with no background (transparent), and I do a Place of that file into Illustrator, I get a white background in additiotion to the Text.
    How do I stop the white background from placing withing the Illustrator? I have Illustrator CS3 and Photoshop CS3
    Thanks in advance.
    Bob

    Half a decade later, I am getting the same problem as the original poster   (although I am using Illustrator CC 64bit on Windows 8).
    I am trying to 'place' a PNG graphic in Illustrator, The PNG has a transparent background, which is being honoured fine in other programs (e.g. web browsers - even in its icon in Windows Explorer).
    However when I place it in Illustrator, the transparency doesn't work: instead the background is displayed as an opaque colour. It stays that way if I output to a PDF from Illustrator.
    The PNG in question is a 'paletted' type (I think it has a palette of 256 colours) - one of which is set to be transparent.
    Does Adobe Illustrator not support transparency in paletted PNG files?
    (I'm aware that you can generate a 24-bit PNG with the transparency done as an 'alpha channel'), but this is wasteful for many simple types of graphic, creating a much bigger PNG file size.

  • Using PNG files with transparent background - Please Help

    I just purchased Elements to do a very specific task which I can’t do in Aperture. I am a former photoshopper (V.5) and excited to be back.
    I am doing a book/scrapbook and the majority of my text will be my own handwriting. I use white paper and black ink and I scan in at the highest settings. My goal is to create my handwriting on a transparent background so I can place it in my book as I choose. For this specific project (which is very large in scope) I wanted to keep my image/file management within Aperture.
    So I import my file (of my handwriting) from Aperture and successfully saved with a transparent background. Adobe said I had to save it as a PNG file. I noticed when I saved in Photoshop there was a warning saying I had to save as a copy.
    Aperture does not see the file when I try to import it back. My interchange between aperture and photoshop is fine otherwise. This problem only seems to be with “unflattened” layered images. When I flatten the image it is recognized by Aperture, but I lose the transparent background in Photoshop.
    If anyone sees flaws here or has a suggestion to “isolate” and save my personal handwriting image files I would greatly appreciate it. Thanks!

    Would probably work best if you first export from Aperture as PSD (if possible, like Lightroom) and then save to preserve layers.
    From the PSD save as PNG24 rather than PNG8 which is better for preserving transparency.

  • Saving PNG file with transparency

    Hello!
    In my application I generate "BufferedImage"s with transparent pixels. When I try to write them using ImageIO.write() in PNG format, the transparency information is lost.
    Can anybody send me working code for this problem?
    Thanks,
    Norbi

    What are you using to view the PNG? Are you sure it is a viewer that supports PNG transparency? Internet Explorer and the previewer built into Windows do not fully support PNG transparency so maybe that's the problem. See http://entropymine.com/jason/testbed/pngtrans/ for more info. I know for a fact the following code will generate a transparent PNG. Photoshop will read the transparency correctly but IE won't.
        public static final void main(String[] args) {
            // Create a new image with an alpha channel
            BufferedImage image = new BufferedImage(100,100,BufferedImage.TYPE_INT_ARGB);
            // Get a Graphics2D object that interfaces to the Image
            Graphics2D g2 = image.createGraphics();
            // Draw a red circle on the image
            g2.setColor(Color.RED);
            g2.fillOval(0,0,100,100);
            try {
                // Write the image to a PNG file,
                //  the red circle will have a transparent background
                ImageIO.write(image, "png", new File(args[0]));
            } catch (IOException e) {
                e.printStackTrace();
        }Anyone know how to do the equivalent with Jimi? This:Jimi.putImage("image/png", image, args[0]); only writes the PNG with a black opaque background.

  • Create .png file with transparency?

    I'd like to create an image on the server side, and save it as a .png file, and set the transparency. Is there some sample code or an article that would tell me how to get started? Thanks.

    com.sun.media.jai.codec.PNGEncodeParam.Palette
    * void setPaletteTransparency(byte[] alpha)
    sets the alpha values associated with each palette entry. The alpha parameter should have as many entries as there are RGB triples in the palette.
    * byte[] getPaletteTransparency()
    returns the alpha values associated with each palette entry.
         API: com.sun.media.jai.codec.PNGEncodeParam.Gray
    * void setTransparentGray(int transparentGray)
    sets the gray value to be used to denote transparency. Setting this attribute will cause the alpha channel of the input image to be ignored.
    * int getTransparentGray()
    returns the gray value to be used to denote transparency.
         API: com.sun.media.jai.codec.PNGEncodeParam.RGB
    * void setTransparentRGB(int[] transparentRGB)
    sets the RGB value to be used to denote transparency. Setting this attribute will cause the alpha channel of the input image to be ignored.
    * int[] getTransparentRGB()
    returns the RGB value to be used to denote transparency.

  • How to fix black borders around transparent PNG files?

    Hello,
    Recently, iMovie has started putting black borders around transparent PNGs. How can I fix this?
    http://img19.imageshack.us/img19/4668/picture9bt.png

    gndagnor wrote:
    Any way to fix the alpha transparency when importing PNG files to iMovie 09?
    I just know the two options - wrong (8bit) png or that plugin, which in an older version destroyed transparency..
    what also make transparent-to-black is, when you 'manipulate' the imported png, esp. adding a *KenBurns Effect* - that kills transparency instantly.
    for test purposes:
    • create a new project
    • create a new png with some traansparency
    • add new png to new project - same result?
    and just to avoid EVERY problem: your sys preferences/Monitor is set to 'million colors'?

  • Png file not transparent anymore!!!

    I had purchased a logo almost a year ago, I have been using it over and over again to place onto of my product photos. The file is a png file and it use to sho up transparent but now it doesnt and I dont know why?????????? Can anyone help me????

    A lot more details are needed before anyone can help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How do I open png files and maintain transparency?

    How do I open png files and maintain transparency?  I have many image files I had hoped to manage with aperture along with my photos.  I find that it wants to display them with a black bacground( they were designed for white) and when I want to edit that is kept even when I open with a psd format.  What do I do?
    Thanks

    and when I want to edit that is kept even when I open with a psd format.  What do I do?
    Transparency and layers are not supported in Aperture. You can import png-files or psd files with a transparent background and export the originals unchanged, but as soon as you edit them, the transparent background will be lost.
    Aperture is an application to manage photos and not graphics compositions, sorry.
    -- Léonie

  • Taking the transparent png files from net into Photoshop. It coming as flat not transparent. How can i do ?

    Hi,
    i want to take some transparent png files from internet into photoshop. The files originally transpernt on internet.
    Im copying that image and paste into photoshop but it won't transparent. therefore im saving the files my mac and using like that.
    But i dont want do this. Because this isn't problem in illustrator. Can anybody help me how can i use transparent png files as transparent in photoshop without save file?
    hope could explain my problem.

    If you can right click on the image and copy its utl to the clipboard you may ne able to open that in Photoshop with this old  Photoshop script.
    // OpenImageFromWeb.jsx
    // Copyright 2006-2009
    // Written by Jeffrey Tranberry
    // Photoshop for Geeks Version 3.0
    // modified by MLH
    // modified by JJMACK 2010
    Description:
    This sample script shows how to download images from a web server using the
    Socket object.
    // Note: Socket.read() parameter & behavior
    // Socket.read() will read or time out. It may not read all data fromserver. <---------------
    // Socket.read(999999) will read 999999 bytes, or timeout, or socket will be
    // closed by the server.
    // enable double clicking from the
    // Macintosh Finder or the Windows Explorer
    #target photoshop
    // Make Photoshop the frontmost application
    app.bringToFront();
    // SETUP
    var html = "";
    var request = "";
    var url = "";
    var binary = "";
    var requesthtml = "";
    var socket = new Socket;
    var domain = "www.mouseprints.net" // the domain for the file we want
    var sImg = "/old/dpr/JJMack8btiSrgb.png"; // the rest of the url for the file we want
    var port = ":80"; // the port for the file we want
    // MAIN
    var url = prompt("Enter the image's full URL http://domain/full image path",url);   // prompt for domain name
    if (url != null && url != ""){
      if ( (url.indexOf("http://") != -1)  || (url.indexOf("HTTP://") != -1)  ) {
      domainPathLength = url.length - "http://".length;
      domainPath = url.substr(7, domainPathLength);
      pathOffset = domainPath.indexOf("/");
      domain = domainPath.substr(0, pathOffset);
      sImg = domainPath.substr(pathOffset, domainPath.length - pathOffset );
      // Isolate Image name
      var Name =  sImg
      var imagePath = "";
      while (Name.indexOf("/") != -1 ) { // Strip Path
      imagePath= imagePath + Name.substr(0, Name.indexOf("/") + 1);
      Name = Name.substr(Name.indexOf("/") + 1 ,);
      //alert("domain = " +  domain + " , Image = " + sImg + " Image File Name = " + Name);
      if ( domain != "" && sImg != "" && sImg != "/" && Name.indexOf(".") != -1 ) {
      var f = File("~/" + Name); // Image file name
      f.encoding = "binary"; // set binary mode
      f.open("w");
      if (socket.open(domain + port, "binary")){
      //alert("GET " + sImg +" HTTP/1.0\n\n");
      requesthtml ="\n\nDmain:" + domain + " Port" + port + " binary\n"
      //request ="GET " + sImg +" HTTP/1.0\n\n"
      request ="GET " + sImg +" HTTP/1.0\nHost: " + domain + "\nAccept: image/gif, image/x-xbitmap, image/png, image/jpeg, */*\n\n";
      socket.write(request); // get the file
      var binary = socket.read(99999999);
      binary = removeHeaders(binary);
      f.write(binary);
      socket.close();
      else { alert("Connection to Domain:" + domain + " Port" + port + " Failed   ");}
      f.close();
      if (binary.length != 0) {
      //alert ("file length = " + binary.length );
      if(app.documents.length == 0) {
      //app.documents.add([width] [, height] [, resolution] [, name] [, mode] [, initialFill] [,pixelAspectRatio] [, bitsPerChannel] [,colorProfileName])
      app.documents.add(new UnitValue(1600,'px'), new UnitValue(1200,'px'), 72, null, NewDocumentMode.RGB, DocumentFill.WHITE, 1,BitsPerChannelType.EIGHT, "sRGB IEC61966-2.1" );
      placeSmartObject( f );
      f.remove(); // Remove temporary downloaded files
      else { alert("Invalid Image URL: " + url ); }
      else { alert("Invalid URL: " + url ); }
    else { if ( url == "" ) alert("No URL Entered"); }
    // FUNCTIONS
    function placeSmartObject(fileRef){
      //create a new smart object  layer using a file
      try {
      var desc = new ActionDescriptor();
      desc.putPath( charIDToTypeID( "null" ), new File( fileRef ) );
      desc.putEnumerated( charIDToTypeID( "FTcs" ), charIDToTypeID( "QCSt" ),charIDToTypeID( "Qcsa" ));
      desc.putUnitDouble( charIDToTypeID( "Wdth" ),charIDToTypeID( "#Prc" ), 100 );
      desc.putUnitDouble( charIDToTypeID( "Hght" ), charIDToTypeID( "#Prc" ), 100 );
      desc.putUnitDouble( charIDToTypeID( "Angl" ), charIDToTypeID( "#Ang" ), 0 );
      desc.putBoolean( charIDToTypeID( "Lnkd" ), true );
      executeAction( charIDToTypeID( "Plc " ), desc, DialogModes.NO );
      activeDocument.activeLayer.resize(100 ,100,AnchorPosition.MIDDLECENTER);
      activeDocument.revealAll();
      } catch (e) { alert("Placeing file: '" + fileRef + "' failed"); }
    // Remove header lines from HTTP response
    function removeHeaders(binary){
      var bContinue = true ; // flag for finding end of header
      var line = "";
      var httpheader = "";
      var nFirst = 0;
      var count = 0;
      while (bContinue) {
      line = getLine(binary) ; // each header line
      httpheader = httpheader + line;
      bContinue = line.length >= 2 ; // blank header == end of header
      nFirst = line.length + 1 ;
      binary = binary.substr(nFirst) ;
      if (httpheader.indexOf("Bad Request") != -1 || httpheader.indexOf("Not Found") != -1) {
      alert (requesthtml + request + httpheader);
      var binary = "";
      //alert (requesthtml + request + httpheader + "\nFile length = " + binary.length);
      return binary;
    // Get a response line from the HTML
    function getLine(html){
      var line = "" ;
      for (var i = 0; html.charCodeAt(i) != 10; i++){ // finding line end
      line += html[i] ;
      return line ;

  • Png files with transparent background show black only in firefox for android

    I have a wix created site and png files with transparent backgrounds are showing with a black blackground in Firefox for Android. They show transparent in all other browsers I have tried.
    I have tried saving the file as a gif, as a smaller png, interlaced, not interlaced, png 8, png24. It still shows black in Firefox for Android.

    Hi evelswoman,
    Thank you for your question. This sounds like a good one for the web compatibility team. Currently there are some compatibility documentation for background-image here: [https://developer.mozilla.org/en-US/docs/Web/CSS/background-image] and more details on background: [https://developer.mozilla.org/en-US/docs/Web/CSS/background]
    Filling a bug with webcompat.com with an example url can go a long way as well, I hope this helps.

  • How to Apply Color to Placed .PNG file in AI_CS2 & keep Transparency?

    So unfortunately I'm stuck with CS2, but it sure beats not having it at all.
    I'm importing a graphic icon that was saved from Photoshop as a .PNG file with transparency into AI_CS2. (I can open the .PNG and resave it with any options or as a different format as suggested.)
    Once I import this image, I'd like to apply particular swatches to it. However, I find I can only apply a swatch after I've run LiveTrace. My problem is that after I've done so, I lose the transparency that is essential to this icon.
    Can anyone assist me? I'd be much indebted to you!
    FYI, ultimately I plan on saving this as a graphic .EPS to import into InDesign CS2.
    Thank you! Please let me know if there are any clarifications I can make.
    Peace,
    Carrie Anne
    CS2, MacOSX 10.4

    For ease of discussion, I'm just going to reveal the graphic here. I really think I ought to be able to color something so simple. I've gone back into Pshop & converted this to grayscale (the original was cut from something with color in it).
    After placing it in AI, I still can't apply a color, and once I run LiveTrace, if I apply a color, it colors the entire bounding box, not just the inside of the path. Same is true even if I choose MagicWand and select the inside area first. What else do I need to do? Is there a path option I need to choose after running LiveTrace? Thanks!
    (FYI, I'm inserting a .gif here b/c the .png file appeared with black in the background, and grey fill in the panther. This should be a black panther with a transparent background, if it doesn't work here, hopefully you get the point.)

Maybe you are looking for

  • How to set MTA to accept mails from hosts on INTERNAL_IP only?

    Hello, I would like to config a messaging server with: - this mail server will accept incoming mails from hosts on INTERNAL_IP list only without authentication. - this mail server will accept to send mail for clients with SASL and TLS only, which mea

  • New User to the IPhone Family got some questions

    Hey guys, Well the IPhone4 is my first smart phone and I will have to say I love the thing. Except I'm experiencing some weird issues. First is the proximity sensor now I have done a lot of research and people are saying that there could be a fix for

  • Grid in drawing

    Hello, i am testing Pages as a AppleWorks user. Where is in Pages the menu to make a grid of for example 1mm (rastering). This would be very helpfull when working with drawing objects. Thanks Achim Message was edited by: Achim Bernlöhr

  • Database, user name, password for Crystal report

    We're running BOE XI 3.1 and we use WebI reports.  One of our departments uses Crystal reports, and they'd like to be able to run them in our BOE environment so that they can refresh reports over the Web.  They uploaded a report to BOE (using Add ->

  • Changing a user's username programatically

    Hi, I'm currently working on a java method to update a user's information on portal. I've been pretty successful using wwsec_oid.update_user_profile, but that doesn't (as far as i can tell) allow you to change a users' username. Is there a better way