snipt

Ctrl+h for KB shortcuts

CSS

Pure CSS 2 Image Preloader

1
2
3
4
body:after {
    content: url(img1.jpg) url(img2.jpg) url(img3.jpg);
    display: none;
    }
https://snipt.net/embed/375ce5de0b4e0b2b215fd2bddedaade9/
/raw/375ce5de0b4e0b2b215fd2bddedaade9/
375ce5de0b4e0b2b215fd2bddedaade9
css
CSS
4
2019-08-23T01:07:17
True
False
False
/api/public/snipt/27593/
pure-css-2-image-preloader
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">body</span><span class="nd">:after</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">content</span><span class="o">:</span> <span class="sx">url(img1.jpg)</span> <span class="sx">url(img2.jpg)</span> <span class="sx">url(img3.jpg)</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">display</span><span class="o">:</span> <span class="nb">none</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">}</span> </span></pre></div> </td></tr></table>
css, image

Java

java creating and saving a screenshot

1
2
3
4
5
6
      Robot robot = new Robot();
      BufferedImage screen = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit()
          .getScreenSize()));
      ImageIO.write(screen, "jpeg", new File("d:/screen.jpeg"));
      ImageIO.write(screen, "bmp", new File("d:/screen.bmp"));
      ImageIO.write(screen, "png", new File("d:/screen.png"));
https://snipt.net/embed/2ed6797b22560abf6d9f941ee0c83676/
/raw/2ed6797b22560abf6d9f941ee0c83676/
2ed6797b22560abf6d9f941ee0c83676
java
Java
6
2019-08-22T16:47:46
True
False
False
/api/public/snipt/27465/
java-creating-and-saving-a-screenshot
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a> <span class="n">Robot</span> <span class="n">robot</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Robot</span><span class="o">();</span> </span><span id="L-2"><a name="L-2"></a> <span class="n">BufferedImage</span> <span class="n">screen</span> <span class="o">=</span> <span class="n">robot</span><span class="o">.</span><span class="na">createScreenCapture</span><span class="o">(</span><span class="k">new</span> <span class="n">Rectangle</span><span class="o">(</span><span class="n">Toolkit</span><span class="o">.</span><span class="na">getDefaultToolkit</span><span class="o">()</span> </span><span id="L-3"><a name="L-3"></a> <span class="o">.</span><span class="na">getScreenSize</span><span class="o">()));</span> </span><span id="L-4"><a name="L-4"></a> <span class="n">ImageIO</span><span class="o">.</span><span class="na">write</span><span class="o">(</span><span class="n">screen</span><span class="o">,</span> <span class="s">&quot;jpeg&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;d:/screen.jpeg&quot;</span><span class="o">));</span> </span><span id="L-5"><a name="L-5"></a> <span class="n">ImageIO</span><span class="o">.</span><span class="na">write</span><span class="o">(</span><span class="n">screen</span><span class="o">,</span> <span class="s">&quot;bmp&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;d:/screen.bmp&quot;</span><span class="o">));</span> </span><span id="L-6"><a name="L-6"></a> <span class="n">ImageIO</span><span class="o">.</span><span class="na">write</span><span class="o">(</span><span class="n">screen</span><span class="o">,</span> <span class="s">&quot;png&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;d:/screen.png&quot;</span><span class="o">));</span> </span></pre></div> </td></tr></table>
awt, file, image, java, robot, save, screenshot, toolkit

Bash

convert pdf to png with a background color at 300 dpi

inkscape -d 300 -D -z -e moments.png -b '#FFFFFF' moments.pdf
https://snipt.net/embed/f46a3e95a897bd579e2ebba7f614ecca/
/raw/f46a3e95a897bd579e2ebba7f614ecca/
f46a3e95a897bd579e2ebba7f614ecca
bash
Bash
1
2019-08-24T13:33:39
True
False
False
/api/public/snipt/17311/
convert-pdf-to-png-with-a-background-color-at-300-dpi
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>inkscape -d <span class="m">300</span> -D -z -e moments.png -b <span class="s1">&#39;#FFFFFF&#39;</span> moments.pdf </span></pre></div> </td></tr></table>
image, inkscape, pdf, png, rastor, vector