IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » png The latest public png snipts.

showing 1-7 of 7 snipts for png
  • convert pdf to png with a background color at 300 dpi
    inkscape -d 300 -D -z -e moments.png -b '#FFFFFF' moments.pdf
    

    copy | embed

    0 comments - tagged in  posted by tlevine on Aug 10, 2010 at 5:34 p.m. EDT
  • Convert from PNG to TIFF and change density
    convert PFS0481.png -density 300 -units PixelsPerInch PFS0481_300dpi.tif
    

    copy | embed

    0 comments - tagged in  posted by benroot on May 03, 2010 at 11:32 a.m. EDT
  • fixing ie png alpha issue
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/path/to/image.png', sizingMethod='image');
    

    copy | embed

    0 comments - tagged in  posted by stupid2 on Jul 14, 2009 at 2:58 a.m. EDT
  • PNG transparent 1x1px generator
    <?php
    /*****************************************************************
     * Script for automatic generation of one pixel
     * alpha-transparent images for non-RGBA browsers.
     * @author Lea Verou
     * @version 1.0 beta
     * Licensed under a MIT license
     *****************************************************************/
    
    ######## SETTINGS ##############################################################
    
    /**
     * Enter the directory in which to store cached color images.
     * This should be relative and SHOULD contain a trailing slash.
     * The directory you specify should exist and be writeable (CHMOD 666 or 777).
     * If you want to store the pngs at the same directory, leave blank ('').
     */
    define('COLORDIR', 'rgba/');
    
    
    /**
     * If you requently use a color with varying alphas, you can name it
     * below, to save you some typing and make your CSS easier to read.
     */
    $color_names = array(
    	'white' => array(255,255,255),
    	'black' => array(0,0,0)
    	// , 'mycolor' => array(red value, green value, blue value)
    );
    
    
    /**
     * If you don't want the generated pngs to be stored in the server, set the following to
     * false. This is STRONGLY NOT RECOMMENDED. It's here only for testing/debugging purposes.
     */
    define('CACHEPNGS', true);
    
    
    
    ######## NO FURTHER EDITING, UNLESS YOU REALLY KNOW WHAT YOU'RE DOING ##########
    
    $dir = substr(COLORDIR,0,strlen(COLORDIR)-1);
    if(!is_writable($dir))
    {
    	die("The directory '$dir' either doesn't exist or isn't writable.");
    }
    
    $rgb = $color_names[$_GET['name']];
    
    $red	= is_array($rgb)? $rgb[0] : intval($_GET['r']);
    $green	= is_array($rgb)? $rgb[1] : intval($_GET['g']);
    $blue	= is_array($rgb)? $rgb[2] : intval($_GET['b']);
    $alphaurl = $_GET['a'];
    
    // "A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent."
    // http://www.php.net/manual/en/function.imagecolorallocatealpha.php
    $alpha = intval(127 - 127 * ($alphaurl / 100));
    
    // Does it already exist?
    $filepath = COLORDIR . "r{$red}_g{$green}_b{$blue}_a{$alphaurl}.png";
    
    if(/*CACHEPNGS and */file_exists($filepath))
    {
    $url = "http://{$_SERVER['HTTP_HOST']}/{$filepath}";
    header("Status: 301");
    die(header("Location: {$url}"));
    }
    else
    {
    	// Send headers
    header('Content-Type: image/png');
    header("Expires: ".gmdate("D, d M Y H:i:s", strtotime('+5 years'))." GMT"); 
    
    
    	$img = @imagecreatetruecolor(1,1) or die('Cannot Initialize new GD image stream');
    	
    	// This is to allow the final image to have actual transparency
    	// http://www.php.net/manual/en/function.imagesavealpha.php
    	imagealphablending($img, false);
    	imagesavealpha($img, true);
    	
    	// Allocate our requested color
    	$color = imagecolorallocatealpha($img, $red, $green, $blue, $alpha);
    	
    	// Fill the image with it
    	imagefill($img,0,0,$color);
    
        // Save the file
    	imagepng($img,$filepath,0,NULL);
    	
    	// Serve the file
    	imagepng($img);
    	flush();
    	
    	// Free up memory
    	imagedestroy($img);
    }
    ?>
    

    copy | embed

    0 comments - tagged in  posted by aidilfbk on May 25, 2009 at 7:49 a.m. EDT
  • CSS Transparency Settings for All Browsers
    .transparent_class {  
         filter:alpha(opacity=50);  
         -moz-opacity:0.5;  
         -khtml-opacity: 0.5;  
         opacity: 0.5;  
    } 
    

    copy | embed

    0 comments - tagged in  posted by YamilG on Feb 03, 2009 at 2:18 p.m. EST
  • Semi-Transparent PNG on IE By Fabrizio Calderan
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>Test Background PNG24</title>
            
            <style type="text/css">
            body {
                background          : url(immagine-test.jpg) top left no-repeat; 
                color               : #fff;
            }
            
            
            
            .overlay { 
                background-image	: url(bg30.png); 
                width               : 300px;
                height              : 200px;
            }
            </style>
    
            <!--[if lte IE 6]>
                <style type="text/css">
                .overlay {
                    background-image	: url(bg100.gif);
                    filter				: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="bg30.png", sizingMethod="scale");
                }
            </style>
            <![endif]--> 
            
                
            
        </head>
    
    <body>
    
        <div class="overlay">
        Prova testo su sfondo trasparente al 30%
        </div>
    
    </body>
    </html>
    

    copy | embed

    0 comments - tagged in  posted by azote on Jan 16, 2009 at 9:00 a.m. EST
  • png ie6 hack
     background-image: url("trasparente.png")!important;
     background-image: none;
     filter: none !important;
     filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='imagen/trasparente.png', sizingMethod='scale');
    

    copy | embed

    0 comments - tagged in  posted by scip on Jan 03, 2009 at 5:30 p.m. EST
Sign up to create your own snipts, or login.