How to use .svg files in a webpage?

See svgweb quickstart and the svgweb project homepage for something that works in all browsers including IE (requires flash plugin). There are many ways to include an existing svg file: <img src=”https://stackoverflow.com/questions/2011289/your.svg”/> <object data=”https://stackoverflow.com/questions/2011289/your.svg”/> <iframe src=”https://stackoverflow.com/questions/2011289/your.svg”/> <embed src=”https://stackoverflow.com/questions/2011289/your.svg”/> <div style=”background:url(your.svg)”>…</div>

Cross-browser way to flip html/image via Javascript/CSS?

The following CSS will work in IE and modern browsers that support CSS transforms. I included a vertical flip class just in case you might want to use it too. .flip-horizontal { -moz-transform: scaleX(-1); -webkit-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); -ms-filter: fliph; /*IE*/ filter: fliph; } .flip-vertical { -moz-transform: scaleY(-1); -webkit-transform: scaleY(-1); -o-transform: scaleY(-1); transform: … Read more

Bad image quality after resizing/scaling bitmap

Use createScaledBitmap will make your image looks very bad. I’ve met this problem and I’ve resolved it. Below code will fix the problem: public Bitmap BITMAP_RESIZER(Bitmap bitmap,int newWidth,int newHeight) { Bitmap scaledBitmap = Bitmap.createBitmap(newWidth, newHeight, Config.ARGB_8888); float ratioX = newWidth / (float) bitmap.getWidth(); float ratioY = newHeight / (float) bitmap.getHeight(); float middleX = newWidth / … Read more

With ImageMagick, how can you see all available fonts?

depending on your imagemagick version: convert -list type # for IM older than v6.3.5-7 convert -list font # for newer versions also the output format changed… — update For OsX (Answer from Charles Merriam) if the command above does not produce any results: For a full tutorial with description see http://gothick.org.uk/2008/03/14/using-os-x-fonts-in-imagemagick/ for the rest &tldr: … Read more

Getting image dimensions without reading the entire file

Your best bet as always is to find a well tested library. However, you said that is difficult, so here is some dodgy largely untested code that should work for a fair number of cases: using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; namespace ImageDimensions { public static class ImageHelper { const string … Read more

Which library should I use for server-side image manipulation on Node.JS? [closed]

Answering my own question I spent two days digging through Node.js graphics libraries. node-canvas I tried it first since I’m quite familiar with <canvas> API. It’s a huge plus for a library. it requires Cairo which doesn’t have an easy Windows download. I found it in GTK+ distribution though. moreover it needs native library binding … Read more

High Quality Image Scaling Library [closed]

Here’s a nicely commented Image Manipulation helper class that you can look at and use. I wrote it as an example of how to perform certain image manipulation tasks in C#. You’ll be interested in the ResizeImage function that takes a System.Drawing.Image, the width and the height as the arguments. using System; using System.Collections.Generic; using … Read more

Get average color of image via Javascript

AFAIK, the only way to do this is with <canvas/>… DEMO V2: http://jsfiddle.net/xLF38/818/ Note, this will only work with images on the same domain and in browsers that support HTML5 canvas: function getAverageRGB(imgEl) { var blockSize = 5, // only visit every 5 pixels defaultRGB = {r:0,g:0,b:0}, // for non-supporting envs canvas = document.createElement(‘canvas’), context … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)