Transparency in TGA images

I am trying to make a Targa file with a transparent background in CS4.  Searching help pages and google has given me no answers aside from saving as .gif or .png.
Can anyone either step me through or redirect me to somewhere that can tell me how I can make a transparent TGA IN CS4.  I dont want to go and get PS7 or CS2 or anything else, and the image MUST be a Targa.
Thanks in advance.

OK. Then you can optimize your loop a little by precalculating your color key:
int colorKey = 0xff000000 | TRANSPARENT_COLOR;
// notice I also flipped the order we iterate over the array since
// then you don't have to access rgbData.length (slower than a local var) every
// iteration, and comparing to 0 can be slightly faster.
for (int i = rgbData.length; i >= 0; ++i) {
  if (rgbData[i] = colorKey) {
    rgbData[i] = TRANSPARENT_COLOR;
}These are all micro-optimizations, and I don't know how much faster the routine will run. Maybe you need to redesign (for example call this slow routine only in places where it isn't time-critical like before each level).
shmoove

Similar Messages

  • Feature Request: TGA image previews in Creative Cloud Files

    Feature Request: TGA image previews in Creative Cloud Files (app & web) when browsing files in web and iOS App

    On a related topic, here's another Illustrator file with fonts displaying incorrectly, but this time it also has problems with the download links - the options for PNG, JPG and PDF do not appear at all.
    https://creative.adobe.com/file/2d6d788d-01e4-488d-90b8-46823f2017e2
    This is all very strange, because they did appear in a previous version of this very same file:
    https://creative.adobe.com/file/dae50071-9596-44ce-b525-3f52663f8cca
    Could it perhaps be related to the strange font behaviour?

  • CS3: PDF-Export Transparency Issue when Image-Links are missing

    I have a Layout with a transparent Frame on the top most Layer. For this Workflow-Step I do not have access to the original Image-Links, so I guess that all I see are the embedded Preview-Pictures and InDesign reports that all Object-Links are missing.
    If I export this Layout as JPG, the resulting JPG looks like the WYSIWYG in InDesign, which is suitable for this workflow-step. However when I export as pdf, the Frame is not transparent anymore. Instead it is filled with white color and covers the rest of the Layout. In Adobe Reader I can actually select the wrongly covered Picture at the border of the frame and copy&paste it somewhere and it looks fine.
    When I provide the original Frame-Picture and repair the missing Link in InDesign, PDF-Export works fine.
    I have installed & updated InDesign on a new Mac OS X 10.4.11, so all settings should be default.
    Transparency Blend Space is set to CMYK. I tried all default PDF-Export Profiles and tried a lot of different settings in the pdf-export dialogue including different PDF-File-Versions, Simulate Overprint on/off, Color-Conversion disabled, disabling Picture-Compression and much more. I also tried to Print a PS-File and then use the Distiller: same result.
    I use Adobe InDesign CS3 V 5.0.2 and tried Adobe Reader 8.1.2 and Adobe Acrobat Pro 8 to display.
    Any Ideas?

    Transparency flattening REQUIRES having access to the high-resolution images to get good results. One of the slogans I teach printers is "Fatten before you flatten." Meaning, replace the low-res images with high-res images.

  • How to set the transparency for a image

    Hi
    iam reading and writing and GIF image,when i resize the new image
    the transparency of the old image is not applied to the new one it appears black as background. so i need to set the transparency of the old image to the new GIF image . so is there any function to set the tranparency or any sample code....

    hi
    Image image = Toolkit.getDefaultToolkit().getImage(logoFilePath);
    image.getScaledInstance(200,150,Image.SCALE_SMOOTH);
    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.removeImage(image);
    mediaTracker.addImage(image,
    0);
    mediaTracker.waitForID(0);
    // determine thumbnail size from WIDTH and HEIGHT
    int thumbWidth = Integer.parseInt("200");
    int thumbHeight = Integer.parseInt("150");
    double thumbRatio = (double) thumbWidth / (double) thumbHeight;
    int imageWidth = image.getWidth(null);
    int imageHeight = image.getHeight(null);
    double imageRatio = (double) imageWidth / (double) imageHeight;
    int transparency = Integer.parseInt("100");
    if (thumbRatio < imageRatio)
    thumbHeight = (int) (thumbWidth / imageRatio);
    else
    thumbWidth = (int) (thumbHeight * imageRatio);
    if (imageWidth < thumbWidth && (imageHeight < thumbHeight))
    thumbHeight = imageHeight;
    thumbWidth = imageWidth;
    // draw original image to thumbnail image object and
    BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D graphics2D = thumbImage.createGraphics();
    graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);
    // save thumbnail image to OUTFILE
    out = new BufferedOutputStream(new FileOutputStream(newFilePath));
    GifEncoder gife = new GifEncoder(thumbImage,out);
    gife.encode();

  • How do i set the transparency of an image retrieved from a database? (image was stored as blob)

    I had stored a png image into a database, when i retrieve it and display it the background is no longer transparent?
    I am loading the blob returned from the select statement by using the "loadBytes" method of the "UILoader" class.
    Thanx in advance
    gv1979

    If you want to stick with adjusting the scale you can do this two ways. Edit the value graph or edit the speed graph.
    The problem is that a camera move, a zoom or a dolly in, is not linear and scale is. This means the graphs are not a good representation of what you'll see visually. This makes them hard to use. At a constant rate for scale the appearance is that the increase in size slows down to closer you get to the final value. In other words, as you scale an object up at a constant rate, the visual appearance is a gradual slowing.
    A speed graph edited to look like this gives the appearance of a constant rate scale of the layer when you expect an acceleration at the end. There's just not enough granularity in the graph editor or enough control to predictably achieve the results you want.
    You'll have better luck editing the value graph to look something like this:
    While this looks extreme, you will get closer to achieving the results you want using the value graph. Once again, the amount of control and the resolution of the graph combined with the visual tomfoolery that scaling an object brings with it makes this a difficult way to achieve predictable results.
    You select the graph you'll edit by clicking on the second icon from the left.
    As I said before, you'll have much better luck getting the look you want if you make the layer 3D and move a camera toward it.

  • Transparency in png image not showing

    Hello,
    I have a Region, which needs a background and an image 'on top' of it.
    I can set the background using
    setStyle("-fx-background-color: #" + 123456 + ";");
    Or I can just use a Rectangle of that colour.
    Then I have an ImageView...   spiralImgView = new ImageView(new Image("images/spiral2.png"));
    The png image itself has some transparency in it.
    So when I add them to the region...
    this.getChildren().addAll(rect, spiralImgView);
    I just get a white background showing behind the image.
    Can anyone help me fix this?
    Thanks

    I didn't do any coding.  This will tell you if it is your image:
    1)  Download and start JavaFX Scene Builder
    2)  Without making any changes paste "-fx-background-color: #1d1d1d;" into the "Style" box of the "Properties" window
    3)  Drag and drop an Image View into the scene from the "Library" window.
    4)  Click on the ImageView in the "Hierarchy" window.
    5)  In the "Properties" window Use the "Image" selector to find your img on disk
    If your image is mostly transparent it's background will not be white but #1d1d1d

  • Add ability to select background display color for transparent areas of image

    Right now the background color for images with an alpha channel if always white.  This makes Bridge useless for sorting through images where the primary color is white.  It also looks like crap when you are doing a slideshow preview on a black background.  It is only useful for people who do web page designs on a white webpage, but even then you can't tell if the image is cut out properly if it was cut from a white background.  The only way to check an image is to load it into Photoshop and create a background layer, which is pretty slow for previewing an entire directory of images.  The ability to set the alpha channel background color has been available for years in competing programs such as Thumbs+ so I am dumbfounded that it isn't yet in Bridge CS4.

    Agreed! Even primitive Mac Finder preview can show transparent alpha channel! Most Image browsing programs have this ability. Bridge CS4 is becomming finally usable, but this feature is a must!

  • Transparency in mutable image

    Hi all,
    I'm developing a j2me application with the following features:
    wtk 2.5.2
    cldc 1.1
    midp 2.1
    I have to show a image with a trasparency channel, loaded from a png file; on this image I have to write a number.
    The code is:
    icon = Image.createImage(32, 32);
    Graphics g = icon.getGraphics();
    Image logo;
    logo = Image.createImage(Image.createImage("/logo.png"), 0, 0, 32, 32, Sprite.TRANS_NONE);
    Font font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE);
    g.setColor(255, 255, 0);
    g.drawString("a number",
    (icon.getWidth()/2)-
    (font.stringWidth("a number")/2),
    (icon.getHeight()/2)-(font.getSize()/2),
    Graphics.TOP|Graphics.LEFT);
    I've also tried with drawRGB instead of drawImage:
    rawInt = new int[logo.getWidth() * logo.getHeight()];
    logo.getRGB(rawInt, 0, logo.getWidth(), 0, 0, logo.getWidth(), logo.getHeight());
    g.drawRGB(rawInt, 0, logo.getWidth(), 0, 0, logo.getWidth(), logo.getHeight(), true);
    g.drawString(Integer.toString(unaNave.getIdNave()),
    (icon.getWidth()/2)-
    (font.stringWidth(Integer.toString(unaNave.getIdNave()))/2),
    (icon.getHeight()/2)-(font.getSize()/2),
    Graphics.TOP|Graphics.LEFT);
    The problem is that the background is not transparent as in the image logo.png ... where am i wrong? Could it be a problem with the emulator (I'm using the one provided by the sun wireless toolkit)
    Thanx for help,
    have a nice day,
    Michela
    Edited by: m.montano on May 5, 2009 7:50 AM

    hmm strange. On wtk 2.5.2 (when configured to support alpha levels) I did not experience any problems with transparent and semi-transparent pixels.
    How do you fill the background? IIRC it is white by default on WTK, that is if white "shines through" non-white image pixels then it means image is transparent.
    I also wonder what do you expect from "0x5500FF00" color? Per "0xAARRGGBB" format in [lcdui.Graphics package|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html] javadoc, this sounds like partially transparent green; when mixed with default white background I would expect it to look as green. To see if it's opaque or not, I'd maybe use different alpha values in it, roughly like below:
    int j = 0;
    for (; j < logo.getWidth() * (logo.getHeight() / 3); j++)
      prova[j] = 0xFF00FF00; // opaque
    for (; j < logo.getWidth() * (logo.getHeight() * 2 / 3); j++)
      prova[j] = 0x0000FF00; // fully transparent
    for (; j < logo.getWidth() * logo.getHeight(); j++)
      prova[j] = 0x8000FF00; // half transparent

  • Loss of the transparent color in images inserted into Draw

    I need to float an oval portrait image over a background image, so to get to the oval I made the portrait image corner sections transparent using Graphic Converter and saving as a PNG, which supports the transparent color. Problem is that after the PNG image is inserted into the Draw document containing the background image, the transparent sections are black and not transparent. Anyone else know about this problem?

    Welcome to Apple Discussions Jim
    I've not had much success, & none recently, getting images to be transparent in AppleWorks. However, a few years ago I accidentally discovered that if the image is flipped or rotated the background will become transparent. Since you are using Graphic Converter, you can do what I did. Before saving the image in Graphic Converter flip it horizontally so that once imported into your AppleWorks document you can "re-flip" it & the background will be transparent. Another option is to rotate the object 1 degree in AppleWorks.
    I now use Pages for my desktop publishing & it has no problem with transparent PNG or GIF images.
    Peggy

  • Transparent box on image printing strage

    Hello,
    A .png image in a document has a transparent background, and it looks fine as a PDF, but is very clearly a different color when printed. Any thoughts on what this could be?
    Thanks!

    InDesignSecrets » Blog Archive » Eliminating YDB (Yucky Discolored Box) Syndrome

  • RE: Transparent areas on images used inPictureButton

    I have never had any success in getting Forte to recognize the transparent
    areas of GIF images on PictureButtons. I use two different techniques to
    achieve this "transparent" look:
    (1) Monochrome bitmaps DO behave as truly transparent images, both on
    PictureButtons and in OutlineFields, under all Forte's supported
    windowing systems and no matter what you use for the FillColor of
    the button or outline. (But then of course you can't use colours
    in your image.)
    (2) If the PictureButton's FillColor is Inherit or White, you will see
    that any white pixels in your image appear grey. You can make use
    of this by making the background of the image some colour which is
    not used in the picture itself, and setting the FillColor of the
    PictureButton to that colour. You have to choose this colour carefully.
    Even if you pick a colour from the standard Windows 16-colour palette,
    say red, you will find that it doesn't match the Forte colour Bright Red
    under all possible Control Panel colour depth settings. The only
    colours which work all the time are white, black and light grey (Forte's
    Gray 2) but of course these are all colours you normally want to use
    in the picture itself! If you are developing exclusively for Windows
    clients, you can always use Gray 2, since the PictureButtons are going
    to look this colour anyway, regardless of the FillColor you assign or
    the button colour the user has chosen in the Control Panel Display
    settings. (At least, this is so for V2 - I don't know about V3 but
    from what you've said it sounds like it is the same.)
    I would love to know if there are any other ways to do this because I
    nearly went mad trying to make images on PictureButtons and OutlineFields
    transparent under all 3 windowing systems!
    Fiona Symon,
    Babylon Software Pty Ltd.

    I tried expanding the canvas (using Photoshop) to a 16 x 9 width-to-height ratio with Black fill. Worked perfectly in iPhoto.
    Thanks for the tip about the wrong aspect ratio.

  • Transparency and Missing Images.....

    I've searched through the forums here and everywhere else and cannot come up with a solution to this:
    I've built a site using Dreamweaver and have added .swf's for some navigation and my personal portfolio.  Using Firefox, some of my images are not showing up at all and in Safari there is no transparency!  I've used the swfObject.js file thinking that would take care of the issues but it hasn't.
    Here is a link:  http://www.scottvezina.com/PortfolioPage.html
    Any help at all would be appreciated!
    Thanks in advance,

    I now have a hint:
    As a colleague said, he encountered some problems with usagerights on our fileserver (XServe). He said he wasn't able to read files he put on the server himself again…
    If this is true, the same could have happened to Keynote for placed images, as Keynote writes these images as separate files in the doc package…
    I will try to work on my local volume and see if it solfes the problem.
    But sooner or later I will have to place the whole thing on the server again…
    Do you think this is the reason?

  • How to exclude transparent areas in Image Trace

    I have a logo file, saved as PNG, that is black on transparent.  Very simple file, just stylized black lettering on a transparent background. In Illustrator CS5, I can place that file, do a "Live Trace" in "Lettering" mode, and Illustrator will correctly ignore the transparent areas when I expand the trace.  After expanding, I'm left with scalable paths and an easy way to change the fill color to have the logo work with my background.
    Fast forward to Illustrator CS6.  I try to do the same thing but a) there is no "lettering" preset for Image Trace and b) there is no setting I have yet found to cause Illustrator to ignore the transparent areas when I expand.  If I then fill, everything inside the bounds of the placed image (the square containing the logo) is filled with that color.  The only way I've found to get similar results is to go through the layers panel after the Expand and deselect each piece of the image that should not be filled.  I have a hard time believing this is the desired approach.
    I freely admit that I'm an Illustrator novice and I suspect that there is something one of you Illustrator experts thinks is obvious that I'm missing.  I'd sure appreciate some guidance in the right direction.

    I doubt that the Trace feature in CS 6 is a big improvement to CS 5
    Here look what might help you with this you might even be able to do a better job in Photoshop.
    I'm using your screen shot so the trace is not a good one but shows you the steps you can take to make this work better.
    Even though it is an image you can edit the colors some what here I went to Edit>Edit Colors>Adjust Color Balance ad turn the Cyan down to "0" and move the black slide a bit higher as well.
    The I did my trace and remove the clipping paths there are 2 clipping paths the way you remove the path and compund path for the square is to select one edge of the psth with the direct select tool, you need smark guides turned on to see the paths.
    the hit delete and the hit delete again and repeat for the second compound path as such path willpreven the sqaure to becoming a background filled path.
    It should be noproblem filling this without a Live Paint Group it is just that you are not familiar with what is happening to the art.

  • No Transparency on PNG image problem

    I'm trying to create an ImageIcon that uses a transparent PNG image. I have set a particular colour on the image itself to be transparent in Corel PhotoPaint, and when i view the .png image that is output this colour is transparent.
    However, when i then load this png image into my Swing app, using it as an ImageIcon, the transparent colour is no longer transparent, and the original colour can be seen in its place.
    Anyone have any ideas?
    Cheers

    I'm trying to create an ImageIcon that uses a transparent PNG image. I have set a particular colour on the image itself to be transparent in Corel PhotoPaint, and when i view the .png image that is output this colour is transparent.
    However, when i then load this png image into my Swing app, using it as an ImageIcon, the transparent colour is no longer transparent, and the original colour can be seen in its place.
    Anyone have any ideas?
    Cheers

  • RE: Transparent areas on images used inPictureButtons

    Thanks all for the responses.
    I have talked with Forte Tech Support and there is a way to get this to
    work. To get transparent areas in an image on a PictureButton, you
    simply manipulate the FillColor of the PictureButton widget itself.
    Apparently, Forte takes the fill color of the button and makes it the
    transparent color for the image. For instance, if you set the fill color
    for the PictureButton to white, then any white areas on the image become
    transparent.
    A Tech Note should appear shortly explaining this issue.
    >
    I have a GIF image with transparent areas that I'd like to use in a
    PictureButton. Will Forte recognize the transparent areas in the GIF
    format and color those areas with the system settings for buttons? I've
    tried everything I could think of, but the transparent areas are still
    being painted gray.
    I am running Forte 3.0d on Windows 95.
    Van Vuong
    Lead Technical Analyst
    Office: 972.985.5289
    VoiceNow: 972.330.0822
    Internet: [email protected]
    PAGE NET

    I tried expanding the canvas (using Photoshop) to a 16 x 9 width-to-height ratio with Black fill. Worked perfectly in iPhoto.
    Thanks for the tip about the wrong aspect ratio.

Maybe you are looking for

  • Check pont not complete

    hi is it true that Increasing the size of redo log will avoid 'Check point not complete' message in alert log. One more thing, Is there any redo generate while taking export. Version 10g Rel 2 Thanks in advance

  • Link to tabbed panel works once, but not again

    I have successfully linked from text in one tabbed panel to open another panel on the same page, using SpryURLUtils.js. <a href="?tab=2#TabbedPanels1"> var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params

  • Just remove links, not text from OCR

    Using Acrobat 11 Pro: I have some pdf's that have been on our website for several years. We have a pdf link checker tool that has been parsing the pdf's for links.  I cannot turn off the links.  I have used javascript removelinks, I have went to acti

  • Will online number send call to phone with Freetal...

    Hello, I am interested in online number but I can't enough information. I have a phone hooked to skype via freetalk with a subscription. With online number, can I receive calls on that phone? What if I am logged in on mobile skype on my cell phone, w

  • Macbook Air 1,1 - Mac OS X 10.6.8 - Starting from scratch...

    Hi, I just got a Macbook Air 1,1 with OS X ver. 10.6.8... The previous owner gave it to me as is, whit almost full disk so I want to erase everything and start from scratch. I'm  a nubie, this is the first Mac I own, but after googling around it seem