1 pixel transparency

How do a create a 1 pixel transparent GIF file directly over the image using HTML layout settings ?
joel

Something perhaps like...
<div>
<img style="position:absolute;top:0;left:0" width=800 height=600 src="ImageYouDon'tWantEasilyCopied.jpg">
<img style="position:absolute;top:0;left:0" width=800 height=600 src="Transparent.gif">
</div>
-Noel

Similar Messages

  • Making pixels transparent

    I was wondering if it was possible to make a single pixel in a BufferedImage transparent.
    I tried the following code but that just made it white:
    image.setRGB(x, y, -1);
    Though when I requested info on transparent pixels they seemed to return -1 as their RGB value.

    Let's talk about hex. -1 is 0xffffffff, and in sRGB format (AARRGGBB) - opaque and full
    instensity red, green and blue: in other words opaque white. Transparent white would be 0x00ffffff.
    Try that.

  • Transparency/Transparent Pixels.

    Okay, I'm trying to get transparency working properly, but it's being a pain. I need to know a few things, which I can't locate online.
    1) Is alpha 0 opaque or is alpha 255?
    2) In the java docs they always refer to alpha as between 0.0 and 1.0; is it correct to assume 1.0 = 255? I remember in Flash it was reversed.
    3) Is transparency(either Bitmask or Transluscent) enabled by default for whatever image/buffer an applet uses?
    4) Is there anything I have to do other than g.setComposite(AlphaComposite.Src); to make it work in theory?
    Here's the thing - if I check the transparent colour on my backbuffer, it has alpha 255. I've got the BufferedImage set up as TYPE_INT_ARGB, and I call setComposite before drawing. Despite that, it insists on copying pixels with 255 alpha when I call drawImage();
    I'm baffled as to why. I tried some Java2D tutorials, and they don't seem to work when I copy the code in and compile it? Well, maybe someone can link me to a tut that applies to Java 1.5/1.6

    Here's an example I threw together, it draws a 100*100 blue square, then a smaller pink (half-alpha red) square in the middle of it.
    package sandbox2;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Toolkit;
    import java.awt.image.BufferedImage;
    import javax.swing.JFrame;
    public class TransEx extends javax.swing.JPanel {
        int width = 100;
        int height = 100;
        BufferedImage bimage;
        public TransEx() {
            this.setSize(width, height);
            // Create an image that supports arbitrary levels of transparency
            bimage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB_PRE);
            Graphics2D g2d = bimage.createGraphics();
            // Make all filled pixels transparent
            Color blue = Color.BLUE;
            g2d.setColor(blue);
            g2d.fillRect(00, 00, 100, 100);
            Color pink = new Color(255, 0, 0, 63);
            g2d.setColor(pink);
            g2d.fillRect(20, 20, 60, 60);
            g2d.dispose();
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            frame.add(this);
            frame.setSize(200, 200);
            frame.setVisible(true);
        public void paintComponent(Graphics g) {
            g.drawImage(Toolkit.getDefaultToolkit().createImage(bimage.getSource()), 0, 0, this);
        public static void main(String[] args) {
            new TransEx();
    }I was using setComposite(AlphaComposite.Src); on the bimage's graphics context, and it was drawing the pink square as solid red. It worked when I took that out.

  • WS_EX_LAYERED from bitmap uses black as transparency mask

    I'm trying to display a transparent 32bit bitmap on a WS_EX_LAYERED hwnd and set the per-pixel transparency with it, but somehow it looks that the transparency is decided by black pixels instead of the bitmap's alpha value.
    Here's the result with a black bitmap with few colored circles over it :
    Code :
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    LPCWSTR szWindowClass = L"TransparentClass";
    WNDCLASSEX wcex = { 0 };
    wcex.cbSize = sizeof(WNDCLASSEX);
    wcex.lpfnWndProc = DefWindowProc;
    wcex.hInstance = hInstance;
    wcex.lpszClassName = szWindowClass;
    RegisterClassEx(&wcex);
    HWND hWnd = CreateWindowEx(WS_EX_LAYERED, szWindowClass, 0, WS_OVERLAPPEDWINDOW,
    CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
    HBITMAP hbmp = (HBITMAP)LoadImage(GetModuleHandle(NULL), L"C:\\Users\\Domenico\\Desktop\\mask.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    //LPBYTE bits = (LPBYTE)hbmp;
    //int sizet = 500 * 500;
    //for (int pixel = 0; pixel != sizet; ++pixel)
    // bits[0] = bits[0] * bits[3] / 255;
    // bits[1] = bits[1] * bits[3] / 255;
    // bits[2] = bits[2] * bits[3] / 255;
    // bits += 4;
    HDC hdcScreen = GetDC(0);
    HDC hdc = CreateCompatibleDC(hdcScreen);
    ReleaseDC(0, hdcScreen);
    HBITMAP hbmpold = (HBITMAP)SelectObject(hdc, hbmp);
    POINT dcOffset = { 0, 0 };
    SIZE size = { 500, 500 };
    BLENDFUNCTION bf;
    bf.BlendOp = AC_SRC_OVER;
    bf.BlendFlags = 0;
    bf.SourceConstantAlpha = 255;
    bf.AlphaFormat = AC_SRC_ALPHA;
    UpdateLayeredWindow(hWnd, 0, 0, &size, hdc, &dcOffset, 0, &bf, ULW_ALPHA);
    SelectObject(hdc, hbmpold);
    DeleteDC(hdc);
    DeleteObject(hbmp);
    ShowWindow(hWnd, SW_SHOW);
    MSG msg;
    // Main message loop:
    while (GetMessage(&msg, NULL, 0, 0))
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    return (int)msg.wParam;
    Is it this the default behaviour to check for transparency ? I need black pixels to recreate a custom shadow-like effect.
    I tried to multiply every bitmap's pixel as suggested in MDSN doc but I'm getting access violation while trying to do so.
    Last question : Is it possible to repaint the whole window with a new bitmap at runtime ? Since you have call the updatelayeredwindow function before showing the window I'm thinking it should be impossible, right ?

    I'm trying to display a transparent 32bit bitmap on a WS_EX_LAYERED hwnd and set the per-pixel transparency with it, but somehow it looks that the transparency is decided by black pixels instead of the bitmap's alpha value.
    Here's the result with a black bitmap with few colored circles over it :
    Code :
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    LPCWSTR szWindowClass = L"TransparentClass";
    WNDCLASSEX wcex = { 0 };
    wcex.cbSize = sizeof(WNDCLASSEX);
    wcex.lpfnWndProc = DefWindowProc;
    wcex.hInstance = hInstance;
    wcex.lpszClassName = szWindowClass;
    RegisterClassEx(&wcex);
    HWND hWnd = CreateWindowEx(WS_EX_LAYERED, szWindowClass, 0, WS_OVERLAPPEDWINDOW,
    CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
    HBITMAP hbmp = (HBITMAP)LoadImage(GetModuleHandle(NULL), L"C:\\Users\\Domenico\\Desktop\\mask.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    //LPBYTE bits = (LPBYTE)hbmp;
    //int sizet = 500 * 500;
    //for (int pixel = 0; pixel != sizet; ++pixel)
    // bits[0] = bits[0] * bits[3] / 255;
    // bits[1] = bits[1] * bits[3] / 255;
    // bits[2] = bits[2] * bits[3] / 255;
    // bits += 4;
    HDC hdcScreen = GetDC(0);
    HDC hdc = CreateCompatibleDC(hdcScreen);
    ReleaseDC(0, hdcScreen);
    HBITMAP hbmpold = (HBITMAP)SelectObject(hdc, hbmp);
    POINT dcOffset = { 0, 0 };
    SIZE size = { 500, 500 };
    BLENDFUNCTION bf;
    bf.BlendOp = AC_SRC_OVER;
    bf.BlendFlags = 0;
    bf.SourceConstantAlpha = 255;
    bf.AlphaFormat = AC_SRC_ALPHA;
    UpdateLayeredWindow(hWnd, 0, 0, &size, hdc, &dcOffset, 0, &bf, ULW_ALPHA);
    SelectObject(hdc, hbmpold);
    DeleteDC(hdc);
    DeleteObject(hbmp);
    ShowWindow(hWnd, SW_SHOW);
    MSG msg;
    // Main message loop:
    while (GetMessage(&msg, NULL, 0, 0))
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    return (int)msg.wParam;
    Is it this the default behaviour to check for transparency ? I need black pixels to recreate a custom shadow-like effect.
    I tried to multiply every bitmap's pixel as suggested in MDSN doc but I'm getting access violation while trying to do so.
    Last question : Is it possible to repaint the whole window with a new bitmap at runtime ? Since you have call the updatelayeredwindow function before showing the window I'm thinking it should be impossible, right ?
    1. Transparency in BGRA (32 bpp) bitmaps is controlled by the Alpha byte. When A is 0 the pixel is completely transparent, when A is 255 the pixel is completely opaque.
    2. HBITMAP doesn't point to the pixels. Given an HBITMAP, there are APIs to get and set the pixels: GetDIBits, SetDIBits.
    3. To repaint the window, call UpdateLayeredWindow again.

  • Gradients foreground color to transparent

    CS4, using gradient tool on toolbar
    Obviously, I'm not understanding something, or I'm doing something wrong. What is it?
    Here's what I did:
    Create one layer and fill it with black.
    Create a second layer above black layer and select it. Open gradient tool.
    The gradient tool has the 4 blocks, two at each end. I use the lower left block to set the color to blue, and I leave the block above it to 100% opacity.
    I use the lower right hand block and set the color to white. I set the opacity to 0 in the upper right hand block.
    I draw the gradient on the new layer. I'm execting to see a blue gradient that fades to black, but rather it fade to white.
    Why is this?
    More importantly, what do I have to do to get the gradient to fade from blue to 100% transparency to reveal the color of the lower layer (black in this case).
    TIA.

    I now have the pixel transparent gradient working. Utlimately, it was user error, though
    I think the design leaves a bit to be desired.
    The problem was, I had not notice the checkbox for "Transparency" on the gradient's option panel. It was not checked. As soon as I checked it, I was able to drop transparent gradients on the transparent layer and they worked as expected. Personally, I would think if one designed a gradient with 0% opacity at one end, that should be enough to have a foreground color to transparent gradient. Don't know why there's the second step.
    But, all is good.
    Thanks for your assistance.

  • Transparent areas appears black

    Some images that use transparency when displayed on a web page, display black in the transparent zones when viewed in Photoshop Elements.
    If I edit the images and load them to a web site, the zones display as transparent or black depending on the file format (PNG, GIF, JPG) and other elements I haven't been able to isolate.
    What is this due to and how can I get transpency to display correctly when it appears black in Photoshop Elements?
    thx,
    Marc
    Ascendo

    Here is exactly what I am doing. I copy the "folder" image from the "get info" page (following a tutorial online to do my own folder icons). This is what the image pasted into SEASHORE looks like:
    (the checkered background is the transparency)
    This is what happens when I paste the same image into photoshop:
    (that is the channels and layers included as requested)
    You will notice that the background is NOT transparent, but white. I have checked the "transparent background" upon creation, and before pasting this item, Layer 1 was a 512 by 512 pixel transparent document. I have tried RGB 8, 16, 32 bit, and CMYK but those are not working. Any help will be greatly appreciated.

  • Transparent image not recognized as transparent

    I am loading a PNG with transparency into a UILoader. This
    part works correctly, transparency and all.
    Now I need to find out the rectangle that is transparent. I
    found the getColorBoundsRect() function, and copied the
    UILoader.content into a bitmapData, but when I run the
    getColorBoundsRect it comes back with a Rectangle that has no width
    or height - IE, it finds no transparent pixels.
    To test, I tried using getPixel32 on an area of the image I
    know is transparent, and it comes back to tell me that the pixel
    alpha is 255?
    Applicable code is attached.

    I am an idiot. I forgot to set a parameter in the BitmapData
    constructor, which tells it to keep transparent pixels transparent.
    BitmapData defaults to changing transparent pixels to white, which
    is why I was having problems.
    var clBD:BitmapData = new
    BitmapData(735,600,true,0x00FFFFFF);

  • Transparent Color

    I am very new to Photoshop and am I find it has so many bells and whistles that I can't get it to do anything I want it to so I'll be posting a lot of dumb questions here. I've found "search" to be of no help. And the tutorials I've checked out assume I know what they're talking about. You can just point me in the direction of an understandable help file, if one exists.
    I have scanned some .jpg images I want to use in a web page. The image I want is surrounded by white. There must be some way to make that white transparent so that on the web page the image displays without the white, i.e., the background color of the page surrounds the image.
    Heck! I don't even know how to properly pharse these questions. I hope someone can figure out what I'm trying to ask!
    Can do? How?
    Thanx,
    Mike

    Welcome to the world of Photoshop!
    I'm afraid you need to familiarize yourself with the basic terminology if you are going to understand the 1000s of tutorials. A good place to start is with the on-line Help files accessible by pressing F1. You have to realise that Photoshop is for graphics professionals. you might be better with Photoshop Elements which has step-by step guides to all the common tasks.
    You might find a basic beginners' book is a help too – you are never going to learn how to use the program properly by firing questions at this forum.
    For your current task, this entry from Photoshop Help is a lead-in:
    Transparency makes it possible to create nonrectangular images for the web. Background transparency preserves transparent pixels in the image. This allows the background of the web page to show through the transparent areas of your image. Background matting simulates transparency by filling or blending transparent pixels with a matte color that can match the web page background. Background matting works best if the web page background is a solid color and if you know what that color is.
    Use the Transparency and Matte options in the Save For Web & Devices dialog box to specify how transparent pixels in GIF and PNG images are optimized.
        * (GIF and PNG-8) To make fully transparent pixels transparent and blend partially transparent pixels with a color, select Transparency and select a matte color.
        * To fill fully transparent pixels with a color and blend partially transparent pixels with the same color, select a matte color and deselect Transparency.
        * (GIF and PNG-8) To make all pixels with greater than 50% transparency fully transparent and all pixels with 50% or less transparency fully opaque, select Transparency and select None from the Matte menu.
        * (PNG-24) To save an image with multilevel transparency (up to 256 levels), select Transparency. The Matte option is disabled since multilevel transparency allows an image to blend with any background color.
          Note: In browsers that do not support PNG-24 transparency, transparent pixels may be displayed against a default background color, such as gray.
    To select a matte color, click the Matte color swatch and select a color in the color picker. Alternatively, select an option from the Matte menu: Eyedropper Color (to use the color in the eyedropper sample box), Foreground Color, Background Color, White, Black, or Other (to use the color picker).
    Note: The Foreground Color and Background Color options are only available in Photoshop.

  • Image transparency

    Hi all.
    Would anyone please help me with a problem I have.
    I want to be able to induce transparency into a image. What I have is an image loaded from a jpg file (Image is white background with black writing in the center). This image contain 2 basic colours, black and white. What I want to do it create a class that will filter out all the white coloured pixels and make these pixels transparent (See though).
    I have look online and only found how to make the whole image transparent using the AlphaComposite class.
    I have also look at the Java documentation for help. I found that you can run an image though a filter. One such class is 'FilteredImageSource' this class's constructor looks like this: 'FilteredImageSource(ImageProducer orig, ImageFilter imgf) ' For the first argument i can use 'Image.getSource()' but the 2nd argument requires a class implementing the 'ImageConsumer' interface. The 'BufferedImageFilter' class implements the 'ImageConsumer' interface but the this class takes a argument of 'BufferedImageOp' (Interface). I think that I must use the 'ColorConvertOp' subclass of the 'BufferedImageOp' interface to achive replace a color.
    Here is where I get lost. It starts asking for arguments of type 'ColorSpace'. I have look at these classes and that you need to be a rocket scientist to create a 'ColorSpace' object to refer to a color. This is where I'm stuck. I have seen programs that got click on the color and it makes that color transparent (Mostly gif creators) but I want my program to do it to load images. You should be able to load any image and select the color to make transparent. The program should load the image, filter the image and them display the filtered image.
    Please could you help me. If someone could show me how to obtain the 2nd argument to 'FilteredImageSource(ImageProducer orig, ImageFilter imgf)', so that the color i choose can be made transparent. If an explination can be given as well.
    Any help would be greatly appreciated.
    Thanks
    (MC3)RaVeN

    You don't have to get that complicated. After you read the image from a file (jpg, png, etc), you can copy the image, but using a TYPE_INT_ARGB image instead of just a TYPE_INT_RGB.
         Creates a copy of the specified image, except that pixels of the specified color
         are transparent.
         public static BufferedImage createTransparentImage(BufferedImage bi, Color c) {
              int w = bi.getWidth();
              int h = bi.getHeight();
              BufferedImage out = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
              int rgb = c.getRGB();
              for (int i = 0; i < w; i++) {
                   for (int j = 0; j < h; j++) {
                        int _rgb = bi.getRGB(i, j);
                        if (_rgb == rgb) {
                             _rgb = 0x00ffffff & rgb;
                        out.setRGB(i, j, _rgb);
              return out;
         }

  • [CS4/JS] Pnglib.jsx -- A PNG creator function

    After seeing Marc Autret's marvellous pngswatch script, I spent several hours creating PNGs with Photoshop, copying its hex data into Javascript compatible format, finding the relevant color bytes to change ... and all the while I was thinking, "there was an uncompressed PNG format, wasn't there?"
    That's not because I have a bad memory.
    Sure, Marc created his PNG in some other program, saved it as a compressed file, and 'only' changed the palette part in his script -- which involves delving quite deeply into the actual PNG format --, and that's a feasible way of doing the stuff he intended to: change jsut the color. But if you want to actually create a dropdown or listbox image on the fly -- say, for a line widths dropdown --, you have to be able to create an entire image a-new. And PNGs are notoriously difficult to create, because the image pixels themselves are compressed using the very advanced zlib compression.
    But (as I was thinking) ... zlib also allows a "non-compressed" format!
    With some sleuthing I found a couple of hints to get me started, and found a totally useful utility as well: pngcheck, which can take a PNG to bits and tell you what's wrong with it. So, here you have it: a lightweight PNGLIB Javascript, that can create any PNG right out of nothing!
    Any image, apart from the limitations, that is.
    Its main limitation is that you can only create 8-bit palettized PNGs with it. I see no reason to add umpteen functions to cater for the occasional 1-, 2-, or 4-bit or true color PNG, or to add total support for all the different types of transparency that PNG supports. But, hey, its main use is for icons, and you'll have to do with the limits of "just" 256 colors -- or even less than that, if you reserve one or more colors for transparency. On the plus side again, it's total real pixel alpha-level transparency we're talking about (overall that can make your graphics still better than the average '90s DOS game).
    Using the function is easy; at the bottom of the script is an example, but it boils down to:
    Create a string for the palette's colors. Each color is a triplet, in RGB order.
    Create a string for the transparency indexes. Each single entry determines the transparency of the full palette color at that index; the first entry applies to color index #0, the second to color index #1, and so on. The value [00] indicates zero opacity (fully transparent), the value [FF] full opacity. The transparency index string doesn't need to define all of your colors' transparencies; unlisted values are "normal", non-transparent, and if you only need to make color index #0 transparent, you are done right there and then. By the way, the transparency string may be omitted entirely if you don't need it.
    Create a string for the image itself -- wide x high color indexes. Make sure you fill the entire image, 'cause my function will refuse to work if this string length isn't correct.
    Then call my function: myImg = makePng (wide, high, palette, pixels [, transparency]);
    The returned string can be used immediately as a source for a ScriptUI dialog image, or -- less useful, but might come in handy -- be written to a file.
    Tips: hmm. I dunno. Don't use this function to create super-huge PNGs, I guess. The non-compression format uses a couple of checksums on its own, and they are sure to fail on very large images. But, come on, be realistic: it's not a Photoshop replacement we're talking about, it's for icons!
    And Be Kind to Your Users: it's rather overkill to include all of the data for a static PNG image, such as a logo or something. Just create that once, and include the binary data in your script! This function is designed to create PNGs on the fly, from variable rather than static data.
    Before I forget: here it is. Enjoy!
    /****** PngLib.jsx ******/
    /* A Jongware Product -- based *very* heavily, however, upon Marc Autret's pngswatch
    /* script (http://forums.adobe.com/thread/780105?tstart=0), and with further
    /* help from the pages of David "Code Monk" Jones (http://drj11.wordpress.com/2007/11/20/a-use-for-uncompressed-pngs/)
    /* and Christian Fröschlin (http://www.chrfr.de/software/midp_png.html)
    /* Any errors, of course, must have crept in while I wasn't paying attention.
    /* [Jw] 26-Jan-2010
    var makePng = (function()
         // Table of CRCs of 8-bit messages
         var CRC_256 = [0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x1db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x6b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0xf00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x86d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x3b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x4db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0xd6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0xa00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x26d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x5005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0xcb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0xbdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
         // PNG Cyclic Redundancy Code algorithm -- http://www.w3.org/TR/PNG/#D-CRCAppendix
         var crc32s = function(/*uint[]*/buf)
              var c = 0xffffffff, i;
              for( i=0 ; i < buf.length; i++ )
                   c = CRC_256[(c ^ buf.charCodeAt(i)) & 0xff] ^ (c >>> 8);
              return (c ^ 0xffffffff);
         var header = function ()
              return "\x89PNG\x0D\x0A\x1A\x0A";
         var i2s = function (/*int32*/i)
              return String.fromCharCode(i>>>24) + String.fromCharCode(i>>>16) + String.fromCharCode(i>>>8) + String.fromCharCode(i);
         var chunk = function (/*4 Char PNG code*/chunkType, /*data*/data)
              var buf = chunkType + data;
              var crc = crc32s(buf);
              buf = i2s (data.length) + buf + i2s (crc);
              return buf;
         var adler32 = function (/*string*/buf)
              var i, a = 1, b = 0;
              for (i=0; i<buf.length; i++)
                   a += buf.charCodeAt(i); s1 %= 65521;
                   b += a; b %= 65521;
              return (b<<16)+a;
         return function(/*int*/wide, /*int*/high, /*string*/ pal, /*string*/image, /*string*/transpIndex)
              var t, bits;
              if (pal.length % 3)
                   alert ("Bad Palette length -- not a multiple of 3");
                   return null;
              if (image.length != high*wide)
                   alert ("Size error: expected "+(high*wide)+" bytes, got "+image.length);
                   return null;
              bits = '';
              for (t=0; t<high; t++)
                   bits += "\x00"+image.substr(t*wide, wide);
              t = bits.length;
              bits += i2s (adler32(bits));
              var r = header() + chunk ('IHDR', i2s (wide)+i2s(high)+"\x08\x03\x00\x00\x00");
              r += chunk ('PLTE', pal);
              if (transpIndex != null)
                   r += chunk ('tRNS', transpIndex);
              r += chunk ('IDAT', "\x78\x9c\x01"+ String.fromCharCode (t & 0xff)+String.fromCharCode((t>>>8) & 0xff)+String.fromCharCode ((~t) & 0xff)+String.fromCharCode(~(t>>>8) & 0xff)+bits);
              r += chunk ('IEND', '');
              return r;
    /* Sample usage. Remove when #including the above in _your_ script! */
    var pngPal  = "\x00\x00\x00"+"\xff\x00\x00"+"\x00\xff\x00"+"\x00\x00\xff"+"\xff\xff\x00"+"\x40\x40\x40";
    var pngData =     "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05";
    img = makePng (10,11, pngPal, pngData, "\x40");
    var w = new Window("dialog", "Image test");
    w.add ('image', undefined, img);
    var f = new File(Folder.myDocuments+"/test-me2.png");
    if (f.open('w'))
         f.encoding = "BINARY";
         f.write (img);
         f.close();
    } else
         alert ("eh -- couldn't write test file...");
    w.show();

    Here is a more complicated (and useful ) example. (--Its actual usefulness is not as, erm, useful as I hoped, because it seems you don't have access to the built-in stroke styles! If anyone knows a work-around that, let me know ...)
    First, create a few custom Striped and/or Dashed stroke styles; then call this Javascript to see them created "live" in the drop down. Make sure you removed the sample code from the end of "pnglib.jsx", otherwise that dialog with interfere and mess up my nice program.
    #include "pnglib.jsx"
    function createStripeImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, ystart;
         var stripes = [];
         var i;
         for (y=0; y<app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray.length; y++)
              stripes.push (Math.round (11*app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray[y]/100));
         i = 0;
         for (y=0; y<11; y++)
              if (y >= stripes[i])
                   if (y <= stripes[i+1])
                        for (x=0; x<48; x++)
                             pngData += "\x00";
                        continue;
                   i += 2;
              for (x=0; x<48; x++)
                   pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    function createDashImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, xstart;
         var dashes = [];
         var i, len;
         len = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              len += app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y];
         xstart = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              dashes.push (xstart);
              xstart += Math.round (48*app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y]/len);
         dashes.push (47);
         i = 0;
         for (y=0; y<11; y++)
              if (y < 3 || y > 8)
                   for (x=0; x<48; x++)
                        pngData += "\x01";
              } else
                   xstart = 0;
                   for (x=0; x<48; x++)
                        if (x >= dashes[xstart])
                             if (x >= dashes[xstart+1])
                                  xstart += 2;
                             pngData += "\x00";
                        } else
                             pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    if (app.activeDocument.stripedStrokeStyles.length+app.activeDocument.dashedStrokeStyles.length < 1)
         alert ("This example needs a few custom stripe or dash stroke styles to play with");
         exit (0);
    var w = new Window("dialog", "Select a stripe type");
    var ddl = w.add("dropdownlist");
    for( i=0; i < app.activeDocument.stripedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.stripedStrokeStyles[i].name)).image = createStripeImg (i);
    for( i=0; i < app.activeDocument.dashedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.dashedStrokeStyles[i].name)).image = createDashImg (i);
    ddl.selection = 0;
    g = w.add ("group");
    g.orientation = 'row';
    g.add ("button", undefined, "OK");
    g.add ("button", undefined, "Cancel");
    w.show();

  • Can't remove white halo surrounding image.

    Hi, everyone.
    I've tried to clean some logos I need to use for web site pages but haven't really had good results. As I save the images as PNG to preserve the transparent background and place the images on my web page I can clearly see a white halo or silhouette surround the borders of the image. Just so that you understand my workflow this is what I have tried:
    1. Open the image in photoshop.
    2. Set background layer to a regular layer so I can remove the background color.
    3. Choose Magic Wand. Set the sensitivity to a value between 50 and 120 to choose all background color which is white. Also uncheck contiguous so all the background color is removed despite its location on the image.
    4. Crop image to close in on logo.
    5. Resize image to a resolution of 96 pixels per inch and width of 120-140 pixels (height can vary according to the image).
    6. Save for Web using PNG-8 as file format and the best quality available from the 4-up panel. In the cases I tried it translated to 256 colors Custom Palette and 0% ditter.
    Result was disappointing as I expected a clean image for my web pages.
    How can this be resolved ? What am I doing wrong ?
    Does this have anything to do with the Save For Web command or is it related to something in my workflow ?
    TIA
    Joe

    Hi, Chris.
    Thank you for your replies to my post and the detailed explanations. I have now been able to produce good images that I can use.
    Let me see if I understand this right. After an image is selected and the background erased, the matte or background becomes transparent. According to your comment:
    > it only removes some leftover color contamination from the partially transparent pixels
    the pixels can be partially transparent. From a reply posted to another thread I user described the differences between PNG-8 and PNG-24 in Photoshop. According to him Photoshop PNG-8 only allows pixels to be either fully transparent or fully opaque. Considering your statement about pixels being partially transparent, I assume then that erasing the background in a TIFF image will produce a file type that (similar to PNG-24) also supports partial pixel transparency as is the case with PNG-24. Is this correct ? What temporary file would this be (the one used by Photoshop until you decide to save your work) ?
    So is this also safe to assume that defringe and remove white matte wouldn't work on PNG-8 images since these don't support partial transparency ?
    And one last question: How does it work following your above explanation ? In removing the leftover color contamination from the partially transparent pixels, does Photoshop with either the defringe or the remove white matte tool transforms the partially transparent pixels and fully transparent ones ?
    Just trying to understand the process so I can make better choices the next time.
    Thanks again,
    Joe

  • Preview in browser table layout changes

    When I preview in Browser my layout og table cells changes...
    I get some white spaces between 2 graphics... any reason for
    that... what should I be checking.. thanks

    boom73 wrote:
    > When I preview in Browser my layout og table cells
    changes... I get
    > some white spaces between 2 graphics... any reason for
    that... what
    > should I be checking.. thanks
    If your slicing is uneven, the table is exploding and you'll
    need to use
    spacers or nested tables.
    Choose File > HTML setup. Click on the Table tab. For
    Space with, choose
    1 pixel transparent spacers, or nested tables.
    Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    http://www.adobe.com/communities/experts/

  • How to add my brickwall behind the two cartoon characters here?

    I think actually showing the brickwall and then the two characters underneath
    it will help you understand my Photoshop 6.0 question much easier. These are two separate fil
    es. So let's say I open the two cartoon characters, then open the brockwall file, how to
    get it BEHIND, or in back of these two? Step by step process would be great....I tried but am
    frustrated. Keep in mind, both are separate files.

    Here's one quick way of many, many possibilities:
    1.  Open your brick image.  I'm assuming this is an image with just the brick wall as large or larger than the comic.
    2.  Open your comic.
    3.  Select the "Magic Wand" selection tool.
    4.  Set the options for the Magic Wand tool (at the top of the Photoshop window) to Tolerance 3, Contiguous and Anti-Aliased.
    5.  Click the Magic Wand tool in the white background above the characters, outside the speech balloon.
    6.  Choose Select - Inverse from the menu (or press Ctrl-Shift-I).
    7.  Choose Edit - Copy from the menu (or press Ctrl-C).
    8.  Make the brick image document current.
    9.  Choose Edit - Paste from the menu (or press Ctrl-V).
    What you have done is made an irregular selection of just the characters, copied those pixels inside the selection, and pasted them as a new layer (with some pixels transparent) over a layer containing the brick wall background.
    -Noel

  • Trying to do this cool hover effect with CSS only...

    I've got 'img' thumbnails that are sometimes positioned
    absolutely,
    sometimes relatively, but aren't individually contained in
    anything, like so
    <a href="#">
    <img src="image1.png" width="100" height="150" border="0"
    class="tn" />
    </a>
    <a href="#">
    <img src="image2.png" width="100" height="150" border="0"
    class="tn" />
    </a>
    Now, I've already brought up the limitations of PNG on IE
    (namely, even if
    you "fix" PNG support on IE, IE will flatten your alpha
    channels and strip
    the individual pixels' transparency levels before overriding
    them with a
    single common attribute). This limitation makes it impossible
    for me to do a
    simple 90%-to-100% hover effect to "highlight" the thumbnail
    on mouseover.
    Micha recommended placing normal a highlighted versions of
    the same
    thumbnail inside and outside the viewport, and swapping them
    on mouseover.
    However, that would double the amount of image data being
    sent to the user.
    So what I thought to do, instead, is superpose a standalone
    PNG of a small
    spotlight, OVER the original thumbnail, on hover. Because it
    would be the
    same PNG being superposed over each thumb being hovered over,
    the amount of
    image data being sent to the user wouldn't be all that
    different.
    Would I need javascript for this, or can it be done with CSS
    only?
    Again, it would be the same spotlight.png file being
    superposed on images on
    mouseover, and it wouldn't be a big deal if the image bled
    over surrounding
    images (it would actually make it look more real).
    Thanks.

    say wha???
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Nobody can disagree with that analysis, but a LOADING
    page would do
    nothing
    > to help with this, doncha know?
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Nancy O" <[email protected]> wrote in
    message
    > news:[email protected]...
    > > Sprite images are a tad smaller in filesize than
    the sum of their
    > > individual
    > > parts. As you say, Murray, it's marginal. But the
    real *efficiency*
    > > comes
    > > from fewer server requests to load multiple images.
    Once the sprite has
    > > loaded, there is no perceivable delay on hover - as
    there often is with
    > > conventional image swapping. Finally, since the
    substitution effect is
    > > pure
    > > CSS, there's no need for JavaScripts which can add
    weight to a page.
    > >
    > >
    > > --Nancy O.
    > > Alt-Web Design & Publishing
    > > www.alt-web.com
    > >
    > >
    > > "Murray *ACE*"
    <[email protected]> wrote in message
    > > news:[email protected]...
    > >> By their nature, sprites are larger
    dimensionally than the individual
    > >> images, so the savings would be marginal, I
    think. What I mean by that
    > >> is
    > > a
    > >> simple rollover sprite would be the same size
    as the combined up and
    over
    > >> images, placed adjacent to each other, no?
    > >>
    > >> --
    > >> Murray --- ICQ 71997575
    > >> Adobe Community Expert
    > >> (If you *MUST* email me, don't LAUGH when you
    do so!)
    > >> ==================
    > >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    > >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > >> ==================
    > >>
    > >>
    > >> "Nancy O" <[email protected]>
    wrote in message
    > >> news:[email protected]...
    > >> >< Micha recommended placing normal &
    highlighted versions of the same
    > >> > thumbnail inside and outside the viewport,
    and swapping them on
    > > mouseover.
    > >> > However, that would double the amount of
    image data being sent to the
    > >> > user.>
    > >> >
    > >> > Not if you use a sprite. Have a look at
    this CSS Sprite Demo.
    > >> >
    http://alt-web.com/CSS-Sprite-Demo.html
    > >> >
    > >> >
    > >> > --Nancy O.
    > >> > Alt-Web Design & Publishing
    > >> > www.alt-web.com
    > >> >
    > >> >
    > >> >
    > >> > "Mike" <[email protected]> wrote in
    message
    > >> > news:[email protected]...
    > >> >> I've got 'img' thumbnails that are
    sometimes positioned absolutely,
    > >> >> sometimes relatively, but aren't
    individually contained in anything,
    > > like
    > >> > so
    > >> >> :
    > >> >>
    > >> >> <a href="#">
    > >> >> <img src="image1.png" width="100"
    height="150" border="0"
    class="tn"
    > > />
    > >> >> </a>
    > >> >> <a href="#">
    > >> >> <img src="image2.png" width="100"
    height="150" border="0"
    class="tn"
    > > />
    > >> >> </a>
    > >> >>
    > >> >> Now, I've already brought up the
    limitations of PNG on IE (namely,
    > >> >> even
    > >> >> if
    > >> >> you "fix" PNG support on IE, IE will
    flatten your alpha channels and
    > >> >> strip
    > >> >> the individual pixels' transparency
    levels before overriding them
    with
    > > a
    > >> >> single common attribute). This
    limitation makes it impossible for me
    > >> >> to
    > >> >> do
    > >> > a
    > >> >> simple 90%-to-100% hover effect to
    "highlight" the thumbnail on
    > >> >> mouseover.
    > >> >>
    > >> >> Micha recommended placing normal a
    highlighted versions of the same
    > >> >> thumbnail inside and outside the
    viewport, and swapping them on
    > >> >> mouseover.
    > >> >> However, that would double the amount
    of image data being sent to
    the
    > >> > user.
    > >> >>
    > >> >> So what I thought to do, instead, is
    superpose a standalone PNG of a
    > >> >> small
    > >> >> spotlight, OVER the original
    thumbnail, on hover. Because it would
    be
    > > the
    > >> >> same PNG being superposed over each
    thumb being hovered over, the
    > > amount
    > >> > of
    > >> >> image data being sent to the user
    wouldn't be all that different.
    > >> >>
    > >> >> Would I need javascript for this, or
    can it be done with CSS only?
    > >> >>
    > >> >> Again, it would be the same
    spotlight.png file being superposed on
    > > images
    > >> > on
    > >> >> mouseover, and it wouldn't be a big
    deal if the image bled over
    > >> > surrounding
    > >> >> images (it would actually make it look
    more real).
    > >> >>
    > >> >> Thanks.
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >
    > >
    >

  • How do I get rid of "Back To Form" on generated pages

    I have a page which is generated by PL/SQL. The page itself generates fine, but I always get "Back To Form" along with the success.gif icon. I want to get rid of both. I know I can replace the success.gif with a 1 pixel transparent image, but what about the link? How can I get rid of that?

    Hi Richard,
    This question should belong to Portal Application forum. There, you can find a forum on how to change standard messages in forms.
    I hope this helps.
    Regards,
    Jatinder
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Richard Zapata ([email protected]):
    Does anyone have a clue how to do this?<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • My music won't download from my past iPhones  and iPods on same account.

    Just got an iPhone 5s and I tried downloading my past music purchases from the store and it says cannot download "song" at this time

  • Mac OSX 10.6.4 compatibility

    I have searched this and other forums to try and determine why Adobe does not offer a Reader-download for Intel OSX v 10.6.4. The most recent update is suggested for Intel OSX 10.5.6 - 10.6.3, and there the support ends, supposedly. I know Apple beli

  • My screen has a gouge in it and it starting to spiderweb. Is there anyway to prevent it from getting worse?

    I went to use my iPad mini and the screen has a gouge on the side of it. It is starting to spiderweb. It is only a small spot currently. Is there any way to keep it from getting worse?

  • G.l master data

    Hello Sap experts Can anyone guide me on the exact use of following two points in "Control Data" section of g.l master data:- 1)  Account Currency 2)  Only balance in local currency Kindly expalin with practical example. Thanks & Regards Deepak Garg

  • Error when logging in using sqlplus

    I installed client software on a Sun Solaris machine. I try connecting via sqlplus to the server which is Oracle 8i runnin on linux but when i type in the username and password i get: Error while trying to retrieve text for error ORA-12545 Please hel